This is an automated email from the ASF dual-hosted git repository.
robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
The following commit(s) were added to refs/heads/master by this push:
new 59b0db419e AXIS2-5965 Add duplicate=preserve to jar tasks in codegen
Ant templates
59b0db419e is described below
commit 59b0db419e352f1e624a5b5d961cc7010dc2fcf6
Author: Robert Lazarski <[email protected]>
AuthorDate: Sun Apr 19 21:21:35 2026 -1000
AXIS2-5965 Add duplicate=preserve to jar tasks in codegen Ant templates
The generated build.xml jar targets packed .class files up to 3 times
when multiple filesets overlapped, tripling the output JAR size.
Add duplicate="preserve" to all <jar> tasks across all 5 Ant build
templates (adb, default, jaxbri, jaxme, xmlbeans) so the first
occurrence wins and duplicates are silently skipped.
---
.../org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl | 4 ++--
.../apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl | 4 ++--
.../apache/axis2/wsdl/template/general/jaxbriAntBuildTemplate.xsl | 4 ++--
.../apache/axis2/wsdl/template/general/jaxmeAntBuildTemplate.xsl | 6 +++---
.../apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl | 6 +++---
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git
a/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
b/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
index 30972d64ec..0f5653747d 100644
---
a/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
+++
b/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
@@ -170,7 +170,7 @@
<include><xsl:attribute
name="name">*.xsd</xsl:attribute></include>
</fileset>
</copy>
- <jar>
+ <jar duplicate="preserve">
<xsl:attribute
name="destfile">${lib}/${name}.aar</xsl:attribute>
<fileset>
<xsl:attribute
name="excludes">**/Test.class</xsl:attribute>
@@ -191,7 +191,7 @@
<xsl:attribute
name="depends">compile.test</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
- <jar>
+ <jar duplicate="preserve">
<xsl:attribute
name="destfile">${lib}/${name}-test-client.jar</xsl:attribute>
<fileset>
<xsl:attribute name="dir">${classes}</xsl:attribute>
diff --git
a/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl
b/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl
index b7f3cfecf1..5f013fddf3 100644
---
a/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl
+++
b/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl
@@ -161,7 +161,7 @@
<xsl:attribute
name="depends">compile.test</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
- <jar>
+ <jar duplicate="preserve">
<xsl:attribute
name="destfile">${lib}/${name}-client.jar</xsl:attribute>
<fileset>
<xsl:attribute name="dir">${classes}</xsl:attribute>
@@ -203,7 +203,7 @@
</include>
</fileset>
</copy>
- <jar>
+ <jar duplicate="preserve">
<xsl:attribute
name="destfile">${lib}/${name}.aar</xsl:attribute>
<fileset>
<xsl:attribute
name="excludes">**/Test.class</xsl:attribute>
diff --git
a/modules/codegen/src/org/apache/axis2/wsdl/template/general/jaxbriAntBuildTemplate.xsl
b/modules/codegen/src/org/apache/axis2/wsdl/template/general/jaxbriAntBuildTemplate.xsl
index 4f5e5a06c2..cc1723bda1 100644
---
a/modules/codegen/src/org/apache/axis2/wsdl/template/general/jaxbriAntBuildTemplate.xsl
+++
b/modules/codegen/src/org/apache/axis2/wsdl/template/general/jaxbriAntBuildTemplate.xsl
@@ -182,7 +182,7 @@
<exclude><xsl:attribute
name="name">**/schemaorg_apache_xmlbean/**</xsl:attribute></exclude>
</fileset>
</copy>
- <jar>
+ <jar duplicate="preserve">
<xsl:attribute
name="destfile">${lib}/${name}.aar</xsl:attribute>
<fileset>
<xsl:attribute
name="excludes">**/Test.class</xsl:attribute>
@@ -202,7 +202,7 @@
</xsl:otherwise>
</xsl:choose>
- <jar>
+ <jar duplicate="preserve">
<xsl:attribute
name="destfile">${lib}/${name}-test-client.jar</xsl:attribute>
<fileset>
<xsl:attribute name="dir">${classes}</xsl:attribute>
diff --git
a/modules/codegen/src/org/apache/axis2/wsdl/template/general/jaxmeAntBuildTemplate.xsl
b/modules/codegen/src/org/apache/axis2/wsdl/template/general/jaxmeAntBuildTemplate.xsl
index d4dc9da07b..0909a04336 100644
---
a/modules/codegen/src/org/apache/axis2/wsdl/template/general/jaxmeAntBuildTemplate.xsl
+++
b/modules/codegen/src/org/apache/axis2/wsdl/template/general/jaxmeAntBuildTemplate.xsl
@@ -99,7 +99,7 @@
<target name="jar.xbeans">
<!-- jar the XMLbeans stuff to the lib folder-->
- <jar>
+ <jar duplicate="preserve">
<xsl:attribute name="basedir">${resources}</xsl:attribute>
<xsl:attribute
name="destfile">${lib}/${xbeans.packaged.jar.name}</xsl:attribute>
<xsl:attribute name="excludes">**/services.xml,
**/*.xsd</xsl:attribute>
@@ -192,7 +192,7 @@
<xsl:attribute
name="file">${lib}/${xbeans.packaged.jar.name}</xsl:attribute>
<xsl:attribute name="toDir">${classes}/lib</xsl:attribute>
</copy>
- <jar>
+ <jar duplicate="preserve">
<xsl:attribute
name="destfile">${lib}/${name}.aar</xsl:attribute>
<fileset>
<xsl:attribute
name="excludes">**/Test.class</xsl:attribute>
@@ -201,7 +201,7 @@
</jar>
</target>
<target name="jar.client" depends="compile.test" if="jars.ok">
- <jar>
+ <jar duplicate="preserve">
<xsl:attribute
name="destfile">${lib}/${name}-test-client.jar</xsl:attribute>
<fileset>
<xsl:attribute name="dir">${classes}</xsl:attribute>
diff --git
a/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl
b/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl
index 17f34fea49..66485f5c21 100644
---
a/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl
+++
b/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl
@@ -107,7 +107,7 @@
<target name="jar.xbeans">
<!-- jar the XMLbeans stuff to the lib folder-->
- <jar>
+ <jar duplicate="preserve">
<xsl:attribute name="basedir">${resources}</xsl:attribute>
<xsl:attribute
name="destfile">${lib}/${xbeans.packaged.jar.name}</xsl:attribute>
<xsl:attribute name="excludes">**/services.xml,
**/*.xsd</xsl:attribute>
@@ -204,7 +204,7 @@
<xsl:attribute
name="file">${lib}/${xbeans.packaged.jar.name}</xsl:attribute>
<xsl:attribute name="toDir">${classes}/lib</xsl:attribute>
</copy>
- <jar>
+ <jar duplicate="preserve">
<xsl:attribute
name="destfile">${lib}/${name}.aar</xsl:attribute>
<fileset>
<xsl:attribute
name="excludes">**/Test.class</xsl:attribute>
@@ -224,7 +224,7 @@
</xsl:otherwise>
</xsl:choose>
- <jar>
+ <jar duplicate="preserve">
<xsl:attribute
name="destfile">${lib}/${name}-test-client.jar</xsl:attribute>
<fileset>
<xsl:attribute name="dir">${classes}</xsl:attribute>