Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question/proposition to add gwt:codeserver-no-fork goal #100

Closed
azatsarynnyy opened this issue Nov 9, 2017 · 3 comments
Closed

Question/proposition to add gwt:codeserver-no-fork goal #100

azatsarynnyy opened this issue Nov 9, 2017 · 3 comments
Labels
enhancement New feature or request question Further information is requested wontfix This will not be worked on

Comments

@azatsarynnyy
Copy link
Contributor

azatsarynnyy commented Nov 9, 2017

Hello Thomas!
I'm working on a large GWT app project where launching gwt:codeserver takes several minutes. After reducing the projects list with the -pl + -am parameters, maven reactor includes >40 gwt-libs + some shared libs.
In my case, process-classes build phase execution is redundant since my sources are already built before launching SDM in 99% of cases. But a lot of sources are generated during maven build.

So my question is do you have any plans for adding a mojo for launching CodeServer w/o forking a process-classes build phase (e.g. jar-no-fork)?

P.S.: I've tried to do it myself and CodeServer starts in ~10 sec. The only thing that needed to be fixed in my case is adding the generated sources directories (e.g. target/generated-sources) to the maven's CompileSourceRoots in order to pass it to the -src CodeServer's parameter.

@tbroyer
Copy link
Owner

tbroyer commented Nov 9, 2017

What about mvn gwt:codeserver -Dmaven.main.skip -Dmaven.resources.skip? Would that work for you?

Is your problem that the build is executed up until the process-classes phase? or that you have goals on that build that take time? (and then, why do they take time? are they doing unnecessary work? if so, report the bug, and skip them; like compiler:compile with -Dmaven.main.skip and resources:resources with -Dmaven.resources.skip)

Before adding workarounds, I'd like to understand the problem. The compile source roots issue you highlight is also one (big) reason I won't rush into adding such a thing without a clear understanding of the situation. I the problem is in other plugins, they can be fixed. If it's in Maven itself, then we can possibly consider a workaround in this plugin. But if you need to configure some things manually anyway (additional compile source roots that wouldn't be added as we wouldn't run other plugins), then how about using the maven-antrun-plugin of a shell script instead?

@azatsarynnyy
Copy link
Contributor Author

You are absolutely right! In my case, there are a lot of redundant (in terms of SDM) goals are bound to the build. But only build-helper-maven-plugin performs useful work: adds the generated (re-)sources to the compile source roots. Skipping all the remaining goals gives an acceptable launch time - <1 min. instead of >3min.
Consequently, there's no need to bypass the process-classes build phase.

Sorry for disturbing and many thanks for pointing this out.
I'm very grateful for your help!

@tbroyer
Copy link
Owner

tbroyer commented Nov 10, 2017

You're welcome; always happy to get things done by not doing 🙂

@tbroyer tbroyer closed this as completed Nov 10, 2017
@tbroyer tbroyer added enhancement New feature or request question Further information is requested wontfix This will not be worked on labels Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants