From d35885bc5faef4936aa5c4207da8f9a3a855630a Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Fri, 16 Apr 2021 12:14:31 +0700 Subject: [PATCH] Use dependencies instead of copies under 'lib' for assemblies This is one step to get rid of org.aspectj:org.eclipse.jdt.core and org.aspectj:asm-renamed in the 'lib' directory. AspectJ tools + weaver uber JAR builds now use dependencies in the POM in order to deal with creating binary + source assemblies. They no longer rely on manually updated copies under 'lib'. Details: - Binaries are copied via 'dependencySets' in the assembly descriptor. - Sources are unzipped via Maven Dependency Plugin before including them into the source uber JAR via assembly descriptor. - NEW: This also includes ASM-renamed sources which so far were ignored. It is a positive side-effect from the fact that for ASM-renamed Maven Shade automatically creates a source JAR. - Maven Ant Run is no longer used for unzipping binary + source JARs. - While working in parallel with JDT Core and AspectJ it is now much easier to produce up to date artifacts, e.g. for consumption by AJDT, because it does not matter anymore if we forget to run the build in module 'lib' in order to update the JDT Core copy. Status quo: - Folder lib/asm is no longer used and will be removed in a subsequent commit. - Folder lib/jdtcore-aj is no longer used by the Maven build, but still referenced in a few UNIX shell scripts and Ant build files. TODO: Find out if those are still actively used. If yes, refactor them to look for the file in the local Mavven repository. Otherwise, delete the referencing files and also lib/jdtcore-aj. Signed-off-by: Alexander Kriegisch --- aspectjmatcher/aspectjmatcher-assembly.xml | 8 +- .../aspectjmatcher-sources-assembly.xml | 6 +- aspectjmatcher/pom.xml | 26 ------- aspectjrt/aspectjrt-assembly.xml | 4 +- aspectjrt/aspectjrt-sources-assembly.xml | 6 +- aspectjtools/aspectjtools-assembly.xml | 34 ++++---- .../aspectjtools-sources-assembly.xml | 22 +++--- aspectjtools/pom.xml | 77 +++++++------------ aspectjweaver/aspectjweaver-assembly.xml | 26 +++---- .../aspectjweaver-sources-assembly.xml | 11 ++- aspectjweaver/pom.xml | 46 +++++------ installer/aspectjinstaller-assembly.xml | 6 +- 12 files changed, 107 insertions(+), 165 deletions(-) diff --git a/aspectjmatcher/aspectjmatcher-assembly.xml b/aspectjmatcher/aspectjmatcher-assembly.xml index 2a95e6fd1..3146028d2 100644 --- a/aspectjmatcher/aspectjmatcher-assembly.xml +++ b/aspectjmatcher/aspectjmatcher-assembly.xml @@ -1,13 +1,13 @@ - + xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> aspectjmatcher - + jar - + false diff --git a/aspectjmatcher/aspectjmatcher-sources-assembly.xml b/aspectjmatcher/aspectjmatcher-sources-assembly.xml index cb55a4667..c3f925a4a 100644 --- a/aspectjmatcher/aspectjmatcher-sources-assembly.xml +++ b/aspectjmatcher/aspectjmatcher-sources-assembly.xml @@ -1,8 +1,8 @@ - + xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> - sources +aspectjmatcher-sources jar diff --git a/aspectjmatcher/pom.xml b/aspectjmatcher/pom.xml index 06597f41c..3aa998b6c 100644 --- a/aspectjmatcher/pom.xml +++ b/aspectjmatcher/pom.xml @@ -29,32 +29,6 @@ - - - org.apache.maven.plugins maven-assembly-plugin diff --git a/aspectjrt/aspectjrt-assembly.xml b/aspectjrt/aspectjrt-assembly.xml index d4108da92..5c3e41713 100644 --- a/aspectjrt/aspectjrt-assembly.xml +++ b/aspectjrt/aspectjrt-assembly.xml @@ -1,6 +1,6 @@ - + xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> aspectjrt diff --git a/aspectjrt/aspectjrt-sources-assembly.xml b/aspectjrt/aspectjrt-sources-assembly.xml index ec393398e..b4c13e2a9 100644 --- a/aspectjrt/aspectjrt-sources-assembly.xml +++ b/aspectjrt/aspectjrt-sources-assembly.xml @@ -1,8 +1,8 @@ - + xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> - sources +aspectjrt-sources jar diff --git a/aspectjtools/aspectjtools-assembly.xml b/aspectjtools/aspectjtools-assembly.xml index 310dbe098..fbf45c808 100644 --- a/aspectjtools/aspectjtools-assembly.xml +++ b/aspectjtools/aspectjtools-assembly.xml @@ -1,15 +1,25 @@ - + xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> aspectjtools - + jar false + + + true + + org.aspectj:org.eclipse.jdt.core + org.aspectj:asm-renamed + + + + @@ -70,16 +80,7 @@ META-INF/maven/** - - target/asm-unzipped - . - - META-INF/maven/** - org/** - META-INF/MANIFEST.MF - - - + ../ajbrowser/target/classes @@ -123,13 +124,6 @@ META-INF/maven/** - - target/jdtcore-unzipped - . - - META-INF/MANIFEST.MF - - diff --git a/aspectjtools/aspectjtools-sources-assembly.xml b/aspectjtools/aspectjtools-sources-assembly.xml index a382e5e8b..7b54c09b2 100644 --- a/aspectjtools/aspectjtools-sources-assembly.xml +++ b/aspectjtools/aspectjtools-sources-assembly.xml @@ -1,8 +1,8 @@ - + xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> - sources +aspectjtools-sources jar @@ -11,6 +11,7 @@ false + ../weaver/src/main/java . @@ -43,14 +44,8 @@ ../loadtime/src/main/java . - - - + + ../ajbrowser/src/main/java . @@ -75,10 +70,13 @@ ../taskdefs/src/main/java . + + - target/jdtcore-unzipped-src + target/unzipped-sources . + diff --git a/aspectjtools/pom.xml b/aspectjtools/pom.xml index b14b2fe01..cac9b9e2f 100644 --- a/aspectjtools/pom.xml +++ b/aspectjtools/pom.xml @@ -14,14 +14,6 @@ pom AspectJ Compiler - - - org.aspectj - org.aspectj.ajdt.core - ${project.version} - - - @@ -37,58 +29,24 @@ - org.apache.maven.plugins - maven-antrun-plugin - 3.0.0 + maven-dependency-plugin - unzipasm - prepare-package - - - - - - + unzip-dependency-sources - run + unpack-dependencies - - - - unzipjdt prepare-package - - - - - - - run - - - - - unzipjdtsrc - prepare-package - - - - - + sources + + org.eclipse.jdt.core,asm-renamed + ${project.build.directory}/unzipped-sources + + runtime - - run - @@ -176,4 +134,21 @@ + + + + org.aspectj + org.aspectj.ajdt.core + ${project.version} + + + org.aspectj + org.eclipse.jdt.core + + + org.aspectj + asm-renamed + + + diff --git a/aspectjweaver/aspectjweaver-assembly.xml b/aspectjweaver/aspectjweaver-assembly.xml index af08bc45c..4130c3c32 100644 --- a/aspectjweaver/aspectjweaver-assembly.xml +++ b/aspectjweaver/aspectjweaver-assembly.xml @@ -1,15 +1,24 @@ - + xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> aspectjweaver - + jar - + false + + + true + + org.aspectj:asm-renamed + + + + ../weaver/target/classes @@ -67,15 +76,6 @@ META-INF/maven/** - - target/asm-unzipped - . - - META-INF/maven/** - org/** - META-INF/MANIFEST.MF - - diff --git a/aspectjweaver/aspectjweaver-sources-assembly.xml b/aspectjweaver/aspectjweaver-sources-assembly.xml index 17e112d39..e1760dfe5 100644 --- a/aspectjweaver/aspectjweaver-sources-assembly.xml +++ b/aspectjweaver/aspectjweaver-sources-assembly.xml @@ -1,8 +1,8 @@ - + xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> - sources +aspectjweaver-sources jar @@ -43,12 +43,11 @@ ../loadtime/src/main/java . - - target/asm-unzipped + target/unzipped-sources . - --> diff --git a/aspectjweaver/pom.xml b/aspectjweaver/pom.xml index da4b3b233..921401691 100644 --- a/aspectjweaver/pom.xml +++ b/aspectjweaver/pom.xml @@ -14,14 +14,6 @@ pom AspectJ Weaver - - - org.aspectj - weaver - ${project.version} - - - @@ -37,26 +29,24 @@ - org.apache.maven.plugins - maven-antrun-plugin - 3.0.0 + maven-dependency-plugin - unzipasm + unzip-dependency-sources + + unpack-dependencies + prepare-package - - - - + sources + + asm-renamed + ${project.build.directory}/unzipped-sources + + runtime - - run - @@ -82,7 +72,6 @@ true - org/aspectj/weaver/ @@ -148,4 +137,17 @@ + + + + org.aspectj + weaver + ${project.version} + + + org.aspectj + asm-renamed + + + diff --git a/installer/aspectjinstaller-assembly.xml b/installer/aspectjinstaller-assembly.xml index 2927dd618..f7255b345 100644 --- a/installer/aspectjinstaller-assembly.xml +++ b/installer/aspectjinstaller-assembly.xml @@ -1,6 +1,6 @@ - + xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> aspectjinstaller @@ -20,7 +20,7 @@ ../aj-build/dist/docs files - + ../runtime/target/site/apidocs files/doc/runtime-apidocs -- 2.39.5