Problem reading system properties in jetty-maven-plugin

1 message Options
Embed this post
Permalink
Jacob Bergöö

Problem reading system properties in jetty-maven-plugin

Reply Threaded More More options
Print post
Permalink

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


--
View this message in context: http://old.nabble.com/Problem-reading-system-properties-in-jetty-maven-plugin-tp26230502p26230502.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]