From: Alexander Kriegisch Date: Sat, 15 May 2021 03:19:08 +0000 (+0700) Subject: Create javadoc for all public artifacts, fix dependencies X-Git-Tag: V1_9_7_M2~12^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c6155643d6576449f7f721e0ca26a7be9c9dc93a;p=aspectj.git 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 --- 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