Reputation: 1
I'm trying to set up an older project that was using eclipse plugins for app engine and gwt. These plugins won't work moving foward and I'm now looking to set this up using eclipse and maven plugins instead. I'm new to using maven so it's entirely likely there's an easy solution here somewhere.
I'm basing the new setup on this AppEngineGwt sample project, it has the things I'm looking for regarding local development, the gwt codeserver recompile of client side changes works, and hot swap of server side code also works. However I need to change a few things.
The project I'm setting up is using a lot of app engine legacy bundled services and at this point it's not feasible to replace all of them. That means the jetty server in the sample project can't be used and I have to use an appengine-web.xml (rather than app.yaml) based app engine local development server instead. So I'm replacing the jetty server with the app engine server provided by the appengine-maven-plugin and running local development with appengine:run rather than jetty:run.
I have removed the sample-jettyMain module from the sample project and am running the appengine server from the sample-server module instead.
The problem is that the appengine-maven-plugin doesn't seem to have all the configuration options for the server that the jetty-maven-plugin does so I'm trying my best to get gwt recompile and server code hot swap to work again. I've solved a lot of the problems but I'm unable to get reloading of server side code to work again.
Ideally it would work automatically using eclipses automatic builds and the devserver.automaticRestart flag and putting the new .class files in the WEB-INF/classes folder. I almost got this to work by setting the default output folder of the shared module to the server modules ${project.build.directory}/${project.name}-${project.version}/WEB-INF/classes folder (a lot of the code is shared, so many but not all of the server side code changes will be from the shared module) but after an automatic build both eclipse and the appengine server complains that the file has unresolved imports. I think I sort of understand this problem but was unable to fix it.
It would alternatively be acceptable to have to press a button to reload the server with my changes. Supposedly this should be possible by running mvn package -pl *-server, but that method fails with the error message that the jar it's trying to write is being used by another process. Stopping the server, repackaging and starting it again will take too long.
So my question is, with this setup, what's the best way to get the server to hot swap / reload with my code changes?
Upvotes: 0
Views: 18