Base Maven projects on this artifact and you will get many pre-configuration benefits, including up-to-date dependencies, plugins, build extensions, repositories, and more.
All that you need to do is to define our artifact as a parent of your project:
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.maxur</groupId>
<artifactId>maxur-base</artifactId>
<version>1.01</version>
</parent>
<groupId>your-group-id</groupId>
<artifactId>your-artifact-id</artifactId>
<version>1.2.3-SNAPSHOT</version>
[...]
</project>
Name | Description | Value | Default Value |
---|---|---|---|
env | Target environment | dev, qa, prod | dev |
project.root | For multi-module projects it is the root project path | path | . |
site.path | Path to Project Site's sources | path | . |
project.jdk | The version of JDK. | java version | 1.8 |
snapshot.allowed.artifacts | List of dependency patterns to exclude when checking for snapshot versions | list of patterns | org.maxur:* |
The profile is activated automatically when you have the target environment as production.
$ mvn clean install -Denv=prod
Generate an announcement from the announcement template
This profile can be activated manually:
$ mvn clean install -Pgh-pages
You can deploy site without SSH key by OAuth Token.
settings.xml
<server>
<id>github</id>
<password>OAuthToken</password>
</server>
It configures site deployment to github pages. See http://pages.github.com/
Sign artifacts before installation with GPG. To enable this profile you should have "gpg.keyname" property defined.
[maven-gpg-plugin] (https://maven.apache.org/plugins/maven-gpg-plugin/) used to GPG-sign the artifact before deployment to foreign
repository. GPG keys have to be provided in CI environment, and published beforehand.
http://www.sonatype.com/people/2010/01/how-to-generate-pgp-signatures-with-maven/
The profile is activated automatically when you have the target environment as qa. This profile can be activated manually:
$ mvn clean install -Pinspect
It runs a number of checks to make sure the quality of the build is acceptable.
These plugins are used at the moment to control quality and prevent errors
[maven-duplicate-finder-plugin] (https://github.com/basepom/duplicate-finder-maven-plugin) is a filter of duplicate classes and resources in classpath. It helps to identify dependencies that are not used, or the ones that are used but not defined.
[maven-checkstyle-plugin] (https://maven.apache.org/plugins/maven-checkstyle-plugin) generates a report regarding the code style used by the developers. For more information about Checkstyle, see http://checkstyle.sourceforge.net/
All plugins are bound to the verify Maven phase. All executions are named maxur-check.
This profile can be activated manually:
It configures kotlin dependencies
This profile can be activated manually:
It configures [jacoco-maven-plugin] (http://eclemma.org/jacoco/trunk/doc/maven.html) for check and report tests coverage.
Name | Description | Value | Default Value |
---|---|---|---|
unit.tests.coverage.output.directory | The path to unit tests coverage report | path | ${project.reporting.outputDirectory}/jacoco-ut |
integration.tests.coverage.output.directory | The path to integration tests coverage report | path | ${project.reporting.outputDirectory}/jacoco-it |
The profile builds site for production environment.
The profile is activated automatically when you have a sonar.properties file in a root directory.
sonar.properties
sonar.sourceEncoding = UTF-8
sonar.language = java
sonar.host.url = http://192.168.1.1:9000
sonar.jdbc.url = jdbc:postgresql://192.168.1.1:5432/sonar
sonar.jdbc.driverClassName = org.postgresql.Driver
sonar.jdbc.username = sonar
sonar.jdbc.password = sonar
sonar.forceAnalysis = true
sonar.artifact.path=
It configures [sonar-maven-plugin] (http://docs.sonarqube.org/display/SONAR/Analyzing+with+Maven).
The profile deploys all artifacts to oss.sonatype.org repository . It also skips default deployment plugin.
The maven plugin for VersionEye helps you to create/update a project at VersionEye, which is a Notification System for Software Libraries. It will help you to keep your projects up-to-date and automatically notify you about outdated dependencies and license violations. You can check it out here: www.versioneye.com.
The profile is activated when you have src/qa/resources/versioneye.properties file in the project.
versioneye.properties
api_key = YOUR_SECRET_API_KEY
project_id = YOUR_VERSONEYE_PROJECT_ID
see versioneye_maven_plugin for more details
Switch on maven-enforcer-plugin. The Enforcer plugin provides goals to control certain environmental constraints such as Maven version, JDK version and OS family along with many more standard rules and user created rules.
Enable unit testing. The profile is activated when you have src/test/groovy directory in the project. These artifacts are automatically added to the list of dependencies (in test scope):
Enable unit testing. The profile is activated when you have src/test/java directory in the project. These artifacts are automatically added to the list of dependencies (in test scope, of course):
Enable [LOG4J2] (https://logging.apache.org/log4j/2.x/) for logging and [SLF4J] (http://www.slf4j.org/) binding. The profile is activated when you have src/test/resources/log4j2.xml.
Enable [logback] (http://logback.qos.ch/) for logging and [SLF4J] (http://www.slf4j.org/) binding. The profile is activated when you have src/test/resources/logback-test.xml.