The parent POM enables the following profiles on itself and its children:
-
publication
: generates sources and javadoc JARs. -
gpg
: signs all attached artifacts. -
local-deploy
: deploys all artifacts to a target directory defined by${local.repository.path}
The parent POM enables the following profiles on itself alone:
-
jreleaser
: creates a GitHub release with changelog.
Children projects must define values for the following properties
Given a project named foo
located at moditect/foo
:
<properties>
<project.identifier>foo</project.identifier>
<project.github.repository>moditect/foo</project.github.repository>
<java.version>1.8</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
The <scm>
block must be defined explicitly at the root of the child project, otherwise the URLs will be set to the wrong
paths. Given a project named foo
located at moditect/foo
:
<scm>
<connection>scm:git:${repository.url}</connection>
<developerConnection>scm:git:${repository.url}</developerConnection>
<url>${repository.url}</url>
<tag>HEAD</tag>
</scm>
The license-maven-plugin
must be defined at the root of the child in order to find the license header template at the
right location
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration combine.self="override">
<header>${maven.multiModuleProjectDirectory}/etc/license.txt</header>
<strictCheck>true</strictCheck>
<excludes>
<exclude>README.md</exclude>
<exclude>LICENSE.txt</exclude>
<exclude>mvnw</exclude>
<exclude>mvnw.cmd</exclude>
<exclude>.mvn/wrapper/maven-wrapper.properties</exclude>
<exclude>.mvn/wrapper/MavenWrapperDownloader.java</exclude>
<exclude>...</exclude>
</excludes>
</configuration>
</plugin>
Format license headers by invoking
$ mvn initialize license:format