Last active
February 5, 2016 18:27
-
-
Save petergdoyle/90629a780af4c2f4b708 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<profile> | |
<id>copy-dependencies</id> | |
<!-- | |
Usage: mvn clean install -Pcopy-dependencies -Dpackage-name=om.manning.nettyinaction.chapter2 -Dclass-name=Ech | |
oServer | |
java -jar target/${artifactId}.jar | |
--> | |
<build> | |
<plugins> | |
<plugin> | |
<artifactId>maven-dependency-plugin</artifactId> | |
<executions> | |
<execution> | |
<phase>install</phase> | |
<goals> | |
<goal>copy-dependencies</goal> | |
</goals> | |
<configuration> | |
<outputDirectory>${project.build.directory}/lib</outputDirectory> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<!-- Build an executable JAR --> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<version>2.4</version> | |
<configuration> | |
<archive> | |
<manifest> | |
<addClasspath>true</addClasspath> | |
<classpathPrefix>lib/</classpathPrefix> | |
<mainClass>${package-name}.${class-name}</mainClass> | |
</manifest> | |
</archive> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</profile> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment