Build Resources
Resources for building Inscope Metrics projects.
Usage
Appassembler
The recommended way to consume the Appassembler resource is through the Inscope Metrics Parent Pom. However, manual configuration is pretty straight-forward; after exploding the contents of the build-resources artifact simply configure Appassembler like this:
<configuration>
<unixScriptTemplate>${project.basedir}/target/build-resources/unixBinTemplate</unixScriptTemplate>
</configuration>
Checkstyle / Findbugs
The recommended way to consume the Checkstyle and Findbugs resources is through the Inscope Metrics Parent Pom. Nevertheless, it is possible to use these build resources without using the parent-pom or even without using Maven. However, this is not trivial and is therefore not documented here and not recommended.
IntelliJ
If your project uses the Inscope Metrics Parent Pom then the build-resources are extracted into your target/build-resources directory by default. You can import the IntelliJ configuration from there or download it from this repository.
To add code style configuration:
- Open IntelliJ Preferences
- Browse to: Editor / Code Style / Java
- Click the gear drop down button near the top
- Select the "Import Scheme" option
- Locate the file target/build-resources/intellij-code-style.xml
To add inspections configuration:
- Open IntelliJ Preferences
- Browse to: Editor / Inspections
- Click the gear drop down button near the top
- Select the "Import Scheme" option
- Locate the file target/build-resources/intellij-inspections.xml
Building
This project uses the Inscope Metrics Parent Pom with the JDK Wrapper and the Maven Wrapper enabled. While you can conjure up the correct build command, the Inscope Metrics Parent Pom includes a simple script to detect the appropriate build tools and invoke them for you.
Prerequisites:
- JDK8 (Or Invoke with JDK Wrapper)
Building:
> mvn verify
To use the local version you must first install it locally:
> mvn 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.
Releasing
This project is versioned using semantic versioning please consult the commit history to determine the next appropriate release version. Next, simply invoke the Maven Release plugin which will interactively query for the version of the artifact to release:
> mvn release:prepare && mvn release:clean && git pull
The plugin will update the version and SCM tag in pom.xml automatically based on your input and then commit the changes to source control. When releasing the build system (e.g. Travis) must execute the deploy lifecycle, enable the release profile, and provide the settings.xml file:
> mvn deploy -P release --settings settings.xml
License
Published under Apache Software License 2.0, see LICENSE
© Inscope Metrics Incorporated, 2018