Problem reading system properties in jetty-maven-plugin

View: New views
1 Messages — Rating Filter:   Alert me  

Problem reading system properties in jetty-maven-plugin

by Jacob Bergöö :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
I have configured my pom.xml so it works fine with jetty-maven-plugin if I use mvn jetty:run with all the system properties that I want to use. E.g.
mvn jetty:run -Dlog4j.configuration="file:src/main/config/log4j.properties" -Dinitial.propertiesfilename=src/main/config/System.properties -Dcom.mycompany.contextsFile=src/main/config/Contexts.xml -Dhttp.proxySet=true -Dhttp.proxyHost=proxy.mycompany.com -Dhttp.proxyPort=808

But if I try to move in this properties into the configuration tag inside jetty-maven-plugin it stop working. This is how I set it up:


<plugins>
  <plugin>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>7.0.0.pre5</version>
    <configuration>
      <systemProperties>
        <systemProperty>
          <name>log4j.configuration</name>
          <value>"file:src/main/config/log4j.properties"</value>
        </systemProperty>
        <systemProperty>
          <name>initial.propertiesfilename</name>
          <value>src/main/config/System.properties</value>
        </systemProperty>
        <systemProperty>
          <name>com.mycompany.contextsFile</name>
          <value>src/main/config/Contexts.xml</value>
        </systemProperty>
        <systemProperty>
          <name>http.proxySet</name>
          <value>true</value>
        </systemProperty>
        <systemProperty>
          <name>http.proxyHost</name>
          <value>proxy.mycompany.com</value>
        </systemProperty>
        <systemProperty>
          <name>http.proxyPort</name>
          <value>808</value>
        </systemProperty>
      </systemProperties>      
      <scanIntervalSeconds>10</scanIntervalSeconds>
      <contextPath>/</contextPath>
      <classesDirectory>${basedir}/target/${build.finalName}/WEB-INF/classes</classesDirectory>
      <webAppConfig>
        <defaultsDescriptor>src/main/config/webdefault.xml</defaultsDescriptor>
        <baseResource implementation="org.mortbay.resource.ResourceCollection">
          <resourcesAsCSV>${basedir}/src/main/webapp,target/${build.finalName}</resourcesAsCSV>
        </baseResource>
      </webAppConfig>
      <connectors>
         <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
          <port>7001</port>
          <maxIdleTime>60000</maxIdleTime>
         </connector>
       </connectors>
    </configuration>
 </plugin>
</plugins>


What have I missed?
Thanks for any help or pointers...
Cheers,
Jacob