From 99d109399a11ce817ef6c918edd84d1230901ad6 Mon Sep 17 00:00:00 2001 From: "Juan D. Vega" Date: Wed, 29 Nov 2017 09:35:48 +0100 Subject: [PATCH 1/6] Create mvn.md --- pages/common/mvn.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pages/common/mvn.md diff --git a/pages/common/mvn.md b/pages/common/mvn.md new file mode 100644 index 000000000..f5e4d6036 --- /dev/null +++ b/pages/common/mvn.md @@ -0,0 +1,17 @@ +# mvn + +> Runnign Apache Maven. + +- Most common usage is to invoke a life cicle phase: + +`mvn package` +`mvn install` +`mvn deploy` + +- Invoke more that one phase with arguments: + +`mvn clean -P a_profile package clean` + +- Running an spring boot project with remote debug: + +`mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"` From cb9dd064e1677ebc035c6bb49fdf7f89a3ad5c55 Mon Sep 17 00:00:00 2001 From: "Juan D. Vega" Date: Wed, 29 Nov 2017 09:42:02 +0100 Subject: [PATCH 2/6] Update mvn.md --- pages/common/mvn.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/common/mvn.md b/pages/common/mvn.md index f5e4d6036..a295c84c5 100644 --- a/pages/common/mvn.md +++ b/pages/common/mvn.md @@ -12,6 +12,14 @@ `mvn clean -P a_profile package clean` +- Ouput all debug information: + +`mvn -X clean -P a_profile package clean` + +- Use an alternative pom o directory: + +`mvn -f path/to/other/pom.xml clean` + - Running an spring boot project with remote debug: `mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"` From 4e4c632820c005ca439d713a44368df6e96fe115 Mon Sep 17 00:00:00 2001 From: "Juan D. Vega" Date: Wed, 29 Nov 2017 14:08:23 +0100 Subject: [PATCH 3/6] Update mvn.md --- pages/common/mvn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/mvn.md b/pages/common/mvn.md index a295c84c5..9a6862645 100644 --- a/pages/common/mvn.md +++ b/pages/common/mvn.md @@ -20,6 +20,6 @@ `mvn -f path/to/other/pom.xml clean` -- Running an spring boot project with remote debug: +- Run a spring boot project with remote debug: `mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"` From ea10d748b06caad89c2120120e9308cf4654175f Mon Sep 17 00:00:00 2001 From: "Juan D. Vega" Date: Fri, 1 Dec 2017 12:00:44 +0100 Subject: [PATCH 4/6] Update mvn.md --- pages/common/mvn.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pages/common/mvn.md b/pages/common/mvn.md index 9a6862645..0137bf93e 100644 --- a/pages/common/mvn.md +++ b/pages/common/mvn.md @@ -1,12 +1,10 @@ # mvn -> Runnign Apache Maven. +> Apache Maven. A build automation tool used for JVM environment projects. - Most common usage is to invoke a life cicle phase: `mvn package` -`mvn install` -`mvn deploy` - Invoke more that one phase with arguments: From 9daf498da909ee6fe09e4cbe5a9e9cfd62e25569 Mon Sep 17 00:00:00 2001 From: jdvega Date: Tue, 12 Dec 2017 15:21:07 +0100 Subject: [PATCH 5/6] change example, change order and inprove descriptions --- pages/common/mvn.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pages/common/mvn.md b/pages/common/mvn.md index 0137bf93e..2f4a23230 100644 --- a/pages/common/mvn.md +++ b/pages/common/mvn.md @@ -1,23 +1,24 @@ # mvn -> Apache Maven. A build automation tool used for JVM environment projects. +> Apache Maven. +> Tool for building and managing Java-based projects. -- Most common usage is to invoke a life cicle phase: +- Compile and build release package: `mvn package` -- Invoke more that one phase with arguments: +- Execute with debug information: -`mvn clean -P a_profile package clean` +`mvn -X package` -- Ouput all debug information: +- Use an alternative POM(Project Object Model): -`mvn -X clean -P a_profile package clean` +`mvn -f {{path/to/custom_pom.xml}} compile` -- Use an alternative pom o directory: +- Invoke more that one Lifecycle phase with arguments: -`mvn -f path/to/other/pom.xml clean` +`mvn clean -P {{a_profile}} package clean` -- Run a spring boot project with remote debug: +- Run a class with a main method: -`mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"` +`mvn exec:java -Dexec.mainClass="{{com.example.Main}}" -Dexec.args="{{arg1 arg2}}"` From 524b30871267cdc44eb290ab850ca505af28112e Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Wed, 13 Dec 2017 11:43:18 +0530 Subject: [PATCH 6/6] Restructuring the entire page --- pages/common/mvn.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pages/common/mvn.md b/pages/common/mvn.md index 2f4a23230..73858ab4e 100644 --- a/pages/common/mvn.md +++ b/pages/common/mvn.md @@ -3,21 +3,33 @@ > Apache Maven. > Tool for building and managing Java-based projects. -- Compile and build release package: +- Compile a project: + +`mvn compile` + +- Compile and package the compiled code in its distributable format, such as a `jar`: `mvn package` -- Execute with debug information: +- Compile and package, skipping unit tests: -`mvn -X package` +`mvn package -Dmaven.test.skip=true` -- Use an alternative POM(Project Object Model): +- Install the built package in local maven repository. (This will invoke the compile and package commands too): -`mvn -f {{path/to/custom_pom.xml}} compile` +`mvn install` -- Invoke more that one Lifecycle phase with arguments: +- Delete build artifacts from the target folder: -`mvn clean -P {{a_profile}} package clean` +`mvn clean` + +- Do a clean and then invoke the package phase: + +`mvn clean package` + +- Clean and then package the code with a given build profile: + +`mvn clean -P{{profile}} package` - Run a class with a main method: