Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Completely different behaviour when using maven jetty plugin with and without debug flag

Thanks Jan.  By rev'ing to the latest version of the jetty plugin, and adjusting the allowable package types -- I was able to get everything to compile with the new POM dependency. 

Relevant snippets:
<supportedPackagings>
<supportedPackaging>jar</supportedPackaging>
</supportedPackagings>
<properties>
...
<jetty-version>9.4.12.v20180830</jetty-version>
</properties>

Unfortunately, I never did find out why I was seeing the behaviour that I was (running with debug flag allows the application to be completed, running without causes the war to silently not be assembled).

You're right that I probably need to clean up the actions sections of my POM file:
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>

Thanks,
Saad

From: Jan Bartel <janb@xxxxxxxxxxx>
Sent: October 17, 2018 1:58 AM
To: saadmaz@xxxxxxxxxxx
Subject: Re: [jetty-users] Completely different behaviour when using maven jetty plugin with and without debug flag
 
That output looks like you're also starting the jetty maven plugin from the pom during the test phase, so you're startng jetty twice: once from the phase binding in the pom and also again from the command line. I don't think you've got the pom configured correctly. Usually you start jetty from phase bindings in the pom at the integration-test phase. Have a re-read of the jetty plugin documentation at https://www.eclipse.org/jetty/documentation/.

Also, you're using a really old version of the plugin - 9.2.9. Even in the 9.2 series the latest release was 9.2.26, but even that's ancient, as the latest jetty release is 9.4.12.

Jan



On Wed, 17 Oct 2018 at 16:12, Saad Mazahir <saadmaz@xxxxxxxxxxx> wrote:
Sorry Jan:
smazahir-mac:jaxrs smazahir$ mvn -v
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T12:39:06-07:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"

Unfortunately, addding maven logging seems equivalent to the '-X' flag and results in a working server.

The full debug out is pretty large.

For comparison:
Successfully launches jetty server with mvn clean install jetty:run (no other code change): https://pastebin.com/qFVcd7r4

Failed to launch with just mvn clean install jetty:run (has my pom change) -- https://pastebin.com/8gfkA2qD

The debug output is very large and difficult to share.  My intent was to compare a debug output with my change and one without, but since the one with my change somehow succeeds when run with the debug flag I'm a bit stuck.

Doing a simple diff shows there is a lot of noise in the diff (e.g. timestamps) and nothing obvious.


From: jetty-users-bounces@xxxxxxxxxxx <jetty-users-bounces@xxxxxxxxxxx> on behalf of Jan Bartel <janb@xxxxxxxxxxx>
Sent: October 17, 2018 12:42 AM
To: JETTY user mailing list
Subject: Re: [jetty-users] Completely different behaviour when using maven jetty plugin with and without debug flag
 
Hi,

You didn't mention the version of jetty, the version of java, the version of maven, nor the os you're running on, so that makes it more difficult to help you.

To help pinpoint the problem, you could edit the $MAVEN_HOME/conf/logging/simplelogger.properties file, and turn on all jetty debug logging by adding a line like: 
org.slf4j.simpleLogger.log.org.eclipse.jetty=DEBUG

Compare the output you get with/without the -X option.

Jan

On Wed, 17 Oct 2018 at 15:21, Saad Mazahir <saadmaz@xxxxxxxxxxx> wrote:
Hi all,

I have a jetty server which runs fine normally.  When I try to add a new POM dependency, the war file fails to get assembled.  When I run the plugin but with the debug switch enabled, the war file get's assembled and run's fine.
That is:

Bad:
mvn clean install jetty:run
mvn clean install jetty:run -Dorg.eclipse.jetty.annotations.maxWait=420
webAppSourceDirectory/Users/smazahir/Workspace/zodiac/touchless_maven_fix/simpleServer/jaxrs/target/swagger-jaxrs-server-1.0.0 does not exist. 

Good:
mvn clean install jetty:run -Dorg.eclipse.jetty.annotations.maxWait=420 -X


What could cause this discrepancy?  How can I debug whether adding a new pom dependency actually causes my project to fail?

Thanks.

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
Expert assistance from the creators of Jetty and CometD



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


Back to the top