mvn archetype:generate -DgroupId=com.sajith.maven -DartifactId=MyFirstWebApp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
GroupId and DartifactId can be change to your package name and project name.
Then Change the POM file and add the jetty maven plugin.Inside the Plugins notation add these 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>
Then Enter this command
mvn clean install
mvn jetty:run
No comments:
Post a Comment