diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-05-15 10:19:08 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-05-16 07:05:28 +0700 |
commit | c6155643d6576449f7f721e0ca26a7be9c9dc93a (patch) | |
tree | 159716f15695e65bdfa21c764d8741e85bcf32a7 /pom.xml | |
parent | de12ea9f2c59f4654c36e291e1f8160948d533eb (diff) | |
download | aspectj-c6155643d6576449f7f721e0ca26a7be9c9dc93a.tar.gz aspectj-c6155643d6576449f7f721e0ca26a7be9c9dc93a.zip |
Create javadoc for all public artifacts, fix dependencies
Sonatype OSSRH repository rules require source and javadoc JARs in
order to create staging repositories for releases to be promoted to
Maven Central. So I added build steps to unzip the source JARs and then
create Javadocs for them.
FIXME: This configuration works with JDK 16, but throws errors on other
JDK versions, e.g. 14. It looks as if the Maven Javadoc plugin does not
do a particularly good job applying the plugin settings in a way making
it work with different JDK javadoc tool versions. I am saying that,
because when using the tool directly on the console, it works with basic
settings and the correct classpath.
In order to enable creating uber JARs via Maven Shade in the future, I
also added missing dependencies. Maven Assembly descriptors just assume
that all the necessary class files and sources already exist where it
copies them from. But several of the dependency modules were not
explicitly listed as such by the uber JAR modules. I fixed that.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'pom.xml')
-rw-r--r-- | pom.xml | 119 |
1 files changed, 94 insertions, 25 deletions
@@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.aspectj</groupId> <artifactId>aspectj-parent</artifactId> - <packaging>pom</packaging> <version>1.9.7.BUILD-SNAPSHOT</version> + <packaging>pom</packaging> + <name>AspectJ Parent Project</name> <properties> @@ -16,8 +16,12 @@ <!-- Basic build properties --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <!-- By default, do not deploy artifacts - override for the ones which actually should be deployed --> <maven.deploy.skip>true</maven.deploy.skip> + <!-- By default, do create javadoc - override in release profile or manually --> + <maven.javadoc.skip>true</maven.javadoc.skip> + <!-- Dependency versions --> <jdt.core.version>3.25.0-SNAPSHOT</jdt.core.version> <asm.version>9.1</asm.version> @@ -35,29 +39,23 @@ </properties> <distributionManagement> - <repository> - <id>aspectj-dev-deploy</id> - <name>AspectJ.dev WebDAV Releases</name> - <!-- Please specify the local mount point for the WebDAV share in your settings.xml --> - <url>${aspectj.dev.webdav.share}</url> - <uniqueVersion>false</uniqueVersion> - </repository> <snapshotRepository> - <id>aspectj-dev-deploy</id> - <name>AspectJ.dev WebDAV Snapshots</name> - <!-- Please specify the local mount point for the WebDAV share in your settings.xml --> - <url>${aspectj.dev.webdav.share}</url> - <uniqueVersion>true</uniqueVersion> + <id>ossrh</id> + <url>https://oss.sonatype.org/content/repositories/snapshots</url> </snapshotRepository> + <repository> + <id>ossrh</id> + <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> + </repository> </distributionManagement> <repositories> <!-- - Repeat Central definition from super POM https://maven.apache.org/ref/3.6.3/maven-model-builder/super-pom.html. - Define it as the first repository to search at, otherwise Maven would always search any other repositories defined - in the POM or in settings.xml first, slowing down the build, because most artifacts reside at Maven Central. See - https://maven.apache.org/guides/mini/guide-multiple-repositories.html#repository-order for more details. - --> + Repeat Central definition from super POM https://maven.apache.org/ref/3.6.3/maven-model-builder/super-pom.html. + Define it as the first repository to search at, otherwise Maven would always search any other repositories defined + in the POM or in settings.xml first, slowing down the build, because most artifacts reside at Maven Central. See + https://maven.apache.org/guides/mini/guide-multiple-repositories.html#repository-order for more details. + --> <repository> <id>central</id> <name>Central Repository</name> @@ -89,11 +87,11 @@ <pluginRepositories> <!-- - Repeat Central definition from super POM https://maven.apache.org/ref/3.6.3/maven-model-builder/super-pom.html. - Define it as the first repository to search at, otherwise Maven would always search any other repositories defined - in the POM or in settings.xml first, slowing down the build, because most artifacts reside at Maven Central. See - https://maven.apache.org/guides/mini/guide-multiple-repositories.html#repository-order for more details. - --> + Repeat Central definition from super POM https://maven.apache.org/ref/3.6.3/maven-model-builder/super-pom.html. + Define it as the first repository to search at, otherwise Maven would always search any other repositories defined + in the POM or in settings.xml first, slowing down the build, because most artifacts reside at Maven Central. See + https://maven.apache.org/guides/mini/guide-multiple-repositories.html#repository-order for more details. + --> <pluginRepository> <id>central</id> <name>Central Repository</name> @@ -188,6 +186,25 @@ <jvm.arg.addOpens>--add-opens java.base/java.lang=ALL-UNNAMED</jvm.arg.addOpens> </properties> </profile> + <profile> + <id>release</id> + <properties> + <!-- By default, do create javadoc - override in release profile --> + <maven.javadoc.skip>false</maven.javadoc.skip> + </properties> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-gpg-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.sonatype.plugins</groupId> + <artifactId>nexus-staging-maven-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> </profiles> <build> @@ -298,6 +315,58 @@ <artifactId>flatten-maven-plugin</artifactId> <version>1.2.2</version> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-gpg-plugin</artifactId> + <version>1.6</version> + <executions> + <execution> + <id>sign-artifacts</id> + <phase>verify</phase> + <goals> + <goal>sign</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-deploy-plugin</artifactId> + <version>2.8.2</version> + <executions> + <execution> + <id>default-deploy</id> + <phase>deploy</phase> + <goals> + <goal>deploy</goal> + </goals> + </execution> + </executions> + <configuration> + <!-- Deploy at the end of a multi-module build --> + <deployAtEnd>true</deployAtEnd> + </configuration> + </plugin> + <plugin> + <groupId>org.sonatype.plugins</groupId> + <artifactId>nexus-staging-maven-plugin</artifactId> + <version>1.6.8</version> + <extensions>true</extensions> + <configuration> + <serverId>ossrh</serverId> + <nexusUrl>https://oss.sonatype.org/</nexusUrl> + <autoReleaseAfterClose>false</autoReleaseAfterClose> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>truezip-maven-plugin</artifactId> + <version>1.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.2.0</version> + </plugin> </plugins> </pluginManagement> |