07-May-2013 0.4.12
Making Runnable JAR
To make a runnable JAR with ReXSL inside add this dependency to your project:
<dependency> <groupId>com.rexsl</groupId> <artifactId>rexsl-standalone</artifactId> <version>0.4.12</version> <classifier>bin</classifier> <scope>runtime</scope> </dependency>
Then, configure maven-war-plugin:
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.rexsl.standalone.RexslMain</mainClass>
</manifest>
</archive>
<overlays>
<overlay>
<groupId>com.rexsl</groupId>
<artifactId>rexsl-standalone</artifactId>
<classifier>bin</classifier>
<type>jar</type>
</overlay>
</overlays>
</configuration>
</plugin>Now, package the entire project and run the WAR created:
$ mvn clean package $ java -jar target/example-1.0-SNAPSHOT.war 8080
Should start a container at http://localhost:8080/.
Copyright © 2011-2013 ReXSL.com, All Rights Reserved. Privacy Policy.