Skip to content

Commit

Permalink
Restructuring the entire page
Browse files Browse the repository at this point in the history
  • Loading branch information
agnivade committed Dec 13, 2017
1 parent 9daf498 commit 524b308
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions pages/common/mvn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 package -Dmaven.test.skip=true`

- Install the built package in local maven repository. (This will invoke the compile and package commands too):

`mvn install`

- Delete build artifacts from the target folder:

`mvn -X package`
`mvn clean`

- Use an alternative POM(Project Object Model):
- Do a clean and then invoke the package phase:

`mvn -f {{path/to/custom_pom.xml}} compile`
`mvn clean package`

- Invoke more that one Lifecycle phase with arguments:
- Clean and then package the code with a given build profile:

`mvn clean -P {{a_profile}} package clean`
`mvn clean -P{{profile}} package`

- Run a class with a main method:

Expand Down

1 comment on commit 524b308

@hohonuuli
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I like the changes.

Please sign in to comment.