In present era development process, everybody is primarily concerned about faster development process, because of which development environment has become vital in the project implementation plan.
Jetty is the one of the light weight application server, which can be run on stand-alone or using maven plugin. I am here giving the configuration details of later one.
(One assumption here is, reader has the knowledge of Maven)
1. Add jetty-maven plugin in the plugins section of pom.xml
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.9.v20130131</version>
<configuration>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>8080</port>
</connector>
</connectors>
<stopPort>18080</stopPort>
<scanIntervalSeconds>0</scanIntervalSeconds>
<webXml>target/classes/web.xml</webXml>
<webApp>
<contextPath>/</contextPath>
</webApp>
</configuration>
<dependencies>
// any dependencies required can be added here
// if you project has dependency on jsf, add jsf dependencies here too.
</dependencies>
</plugin>
2. Go to the terminal and change directory to base directory of project and run the server using below command.
mvn jetty:run
PS: Maven Options might need to be mentioned
(i) Perm Genspace attributes:
MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
(ii) Starting jetty server in debug mode with Perm Genspace attributes:
MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y"
Jetty is the one of the light weight application server, which can be run on stand-alone or using maven plugin. I am here giving the configuration details of later one.
(One assumption here is, reader has the knowledge of Maven)
1. Add jetty-maven plugin in the plugins section of pom.xml
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.9.v20130131</version>
<configuration>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>8080</port>
</connector>
</connectors>
<stopPort>18080</stopPort>
<scanIntervalSeconds>0</scanIntervalSeconds>
<webXml>target/classes/web.xml</webXml>
<webApp>
<contextPath>/</contextPath>
</webApp>
</configuration>
<dependencies>
// any dependencies required can be added here
// if you project has dependency on jsf, add jsf dependencies here too.
</dependencies>
</plugin>
2. Go to the terminal and change directory to base directory of project and run the server using below command.
mvn jetty:run
PS: Maven Options might need to be mentioned
(i) Perm Genspace attributes:
MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
(ii) Starting jetty server in debug mode with Perm Genspace attributes:
MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y"
No comments:
Post a Comment