You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ph...@apache.org on 2017/06/13 22:51:51 UTC
incubator-juneau git commit: Updated POM to produce one uber-jar with
all dependencies
Repository: incubator-juneau
Updated Branches:
refs/heads/master 96f57aa30 -> 44c90a43c
Updated POM to produce one uber-jar with all dependencies
Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/44c90a43
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/44c90a43
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/44c90a43
Branch: refs/heads/master
Commit: 44c90a43c2626557541b19628a2f80061067a4ff
Parents: 96f57aa
Author: Peter Haumer <ph...@apache.org>
Authored: Tue Jun 13 15:51:49 2017 -0700
Committer: Peter Haumer <ph...@apache.org>
Committed: Tue Jun 13 15:51:49 2017 -0700
----------------------------------------------------------------------
juneau-microservice-template/pom.xml | 36 ++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/44c90a43/juneau-microservice-template/pom.xml
----------------------------------------------------------------------
diff --git a/juneau-microservice-template/pom.xml b/juneau-microservice-template/pom.xml
index 91f0f98..63a2320 100644
--- a/juneau-microservice-template/pom.xml
+++ b/juneau-microservice-template/pom.xml
@@ -16,7 +16,9 @@
<!--
This project is meant to be used as a starting point for developers to use in creating their own REST microservices.
It creates a parent REST interface on port 10000 with a single child hello-world resource.
- This POM is likewise meant to be used as a starting point for developers.
+ This POM is likewise meant to be used as a starting point for developers. It creates an uber-jar
+ to run the microserice from the command line. Copy the jar as well as the .cfg file and start it
+ with java -jar juneau-microservice-template-1.0.0.jar microservice.cfg
The group/artifact/version information is meant to be overwritten by developers to match their own needs.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -42,11 +44,43 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
+ <version>3.6.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.apache.juneau.microservice.RestMicroservice
+ </mainClass>
+ </manifest>
+ <manifestEntries>
+ <Rest-Resources>org.apache.juneau.microservice.sample.RootResources
+ </Rest-Resources>
+ <Main-ConfigFile>microservice.cfg</Main-ConfigFile>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>