]> source.dussan.org Git - aspectj.git/commitdiff
Fix: make sure that source assemblies are attached to build
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Fri, 16 Apr 2021 08:30:36 +0000 (15:30 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Fri, 16 Apr 2021 17:14:55 +0000 (00:14 +0700)
Previously I renamed the source assemblies from the uniform name
'sources' to something more individual like 'aspectjtools-sources', not
realising that the magic name 'sources' in combination with the default
configuration value 'appendAssemblyId=true' results in an artifact
classifier equal to the assembly ID, i.e. 'sources', which is exactly
what we need here, but not quite obvious. Therefore, I documented it
with comments in both the assemblies and the POMs.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
aspectjmatcher/aspectjmatcher-sources-assembly.xml
aspectjmatcher/pom.xml
aspectjrt/aspectjrt-sources-assembly.xml
aspectjrt/pom.xml
aspectjtools/aspectjtools-sources-assembly.xml
aspectjtools/pom.xml
aspectjweaver/aspectjweaver-sources-assembly.xml
aspectjweaver/pom.xml
installer/aspectjinstaller-assembly.xml

index c3f925a4a8dd8000cef283218abaf83a5a173638..0425ccbe852ba76a1a2a4f6fbbde5b9d176b0000 100644 (file)
@@ -2,7 +2,8 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
 
-<id>aspectjmatcher-sources</id>
+       <!-- Do not change this ID. It becomes the artifact classifier with appendAssemblyId=true. -->
+       <id>sources</id>
 
        <formats>
                <format>jar</format>
index 3aa998b6c3c1f8b9986172689417f92c9542cb9e..b183bd3d60b53392f3bc5555df52b5feab70cfdb 100644 (file)
                                                        <goal>single</goal>
                                                </goals>
                                                <configuration>
-                                                       <classifier>sources</classifier>
-                                                       <finalName>aspectjmatcher-${project.version}</finalName>
+                                                       <!-- The assembly ID 'sources' becomes the artifact classifier, exactly what we want -->
+                                                       <appendAssemblyId>true</appendAssemblyId>
                                                        <archive>
                                                        </archive>
                                                        <descriptors>
index b4c13e2a923c0f23459149f24a68f8eff5b92909..fc030c3c254a839f7df103c7ccb9c719ecbf28cd 100644 (file)
@@ -2,7 +2,8 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
 
-<id>aspectjrt-sources</id>
+       <!-- Do not change this ID. It becomes the artifact classifier with appendAssemblyId=true. -->
+       <id>sources</id>
 
        <formats>
                <format>jar</format>
index 341b83fd69d959e418c7c2d1bed589e672570dad..930ba02ca6e6eafbad4036ce9c07b55728348051 100644 (file)
                                        </execution>
 
                                        <execution>
-                                               <id>aspectjrt-src-assembly</id>
+                                               <id>aspectjrt-sources-assembly</id>
                                                <phase>package</phase>
                                                <goals>
                                                        <goal>single</goal>
                                                </goals>
                                                <configuration>
-                                                       <classifier>sources</classifier>
-                                                       <finalName>aspectjrt-${project.version}</finalName>
+                                                       <!-- The assembly ID 'sources' becomes the artifact classifier, exactly what we want -->
+                                                       <appendAssemblyId>true</appendAssemblyId>
                                                        <archive>
                                                        </archive>
                                                        <descriptors>
index 7b54c09b25be2f2bcde4b4e8e05dc7639d0a5ad3..8317c9f20f5cb201b9c5ceaa2327252a7b26ee04 100644 (file)
@@ -2,7 +2,8 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
 
-<id>aspectjtools-sources</id>
+       <!-- Do not change this ID. It becomes the artifact classifier with appendAssemblyId=true. -->
+       <id>sources</id>
 
        <formats>
                <format>jar</format>
index cac9b9e2ff13a738b889ec69a569bfed5eab90ad..62cf15ebf18a13b6573b95964dc2b93df729b09a 100644 (file)
                                                        <goal>single</goal>
                                                </goals>
                                                <configuration>
-                                                       <classifier>sources</classifier>
-                                                       <finalName>aspectjtools-${project.version}</finalName>
+                                                       <!-- The assembly ID 'sources' becomes the artifact classifier, exactly what we want -->
+                                                       <appendAssemblyId>true</appendAssemblyId>
                                                        <archive>
                                                        </archive>
                                                        <descriptors>
index e1760dfe51707f390e1804b963995126cdebeb77..61d89a71e019831540db3b58f0acc2778d1b9de6 100644 (file)
@@ -2,7 +2,8 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
 
-<id>aspectjweaver-sources</id>
+       <!-- Do not change this ID. It becomes the artifact classifier with appendAssemblyId=true. -->
+       <id>sources</id>
 
        <formats>
                <format>jar</format>
index 9214016915c1ab1298966537e1a09949289cb258..3552ab630a5c8970bb3e0d4e6aaa09b8e89404aa 100644 (file)
                                                        <goal>single</goal>
                                                </goals>
                                                <configuration>
-                                                       <classifier>sources</classifier>
-                                                       <finalName>aspectjweaver-${project.version}</finalName>
+                                                       <!-- The assembly ID 'sources' becomes the artifact classifier, exactly what we want -->
+                                                       <appendAssemblyId>true</appendAssemblyId>
                                                        <archive>
                                                        </archive>
                                                        <descriptors>
index f7255b34563be34ec3dd894d13c435f6a2255fb0..2a5cfac7b447d1cf4ef0642db129625193282745 100644 (file)
@@ -3,9 +3,11 @@
        xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
 
        <id>aspectjinstaller</id>
+
        <formats>
                <format>jar</format>
        </formats>
+
        <includeBaseDirectory>false</includeBaseDirectory>
 
        <fileSets>
@@ -20,7 +22,6 @@
                        <directory>../aj-build/dist/docs</directory>
                        <outputDirectory>files</outputDirectory>
                </fileSet>
-
                <fileSet>
                        <directory>../runtime/target/site/apidocs</directory>
                        <outputDirectory>files/doc/runtime-apidocs</outputDirectory>