I would recommend that you define properties for port and credentials like,
<properties>
<https.port>443</https.port>
<keystore>c:/xxx-ssl.keystore</keystore>
<password>xxx</password>
<keyPassword>xxx</keyPassword>
</properties>
and in your configuration refer to them like,
<connector implementation="org.mortbay.jetty.security.SslSocketConnector">
<port>${https.port}</port>
<maxIdleTime>60000</maxIdleTime>
<keystore>${keystore}</keystore>
<password>${password}/password>
<keyPassword>${keyPassword}</keyPassword>
</connector>
If you only need to change values for these on your machine, then I
would recommend creating a profile in your settings.xml and override the
properties on your machine.
<profiles>
<profile>
<id>personal</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<https.port>1234</https.port>
<keystore>xxxxx</keystore>
<password>xxxx</password>
<keyPassword>xxxx</keyPassword>
</properties>
</profile>
</profiles>
This makes sure that your configuration does not go in the project pom
which I think is better as this custom configuration only applies to
you. You can remove the activationByDefault to explicitly activate it by
using -P switch.
Thanks,
Kalpak
Any update guys.
i know if i am in a hurry
darniz wrote:
Hi All
I figured out how to start jetty on default port on 80 with http and
https.
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.16</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<jettyEnvXml>${basedir}/src/test/resources/jetty-env.xml</jettyEnvXml>
<connectors>
<connector
implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>80</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
<connector
implementation="org.mortbay.jetty.security.SslSocketConnector">
<port>443</port>
<maxIdleTime>60000</maxIdleTime>
<keystore>c:/xxx-ssl.keystore</keystore>
<password>xxx</password>
<keyPassword>xxx</keyPassword>
</connector>
</connectors>
</configuration>
</plugin>
The issue is that i want to change the jetty port only for my machine. So
i came accorss setting profiles.i can activate a specific profile using
maven jetty:run -Denvironment=mylocaljetty then that profile is pulled in
something like this
<profile>
<activation>
<property>
<name>environment</name>
<value>mylocaljetty</value>
</property>
</activation>
...
</profile>
the issue is that in profile element how can i speciy the jetty:port and
the https credential detail. any examples.
Thanks
darniz
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]