[[mavenguide]]
= A Very Short Maven Guide
:author: Artur Hefczyc <artur.hefczyc@tigase.net>
:version: v2.1 September 2017. Reformatted for v8.0.0.

:toc:
:numbered:
:website: http://tigase.net/

If you don't use link:http://maven.apache.org/[Maven] at all or use it once a year you may find the document a useful maven commands reminder:

== Snapshot Compilation and Snapshot Package Generation
- `mvn compile` - compilation of the snapshot package
- `mvn package` - create snapshot jar file
- `mvn install` - install in local repository snapshot jar file
- `mvn deploy` - deploy to the remote repository snapshot jar file

== Release Compilation, Generation

- `mvn release:prepare` prepare the project for a new version release
- `mvn release:perform` execute new version release generation

== Generating tar.gz, tar.bz2 File With Sources Only

- `mvn -DdescriptorId=src assembly:assembly`

Any of these commands will work when your commandline is in a directory with a pom.xml file.  This file will instruct what Maven will do.

== Profiles
Maven uses profiles with the -P switch to tell what to compile and build.  Tigase uses two different profiles:

- -Pdist - creates distribution archives
- -Pdoc - creates documentation
