Parent POM for Wren Security projects provides default plugin definition and project build configuration.
When updating the POM keep in mind following conventions:
- all plugins MUST be defined using explicit version to make builds reproducible (i.e. no version ranges)
- all plugins MUST have full coordinates inside
<pluginManagement>
section (i.e. no loose plugin references from<profiles>
section) - plugin version SHOULD be defined using maven property to allow simple version override
- plugin definitions inside the POM are sorted alphabetically by artifact ID
- plugin definitions can contain processing instructions for m2e lifecycle
- plugin artifact signatures are verified during the build so make sure all the keys are trusted
TODO document important (worth mentioning) plugin configuration
Available profiles:
clirr
- TODO documentenforce
- runs Maven Enforcer Plugin (active by default)full-release
- creates and attaches javadoc and source JARs as project artifactsmetrics
- runs various project reporting plugins (FindBugs, JaCoCo, PMD)precommit
- runs Maven Checkstyle Pluginsign
- generate GPG signaturesverify-artifact-sigs
- verifies artifacti signatures (active by default)
Projects that are supposed to generate OSGi bundles have to include at least the following plugin configuration:
<build>
<plugins>
<!-- Include maven-bundle-plugin in the build process -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
</plugin>
<!-- Make maven-jar-plugin use manifest generated by the bundle plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</build>
Show available version updates:
mvn versions:display-plugin-updates
mvn versions:display-dependency-updates
mvn versions:use-latest-versions
Dependency version check (useful when updating):
mvn dependency:resolve -DoutputFile=dependencies.txt
mvn dependency:resolve-plugins -DoutputFile=plugin-dependencies.txt
OSGi version check (useful when updating):
bnd print -Cci target/*.jar