5

I would like to deploy my GWT 2.7 application on my server through gwt-maven-plugin and jenkins. But, after compile process, when I launch my application, I've this error message :

Couldn't load APPLICATION_NAME from Super Dev Mode server at http://MY_IP:9876. Please make sure this server is ready.

Indeed, the super dev mode is enabled by default since 2.7. So, how disable it to use production mode ?

Maxime Riss
  • 111
  • 1
  • 7
  • 1
    Are you appending gwt.codesvr in url? – moh May 11 '15 at 10:10
  • No, I just used http://ip:port/context. In 2.6 version it was enough (because Super dev mode was disabled I think) – Maxime Riss May 11 '15 at 10:16
  • generally we will hit like this http://localhost:9090/Context_path/hostpage.html – moh May 11 '15 at 10:24
  • My host page is index.html to avoid to append it in url – Maxime Riss May 11 '15 at 10:26
  • Did you `mvn clean` before deploying? See https://stackoverflow.com/a/27187142/116472 and https://github.com/gwt-maven-plugin/gwt-maven-plugin/issues/108 (or you could use a different output dir when in dev; see for example the setup in https://github.com/tbroyer/gwt-maven-archetypes – uses a different gwt-maven-plugin though) – Thomas Broyer May 11 '15 at 15:28

2 Answers2

6

Ok thank you very much for your comment. Indeed, my problem concerned the *.nocache.js and *.devmode.js files. I started my project (my first one in GWT) in 2.6 version and these files were created (by dev and super-dev-mode) and versionned by my fault. So, when my jenkins deployed my project, it used these files so even if I did mvn clean before deploy it had no effect.

So, I removed these files from my project and I did a mvn clean install before deploy to fix my issue.

Maxime Riss
  • 111
  • 1
  • 7
0

Thanks to Maxime's answer, I was able to figure out my issue as well.

When running :gwtDev and :gwtSuperDev additional files are created inside the /war folder (/WEB-INF/classes/, /projectName/ and /lib/). This creates no issues at this point when using the built-in Jetty Launcher.

However, when I wanted to create a .war file and deploy manually, I would use the :war task. The earlier mentioned additional files from /war are then copied into the /build folder and mixed with freshly generated files of the same name. This results in the .war file having duplicates of the same files, or old files that you thought were deleted, or files containing out of date content.

In my case, my war file was getting *.devmode.js + more copied into it when they shouldn't have existed in there.

I fixed this problem by adding the following three exceptions to which folders from the /war directory are included in the .war file.

war {
rootSpec.exclude("**/WEB-INF/classes/")
rootSpec.exclude("**/outer_planets/")
rootSpec.exclude("**/lib/")
}