Include JCTools sources for shaded classes in the sources jar (#9838)

Motivation:

We should include the shaded sources for JCTools in our sources jar to make it easier to debug.

Modifications:

- Adjust plugin configuration to execute plugins in correct order
- Update source plugin
- Add configuration for shade plugin to generate source jar content

Result:

Fixes https://github.com/netty/netty/issues/6640.
This commit is contained in:
Norman Maurer 2019-12-05 09:10:32 +01:00 committed by GitHub
parent 3d47da0aac
commit 385a17b103
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 15 deletions

View File

@ -121,6 +121,8 @@
</relocation> </relocation>
</relocations> </relocations>
<minimizeJar>true</minimizeJar> <minimizeJar>true</minimizeJar>
<createSourcesJar>true</createSourcesJar>
<shadeSourcesContent>true</shadeSourcesContent>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>

19
pom.xml
View File

@ -995,7 +995,7 @@
<plugin> <plugin>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version> <version>3.2.0</version>
<!-- Eclipse-related OSGi manifests <!-- Eclipse-related OSGi manifests
See https://github.com/netty/netty/issues/3886 See https://github.com/netty/netty/issues/3886
More information: http://rajakannappan.blogspot.ie/2010/03/automating-eclipse-source-bundle.html --> More information: http://rajakannappan.blogspot.ie/2010/03/automating-eclipse-source-bundle.html -->
@ -1013,27 +1013,16 @@
</configuration> </configuration>
<executions> <executions>
<!--
~ This workaround prevents Maven from executing the 'generate-sources' phase twice.
~ See http://jira.codehaus.org/browse/MSOURCES-13
~ and http://blog.peterlynch.ca/2010/05/maven-how-to-prevent-generate-sources.html
-->
<execution> <execution>
<id>attach-sources</id> <id>attach-sources</id>
<phase>invalid</phase> <phase>prepare-package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
<execution>
<id>attach-sources-no-fork</id>
<phase>package</phase>
<goals> <goals>
<goal>jar-no-fork</goal> <goal>jar-no-fork</goal>
</goals> </goals>
</execution> </execution>
<execution> <execution>
<id>attach-test-sources</id> <id>attach-test-sources</id>
<phase>prepare-package</phase>
<goals> <goals>
<goal>test-jar-no-fork</goal> <goal>test-jar-no-fork</goal>
</goals> </goals>
@ -1295,7 +1284,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version> <version>3.2.1</version>
</plugin> </plugin>
<!-- Workaround for the 'M2E plugin execution not covered' problem. <!-- Workaround for the 'M2E plugin execution not covered' problem.