Thank you for your great answer. To summarize the options:
1) maven reactor build encompassing both "prj" and "lib"
- You mean a parent/child multi-module project? But wouldn't this involve code duplication, since I want to use lib in multiple projects and they have to be in sub directories of their parent?
2) Adding more -src parameters to SuperDevMode
That's the option I will go with, since it involves no maven, but only IDE configuration. Actually I knew about this possibility, but I thought it might have a performance impact. Anyhow, the new SDM 2.7.0 however works great this way!
Petty only that using the dev mode server, does not support multiple source paths? I imagine this is on the roadmap.
On 04/12/14 16:28, Thomas Broyer wrote:
1) maven reactor build encompassing both "prj" and "lib"
- You mean a parent/child multi-module project? But wouldn't this involve code duplication, since I want to use lib in multiple projects and they have to be in sub directories of their parent?
2) Adding more -src parameters to SuperDevMode
That's the option I will go with, since it involves no maven, but only IDE configuration. Actually I knew about this possibility, but I thought it might have a performance impact. Anyhow, the new SDM 2.7.0 however works great this way!
Petty only that using the dev mode server, does not support multiple source paths? I imagine this is on the roadmap.
On 04/12/14 16:28, Thomas Broyer wrote:
On Thursday, December 4, 2014 3:17:42 PM UTC+1, Robert Hoffmann wrote:Hi,
I have a question to the workflow I have adopted, and would be grateful for your input. Are you running into the same problem or is there a better way?
So, I develop a number of projects (e.g. prj) that share a common library (e.g. lib) which I also develop. They are in independent maven projects and modules and the lib compiles to a jar.
Sometimes I find myself in the situation that I encounter a bug while developing (prj), which I then have to fix in the library (lib).
However, the super dev mode serving prj, will not pick up these changes while running (in a hot fashion). In 2.6.1 it would fail compiling, in 2.7.0 it just ignores it silently.
To make the changes in lib effective and visible in prj, I have to restart sdm. (And restarting sdm has become quite slower in 2.7.0).
thank you, Robert
First, Maven is really bad at making you productive in such situations, unless you cheat and make a reactor build encompassing both your "lib" and "prj" (rather than working with a JAR of "lib").
The next issue IIUC is the JVM which assumes the classpath to be "read-only". When looking up resources (not classes), I think the JVM will keep a handle on a previously opened JAR so it won't see changes when you update it. I think you wouldn't have that issue working from directories rather than JARs.But just in case directories would be an issue too, you can then pass them as "-src" to the CodeServer (it's however not possible with the DevMode entry point).So in your case, making a reactor project rather than resolving "lib" from a repository would probably help; alternatively you could probably use the build-helper-maven-plugin to add the sources of the "lib" project to your "prj" project, at least temporarily (and in a "dev" profile). This of course doesn't apply to generators and linkers which are loaded as classes, not resources compiled on-the-fly.
Last, but not least, GWT 2.8.0-SNAPSHOT will reuse the incremental cache from a previous SuperDevMode run, making SDM restarts much faster.
No comments:
Post a Comment