Skip to content

Commit

Permalink
[pom] Make sure source package picks up our shaded artifacts to help …
Browse files Browse the repository at this point in the history
…users in IDEs
  • Loading branch information
hazendaz committed Dec 26, 2023
1 parent 1d68154 commit 30cddfe
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
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 30cddfe

Please sign in to comment.