Skip to content

Commit

Permalink
Fix: make sure that source assemblies are attached to build
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kriegaex committed Apr 16, 2021
1 parent 0e7ac59 commit 116406f
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 14 deletions.
3 changes: 2 additions & 1 deletion aspectjmatcher/aspectjmatcher-sources-assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions aspectjmatcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
<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>
Expand Down
3 changes: 2 additions & 1 deletion aspectjrt/aspectjrt-sources-assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions aspectjrt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@
</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>
Expand Down
3 changes: 2 additions & 1 deletion aspectjtools/aspectjtools-sources-assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions aspectjtools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
<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>
Expand Down
3 changes: 2 additions & 1 deletion aspectjweaver/aspectjweaver-sources-assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions aspectjweaver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
<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>
Expand Down
3 changes: 2 additions & 1 deletion installer/aspectjinstaller-assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit 116406f

Please sign in to comment.