Jetty Deployer webapp ignores jetty.base when deciding where to place new .war files

Description

I have a fresh, relatively generic Jetty 9.2 setup. I do have jetty.base setting, which differs from jetty.home, which is the recommended configuration for jetty.

I've added cargo-jetty-7-and-onwards-deployer.war and attempted to deploy a webapp. The webapp is uploaded to ${jetty.home}/webapps, not ${jetty.base}/webapps as desired.

I reviewed the source code. In org.codehaus.cargo.deployer.jetty.DeployerServlet, I see the initialization of webAppDirectory. It is based on configHome, which is either System.getProperty("config.home"); or System.getProperty("jetty.home"); It seems to me that it should use System.getProperty("jetty.base"), if defined.

The code has comment: TODO find a better means of determining the configuration and webapp directories

I can work around the problem by setting the config.home system property. But it seems like the deployer should use the jetty.base property.

I am using jetty-distribution-9.2.14.v20151106.

Activity

Show:
S. Ali Tokmen
January 12, 2016, 11:40 PM

Hi Todd

Thanks for reporting your issue in such a level of detail. The problem is now fixed.

You can try with the version 1.4.18-SNAPSHOT, which you can build yourself or obtain by waiting c.a. 24 hours and following the instructions on https://codehaus-cargo.github.io/cargo/Maven2+Plugin+Installation.html#Maven2PluginInstallation-snapshots

Regards

Todd Hivnor
January 13, 2016, 12:12 AM

Ali, thank you for the quick fix !!

I looked at the code, and it appears correct, just what I would expect.

I'm not set up to build but I will try it out when the next snapshot is created and report back my findings.

S. Ali Tokmen
January 13, 2016, 7:44 AM

Hi Todd

Deployment completed as per https://semaphoreci.com/codehaus-cargo/cargo/branches/master/builds/122 and I see many WARs are available on https://oss.sonatype.org/content/repositories/snapshots/org/codehaus/cargo/cargo-jetty-7-and-onwards-deployer/1.4.18-SNAPSHOT/ (with deployment times, so pick one towards the end of the list).

So you can give a try

Regards

Todd Hivnor
January 13, 2016, 5:34 PM

That works great! Thanks again!

Assignee

S. Ali Tokmen

Reporter

Todd Hivnor

Components

Fix versions

Affects versions

Priority

Medium
Configure