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
Packaging check in maven jetty plugin breaking execution #2372
Comments
The idea is to avoid installing jars for multi modules projects:
So previously if you wanted to run module-c with jetty:run you had to first install all the modules then run jetty:run only on module-c. A bit time consuming... |
Well reading your pom. I think there is something chicken and egg: core depends on war module but war module depends on core as well.. |
There is only war file being used from 'orienteer-war' module. And actually all modules which are packed as jar allowing to check just them by running 'mvn jetty:run' right now. For example: Yes - if you can help a way to work-around this check - as you propose with 'skipPackaging' - it will be great! Thanks! |
look #2375 can you please test with your project if that works? |
No, don't do If we are going to do any skip logic it will be to skip the entire plugin execution, not just a specific step in it. There's 1 problem and 1 new feature we should consider instead for this issue. First, we shouldn't be throwing a This should be a simple logged warning and skipped mojo execution. Something like ... if ( !"war".equals( project.getPackaging() )
{
getLog().info( "Skipping non-war project " + project);
return; // don't run this mojo
} Then we should create a new configurable which allows the users of the plugin to define what set of packaging types are allowed in their project. A list/collection/array of packaging type strings. The above check would then check the list/collection/array of allowed packaging types instead of a hardcoded one. |
@joakime good catch LGTM I will change that |
packaging list support added
|
I don't exactly see why we need the test of the packaging of the project at all? Presumably if a user has defined the jetty plugin in the pom, then they want it executed (unless they've explicitly configured the "skip" option)? |
I explained it in a previous comment
Does it make sense?
On Tue, 27 Mar 2018 at 9:37 am, Jan Bartel ***@***.***> wrote:
I don't exactly see why we need the test of the packaging of the project
at all? Presumably if a user has defined the jetty plugin in the pom, then
they want it executed (unless they've explicitly configured the "skip"
option)?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#2372 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABNEBT9KWYj7mJNK4tlWM4zLVBXaoTwks5tiXu7gaJpZM4S4Kj1>
.
--
Olivier
|
Fix checked in via pr #2375 |
…ems: wrong packaging (war) simple-security-client-javascript aus: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project simple-security-client-javascript: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1] can be solved by changing packing (remove war): Also todo-list fails due to jetty mvn plugin updates (jetty/jetty.project#2372), can be fixed by: <configuration> <supportedPackagings> <supportedPackaging>jar</supportedPackaging> </supportedPackagings> </configuration>
Hi, this is still happening to me, is there any special configuration I should add to my pom? Thanks in advance.
|
@gracekarina should not. Can you try with version 9.4.11.v20180605? |
Hi @olamy, sorry for the delay, this is the project https://github.com/swagger-api/swagger-inflector/blob/update-jetty-version/pom.xml Thanks in advance! |
@gracekarina I'm not clear what your problem is? is it using |
Thanks @olamy that was the issue, and now it's fix with the PR above. 👍 |
Hello,
We had a very nice feature in our build system: any jar module can be run on a web server just by running
mvn jetty:run
. Example how that was configured: https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/pom.xml#L274-L306But with jetty update that become impossible because of the following check:
4b513c6#diff-28ee2c02100a8cae9e1d1754ea32af10R64
Please clarify why this check was introduced? And can you please consider removing this check or add some workaround for it? Can't understand what particular value this check is bringing. Per your issues history there are others who has problem exactly because of these check.
The text was updated successfully, but these errors were encountered: