I am using maven-jetty-plugin .I have created two profile for test and development. Here is my pom
<profiles>
<profile>
<id>test</id>
<build>
<finalName>Authorization</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>development</id>
<build>
<finalName>AuthorizationTest</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
So,when i run jetty:run i want to profile it for test and development.
Like jetty:run -Ptest for test profile and jetty:run -Pdevelopment .
When i run jetty:run -Ptest it does not work.Do i need to do extra configuration to make it run? If it is not possible from plugin then is there any alternative to run jetty on different maven profile? Any help please ?