go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Assembly -- to wrap the entire project for deploying
 
Subject: Assembly -- to wrap the entire project for deploying
Author: Linux
In response to: Build from the top level container
Posted on: 10/31/2017 05:46:33 AM

To create the archive (.tar.gz & .zip) of the entire project including all the modules, run assembly:assembly goal from the project’s top level directory.

$ cd /opt/maven/hello-one
$ mvn assembly:assembly -DdescriptorId=project


The output:
...
...
...
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ app-jar ---
[INFO] Surefire report directory: /opt/maven/hello-one/app/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.xyz.integration.HelloTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.112 sec

Results :

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ app-jar ---
[INFO]
[INFO] <<< maven-assembly-plugin:2.2-beta-5:assembly (default-cli) < package @ hello-one-pom <<<
[INFO]
[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-5:assembly (default-cli) @ hello-one-pom ---
[INFO] Building tar : /opt/maven/hello-one/target/hello-one-pom-1.0-project.tar.gz
[INFO] Building tar : /opt/maven/hello-one/target/hello-one-pom-1.0-project.tar.bz2
[INFO] Building zip: /opt/maven/hello-one/target/hello-one-pom-1.0-project.zip
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] hello-one-pom ...................................... SUCCESS [  6.223 s]
[INFO] util-jar ........................................... SKIPPED
[INFO] app-jar ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.943 s
[INFO] Finished at: 2017-10-30T22:43:42-07:00
[INFO] Final Memory: 24M/60M
[INFO] ------------------------------------------------------------------------


 

> On 10/31/2017 05:34:31 AM Linux wrote:


$ cd /opt/maven/hello-one
$ mvn package


The output:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] hello-one-pom
[INFO] util-jar
[INFO] app-jar
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building hello-one-pom 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building util-jar 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ util-jar ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /opt/maven/hello-one/util/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ util-jar ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ util-jar ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /opt/maven/hello-one/util/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ util-jar ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ util-jar ---
[INFO] Surefire report directory: /opt/maven/hello-one/util/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.xyz.commons.DateUtilTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.231 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ util-jar ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building app-jar 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ app-jar ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /opt/maven/hello-one/app/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ app-jar ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ app-jar ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /opt/maven/hello-one/app/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ app-jar ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ app-jar ---
[INFO] Surefire report directory: /opt/maven/hello-one/app/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.xyz.integration.HelloTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.119 sec

Results :

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ app-jar ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] hello-one-pom ...................................... SUCCESS [  0.014 s]
[INFO] util-jar ........................................... SUCCESS [  3.746 s]
[INFO] app-jar ............................................ SUCCESS [  0.631 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.647 s
[INFO] Finished at: 2017-10-30T22:28:33-07:00
[INFO] Final Memory: 10M/60M
[INFO] ------------------------------------------------------------------------





References:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.