Skip to content

matthayter/arpnetworking-parent-pom

 
 

Repository files navigation

Parent Pom

License: Apache 2 Travis Build Maven Artifact

A parent pom for projects.

Leveraging the Parent Pom

Add Dependency

Determine the latest version of the parent pom in Maven Central.

Maven

Set the parent to your pom:

<parent>
    <groupId>com.arpnetworking.build</groupId>
    <artifactId>arpnetworking-parent-pom</artifactId>
    <version>VERSION</version>
</parent>

The Maven Central repository is included by default.

Checkstyle

The checkstyle configuration is obtained from the build-resources package. The checkstyle mojo is executed as part of the verify lifecycle. However, the mojo can also be executed directly. In order to execute the checkstyle mojo directly you need to also ensure the build-resources are extracted.

project> mvn dependency:unpack-dependencies checkstyle:check

Maven Wrapper

The parent pom enables the use of Maven Wrapper in child projects and it also uses Maven Wrapper itself. In order to ensure consistent builds you should invoke mvnw instead of mvn to build the project locally and from continuous integration.

To allow developers to build wrapper and unwrapper projects seamlessly you can use this shell script to invoke either mvnw or mvn depending on which is available. Simply copy the script, make it executable and ensure it is first on PATH. Now continue to invoke mvn and it will actually run mvnw if available in the current project.

#!/bin/bash

# Look for maven wrapper
if [ -f "./mvnw" ]; then
  echo "Maven wrapper found; invoking mvnw"
  echo "./mvnw $@"
  ./mvnw "$@"
else
  echo "Maven wrapper not found; invoking mvn"
  /usr/local/bin/mvn "$@"
fi

Building

Prerequisites:

Building:

arpnetworking-parent-pom> ./mvnw verify

To use the local version you must first install it locally:

arpnetworking-parent-pom> ./mvnw install

You can determine the version of the local build from the pom file. Using the local version is intended only for testing or development.

License

Published under Apache Software License 2.0, see LICENSE

© Arpnetworking Inc., 2015

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 54.9%
  • Batchfile 45.1%