From de12ea9f2c59f4654c36e291e1f8160948d533eb Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Wed, 12 May 2021 12:03:33 +0700 Subject: Add information required by Maven Central to public artifact POMs This is another step away from manual deployment towards Maven-triggered deployment for both releases and snapshots. The 5 main POMs (matcher, runtime, weaver, tools, installer) now contain information required by Sonatype for Maven Central deployments according to: https://central.sonatype.org/publish/requirements/ TODO: - Add corresponding 'distributionManagement' section and necessary release plugins for Sonatype OSS repositories to parent POM. - Enable Maven to also use Install plugin in order to automatically set release versions, commit to Git and tag releases, then upgrade to a new snapshot afterwards. - Make sure that Flatten Maven plugin does not strip off the required tags we just added to the POMs. It looks as if the chosen flattenMode=oss already retains the exact tags we need, only slightly reformatting (hence "uglifying") the POM. But an ugly POM does not block Maven Central deployments, as long as it is complete. So it looks as if this to-do item is already done. Signed-off-by: Alexander Kriegisch --- aspectjtools/pom.xml | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'aspectjtools') diff --git a/aspectjtools/pom.xml b/aspectjtools/pom.xml index edd60f711..2941aab3e 100644 --- a/aspectjtools/pom.xml +++ b/aspectjtools/pom.xml @@ -1,6 +1,5 @@ - 4.0.0 @@ -11,7 +10,42 @@ aspectjtools + AspectJ Tools (Compiler) + + AspectJ tools most notably contains the AspectJ compiler (AJC). AJC applies aspects to Java classes during + compilation, fully replacing Javac for plain Java classes and also compiling native AspectJ or annotation-based + @AspectJ syntax. Furthermore, AJC can weave aspects into existing class files in a post-compile binary weaving step. + This library is a superset of AspectJ weaver and hence also of AspectJ runtime. + + https://www.eclipse.org/aspectj/ + + + + Eclipse Public License - v 1.0 + http://www.eclipse.org/legal/epl-v10.html + repo + + + + + + aclement + Andy Clement + aclement@vmware.com + + + kriegaex + Alexander Kriegisch + kriegaex@aspectj.dev + + + + + https://github.com/eclipse/org.aspectj + scm:git:https://github.com/eclipse/org.aspectj.git + scm:git:ssh://git@github.com:eclipse/org.aspectj.git + -- cgit v1.2.3 From c6155643d6576449f7f721e0ca26a7be9c9dc93a Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Sat, 15 May 2021 10:19:08 +0700 Subject: 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 --- asm-renamed/pom.xml | 97 +++++++++++++++++++++++++++++++++--- aspectjmatcher/pom.xml | 72 ++++++++++++++++++++++++++ aspectjrt/pom.xml | 70 +++++++++++++++++++++++--- aspectjtools/pom.xml | 133 +++++++++++++++++++++++++++++++++++++++++++++++-- aspectjweaver/pom.xml | 60 ++++++++++++++++++++++ lib/pom.xml | 1 - pom.xml | 119 +++++++++++++++++++++++++++++++++---------- runtime/pom.xml | 1 - 8 files changed, 507 insertions(+), 46 deletions(-) (limited to 'aspectjtools') diff --git a/asm-renamed/pom.xml b/asm-renamed/pom.xml index a94b1863c..e62b98565 100644 --- a/asm-renamed/pom.xml +++ b/asm-renamed/pom.xml @@ -19,20 +19,52 @@ using Maven Shade Plugin. In order to avoid committing the binary to the AspectJ SCM repository and using it as a system-scoped dependency, we - deploy it to aspectj.dev. + deploy it to and Sonatype OSSRH separately, promoting releases to Maven Central. From there it can be consumed by + the main AspectJ build. Whenever it is necessary to upgrade to a new ASM version in order to make AspectJ compatible with a new Java - version, please build and deploy this module after upgrading property 'asm.version'. Make sure you have the - credentials for write access to the aspectj.dev Maven repository WebDAV share and the correct server, profile and - property entries in settings.xml. - - Then you should be able to run 'mvn clean deploy' for this module and be fine. + version, please build and deploy this module after upgrading property 'asm.version'. Caveat for IntelliJ IDEA: The project cannot be built in IDEA (Ctrl-F9) if this module is visible in the Maven view. If so, right-click it and select "Unlink Maven Projects". Unfortunately, "Ignore Projects" is not enough. If Maven knows of this Maven module, it cannot compile other modules depending on shaded class names, because it cannot find the binaries. IDEA will just stop looking at the local Maven repository in this case. + https://www.eclipse.org/aspectj/ + + + + + BSD-3-Clause + https://asm.ow2.io/license.html + + + + + + + aclement + Andy Clement + aclement@vmware.com + + + kriegaex + Alexander Kriegisch + kriegaex@aspectj.dev + + + + + https://github.com/eclipse/org.aspectj + scm:git:https://github.com/eclipse/org.aspectj.git + scm:git:ssh://git@github.com:eclipse/org.aspectj.git + @@ -110,6 +142,7 @@ maven-shade-plugin true + false false @@ -147,6 +180,55 @@ + + org.codehaus.mojo + truezip-maven-plugin + + + unzip-relocated-sources + package + + copy + + + + ${maven.javadoc.skip} + true + + ${project.build.directory}/${project.build.finalName}-sources.jar + ${project.build.directory}/unpacked-sources + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + javadoc-jar + package + + jar + + + ${project.build.directory}/unpacked-sources + + none + aj + 8 + + + + + org.codehaus.mojo flatten-maven-plugin @@ -160,9 +242,10 @@ flatten - defaults + oss remove + remove ${project.build.directory} flattened-pom.xml diff --git a/aspectjmatcher/pom.xml b/aspectjmatcher/pom.xml index e0cd44e8a..ff456caa1 100644 --- a/aspectjmatcher/pom.xml +++ b/aspectjmatcher/pom.xml @@ -157,6 +157,59 @@ + + org.codehaus.mojo + truezip-maven-plugin + + + unzip-relocated-sources + package + + copy + + + + ${maven.javadoc.skip} + true + + ${project.build.directory}/${project.build.finalName}-sources.jar + ${project.build.directory}/unpacked-sources + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + javadoc-jar + package + + jar + + + ${project.build.directory}/unpacked-sources + + org.aspectj + + none + + true + + 8 + + + + + org.codehaus.mojo @@ -184,4 +237,23 @@ + + + + org.aspectj + util + ${project.version} + + + org.aspectj + bridge + ${project.version} + + + org.aspectj + org.aspectj.matcher + ${project.version} + + + diff --git a/aspectjrt/pom.xml b/aspectjrt/pom.xml index 0d6808a4d..c674b3601 100644 --- a/aspectjrt/pom.xml +++ b/aspectjrt/pom.xml @@ -50,14 +50,6 @@ false - - - org.aspectj - runtime - ${project.version} - - - @@ -158,6 +150,59 @@ + + org.codehaus.mojo + truezip-maven-plugin + + + unzip-relocated-sources + package + + copy + + + + ${maven.javadoc.skip} + true + + ${project.build.directory}/${project.build.finalName}-sources.jar + ${project.build.directory}/unpacked-sources + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + javadoc-jar + package + + jar + + + ${project.build.directory}/unpacked-sources + + org.aspectj + + none + + true + + 8 + + + + + org.codehaus.mojo @@ -185,4 +230,13 @@ + + + + org.aspectj + runtime + ${project.version} + + + diff --git a/aspectjtools/pom.xml b/aspectjtools/pom.xml index 2941aab3e..03bb6ed96 100644 --- a/aspectjtools/pom.xml +++ b/aspectjtools/pom.xml @@ -174,6 +174,66 @@ + + org.codehaus.mojo + truezip-maven-plugin + + + unzip-relocated-sources + package + + copy + + + + ${maven.javadoc.skip} + true + + + ${project.build.directory}/${project.build.finalName}-sources.jar/org/aspectj + ${project.build.directory}/unpacked-sources/org/aspectj + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + javadoc-jar + package + + jar + + + + ${project.build.directory}/unpacked-sources + + org.aspectj + + none + + true + + 8 + + + + + org.codehaus.mojo @@ -198,23 +258,88 @@ - + org.aspectj - org.aspectj.ajdt.core + org.eclipse.jdt.core + + + org.aspectj + asm-renamed + + + org.aspectj + runtime ${project.version} org.aspectj - org.eclipse.jdt.core + weaver + ${project.version} org.aspectj - asm-renamed + util + ${project.version} + + + org.aspectj + bridge + ${project.version} + + + org.aspectj + asm + ${project.version} + + + org.aspectj + org.aspectj.matcher + ${project.version} + + + org.aspectj + bcel-builder + ${project.version} + + + org.aspectj + loadtime + ${project.version} + + + org.aspectj + ajbrowser + ${project.version} + + + org.aspectj + ajde + ${project.version} + + + org.aspectj + ajde.core + ${project.version} + + + org.aspectj + ajdoc + ${project.version} + + + org.aspectj + org.aspectj.ajdt.core + ${project.version} + + + org.aspectj + taskdefs + ${project.version} diff --git a/aspectjweaver/pom.xml b/aspectjweaver/pom.xml index 806622208..4db51b332 100644 --- a/aspectjweaver/pom.xml +++ b/aspectjweaver/pom.xml @@ -175,6 +175,66 @@ + + org.codehaus.mojo + truezip-maven-plugin + + + unzip-relocated-sources + package + + copy + + + + ${maven.javadoc.skip} + true + + + ${project.build.directory}/${project.build.finalName}-sources.jar/org/aspectj + ${project.build.directory}/unpacked-sources/org/aspectj + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + javadoc-jar + package + + jar + + + + ${project.build.directory}/unpacked-sources + + org.aspectj + + none + + true + + 8 + + + + + org.codehaus.mojo diff --git a/lib/pom.xml b/lib/pom.xml index 807d8a344..a8cddc23a 100644 --- a/lib/pom.xml +++ b/lib/pom.xml @@ -355,7 +355,6 @@ org.codehaus.mojo truezip-maven-plugin - 1.2 UTF-8 UTF-8 + true + + true + 3.25.0-SNAPSHOT 9.1 @@ -35,29 +39,23 @@ - - aspectj-dev-deploy - AspectJ.dev WebDAV Releases - - ${aspectj.dev.webdav.share} - false - - aspectj-dev-deploy - AspectJ.dev WebDAV Snapshots - - ${aspectj.dev.webdav.share} - true + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + 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. + --> central Central Repository @@ -89,11 +87,11 @@ + 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. + --> central Central Repository @@ -188,6 +186,25 @@ --add-opens java.base/java.lang=ALL-UNNAMED + + release + + + false + + + + + org.apache.maven.plugins + maven-gpg-plugin + + + org.sonatype.plugins + nexus-staging-maven-plugin + + + + @@ -298,6 +315,58 @@ flatten-maven-plugin 1.2.2 + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + maven-deploy-plugin + 2.8.2 + + + default-deploy + deploy + + deploy + + + + + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + ossrh + https://oss.sonatype.org/ + false + + + + org.codehaus.mojo + truezip-maven-plugin + 1.2 + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + diff --git a/runtime/pom.xml b/runtime/pom.xml index 7607e2823..ff4c8836d 100644 --- a/runtime/pom.xml +++ b/runtime/pom.xml @@ -16,7 +16,6 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.0.1 -- cgit v1.2.3 From fcb563dee0a426645cc9c1935869ac8e79f2426c Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Sat, 15 May 2021 17:34:15 +0700 Subject: Fix selective Nexus deployment to Sonatype OSSRH Other than Maven Deploy, Nexus Staging plugin cannot just be added to the 'build/plugins' section of the parent POM once and (de-)activated with a simple property like 'maven.deploy.skip' on a per-module basis. See also https://issues.sonatype.org/browse/OSSRH-68966. Consequently, we do not add it to the parent but separately to each module meant to be published. Signed-off-by: Alexander Kriegisch --- asm-renamed/pom.xml | 6 ++++++ aspectjmatcher/pom.xml | 6 ++++++ aspectjrt/pom.xml | 6 ++++++ aspectjtools/pom.xml | 7 +++++++ aspectjweaver/pom.xml | 6 ++++++ pom.xml | 16 ++++++++-------- 6 files changed, 39 insertions(+), 8 deletions(-) (limited to 'aspectjtools') diff --git a/asm-renamed/pom.xml b/asm-renamed/pom.xml index e62b98565..6a7b479b4 100644 --- a/asm-renamed/pom.xml +++ b/asm-renamed/pom.xml @@ -254,6 +254,12 @@ + + + org.sonatype.plugins + nexus-staging-maven-plugin + + diff --git a/aspectjmatcher/pom.xml b/aspectjmatcher/pom.xml index ff456caa1..6dd942809 100644 --- a/aspectjmatcher/pom.xml +++ b/aspectjmatcher/pom.xml @@ -235,6 +235,12 @@ + + + org.sonatype.plugins + nexus-staging-maven-plugin + + diff --git a/aspectjrt/pom.xml b/aspectjrt/pom.xml index c674b3601..bc5e36e59 100644 --- a/aspectjrt/pom.xml +++ b/aspectjrt/pom.xml @@ -228,6 +228,12 @@ + + + org.sonatype.plugins + nexus-staging-maven-plugin + + diff --git a/aspectjtools/pom.xml b/aspectjtools/pom.xml index 03bb6ed96..78b8539f5 100644 --- a/aspectjtools/pom.xml +++ b/aspectjtools/pom.xml @@ -258,6 +258,13 @@ + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + diff --git a/aspectjweaver/pom.xml b/aspectjweaver/pom.xml index 4db51b332..5e4ec2e40 100644 --- a/aspectjweaver/pom.xml +++ b/aspectjweaver/pom.xml @@ -260,6 +260,12 @@ + + + org.sonatype.plugins + nexus-staging-maven-plugin + + diff --git a/pom.xml b/pom.xml index 8e1405f64..9ea49b191 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ true - + true @@ -189,7 +189,7 @@ release - + false @@ -198,10 +198,6 @@ org.apache.maven.plugins maven-gpg-plugin - - org.sonatype.plugins - nexus-staging-maven-plugin - @@ -351,6 +347,12 @@ + org.sonatype.plugins nexus-staging-maven-plugin 1.6.8 @@ -359,8 +361,6 @@ ossrh https://oss.sonatype.org/ false - - ${maven.deploy.skip} -- cgit v1.2.3