Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] jetty-maven-plugin v7.5.0.v20110901 no longer respects system properties?

I run Jetty via the jetty-maven-plugin, from the command line, with a command like “mvn jetty:run”. After upgrading from jetty-maven-plugin v7.4.5.v20110725 to v7.5.0.v20110901, my log4j.properties file is no longer being parsed. It is not being parsed because the log4j.configuration system property is no longer being set when running Jetty. I have this configuration in my pom.xml...

 

<plugin>

<groupId>org.mortbay.jetty</groupId>

<artifactId>jetty-maven-plugin</artifactId>

<version>7.5.0.v20110901</version>

<configuration>

  <war>${project.build.directory}/${webappName}.war</war>

  ... snip ...

  <systemProperties>

  <systemProperty>

    <key>log4j.configuration</key>

    <value>file:${project.build.outputDirectory}/log4j.properties</value>

  </systemProperty>

 

As of Jetty v7.5.0, this log4j.configuration system property is no longer being respected. I can still set the property via the command line with “mvn jetty:run -Dlog4j.configuration=file:./target/classes/log4j.properties”, this works fine. I suspect this problem is due to a change in syntax of the systemProperties xml element.

 

There is documentation for setting up the systemProperties element with the Jetty 6 plugin (http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin#MavenJettyPlugin-sysprops), but I cannot find any comparable documentation for the Jetty 7 plugin. The closest thing I can find (http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin) says, “For more information, see Setting System Properties,” but there is no hyperlink anywhere. Was this omitted accidentally?

 

Thanks,

 

- Aaron


Back to the top