Skip to content

Commit

Permalink
Merge pull request #3047 from hazendaz/master
Browse files Browse the repository at this point in the history
[pom] Make sure source package picks up our shaded artifacts to help users in IDEs - fixes #3045
  • Loading branch information
hazendaz committed Dec 26, 2023
2 parents a64a3a0 + 30cddfe commit 5186ebc
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions pom.xml
Expand Up @@ -388,6 +388,7 @@
<phase>package</phase>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<createSourcesJar>true</createSourcesJar>
<artifactSet>
<includes>
<include>org.mybatis:mybatis</include>
Expand Down Expand Up @@ -419,6 +420,7 @@
<shadedPattern>org.apache.ibatis.javassist</shadedPattern>
</relocation>
</relocations>
<shadeSourcesContent>true</shadeSourcesContent>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -509,6 +511,33 @@
<derby.version>10.17.1.0</derby.version>
</properties>
</profile>

<!-- We are manipulating the phase to run before package so shading will be used for building source jar
and further turning off attach here as shading will do that. This is required for ognl and javassist
for IDE's usage -->
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<attach>false</attach>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit 5186ebc

Please sign in to comment.