Skip to content

Commit db7e36f

Browse files
authored
fix: maven-shade-plugin-build-issues (#111)
* fix: resolve Maven shade plugin build issues - Disable maven-shade-plugin for common modules to prevent package relocation conflicts - Fix maven-antrun-plugin configuration in msp-integrations (tasks -> target) - Resolve compilation errors caused by package relocation during build lifecycle Changes: - agent-app-insight-common/pom.xml: disable shade plugin - agent-jdbc-commons/pom.xml: disable shade plugin - agent-servlet-commons/pom.xml: disable shade plugin - msp-integrations/pom.xml: update antrun plugin configuration This ensures that common modules maintain original package names for proper compilation of dependent modules while still allowing final plugins to be shaded. * revert resteasy-jaxrs pom version Signed-off-by: Ash <[email protected]> * revert resteasy-jackson-provider pom version Signed-off-by: Ash <[email protected]> * refactor: comment out unused shade plugin relocations in pom.xml files - Commented out the relocation configurations for org.apache.skywalking.apm.agent.core in both agent-main and agent-plugins pom.xml files to prevent potential conflicts during the build process. This change helps maintain clarity in the build configuration while ensuring that the necessary relocations remain intact for other dependencies. * refactor: remove unused maven-shade-plugin configurations from pom.xml files - Removed the maven-shade-plugin configurations from agent-app-insight-common, agent-jdbc-commons, and agent-servlet-commons pom.xml files to streamline the build process and eliminate potential conflicts. This change enhances clarity in the build configuration while ensuring that the necessary dependencies remain intact. --------- Signed-off-by: Ash <[email protected]>
1 parent 1f0beca commit db7e36f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

agent-main/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
<shade.net.bytebuddy.target>${shade.package}.${shade.net.bytebuddy.source}</shade.net.bytebuddy.target>
2222
<shade.io.opentelemetry.source>io.opentelemetry</shade.io.opentelemetry.source>
2323
<shade.io.opentelemetry.target>${shade.package}.${shade.io.opentelemetry.source}</shade.io.opentelemetry.target>
24-
<shade.org.apache.skywalking.apm.agent.core.source>org.apache.skywalking.apm.agent.core</shade.org.apache.skywalking.apm.agent.core.source>
25-
<shade.org.apache.skywalking.apm.agent.core.target>${shade.package}.${shade.org.apache.skywalking.apm.agent.core.source}</shade.org.apache.skywalking.apm.agent.core.target>
24+
<!-- <shade.org.apache.skywalking.apm.agent.core.source>org.apache.skywalking.apm.agent.core</shade.org.apache.skywalking.apm.agent.core.source> -->
25+
<!-- <shade.org.apache.skywalking.apm.agent.core.target>${shade.package}.${shade.org.apache.skywalking.apm.agent.core.source}</shade.org.apache.skywalking.apm.agent.core.target> -->
2626
<agent.package.dest.dir>${project.basedir}/../dist/erda-java-agent</agent.package.dest.dir>
2727
</properties>
2828

@@ -82,10 +82,10 @@
8282
<pattern>${shade.io.opentelemetry.source}</pattern>
8383
<shadedPattern>${shade.io.opentelemetry.target}</shadedPattern>
8484
</relocation>
85-
<relocation>
85+
<!-- <relocation>
8686
<pattern>${shade.org.apache.skywalking.apm.agent.core.source}</pattern>
8787
<shadedPattern>${shade.org.apache.skywalking.apm.agent.core.target}</shadedPattern>
88-
</relocation>
88+
</relocation> -->
8989
</relocations>
9090
</configuration>
9191
</execution>

agent-plugins/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@
8484
<pattern>${shade.io.opentelemetry.source}</pattern>
8585
<shadedPattern>${shade.io.opentelemetry.target}</shadedPattern>
8686
</relocation>
87-
<relocation>
87+
<!-- <relocation>
8888
<pattern>${shade.org.apache.skywalking.apm.agent.core.source}</pattern>
8989
<shadedPattern>${shade.org.apache.skywalking.apm.agent.core.target}</shadedPattern>
90-
</relocation>
90+
</relocation> -->
9191
</relocations>
9292
</configuration>
9393
</execution>

msp-integrations/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<goal>run</goal>
5454
</goals>
5555
<configuration>
56-
<tasks>
56+
<target>
5757
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
5858
classpathref="maven.runtime.classpath"/>
5959
<if>
@@ -66,7 +66,7 @@
6666
tofile="${integrations.dest.dir}/${project.artifactId}.pom" overwrite="true"/>
6767
</then>
6868
</if>
69-
</tasks>
69+
</target>
7070
</configuration>
7171
</execution>
7272
</executions>

0 commit comments

Comments
 (0)