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

commit f4efcafef0acf3e2cd1a72d4576ea584607c4a0b
Author: Robert Lazarski <[email protected]>
AuthorDate: Sun Apr 5 17:39:20 2026 -1000

    springbootdemo: fix antrun phase and .mar overwrite for reliable builds
    
    Two related fixes:
    - Move antrun execution from 'install' to 'prepare-package' phase so that
      'mvn package' (not just 'mvn install') assembles the .aar services, copies
      axis2.xml, and creates the openapi .mar — the previous binding meant a
      'mvn package -DskipTests' silently produced a stale deployment directory
    - Add overwrite="true" to both .mar copy tasks so a pre-existing .mar from
      a previous build is always replaced with the latest jar from 
.m2/repository
    
    Applied to both springbootdemo (WildFly) and springbootdemo-tomcat11.
    
    Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---
 .../userguide/src/userguide/springbootdemo-tomcat11/pom.xml       | 2 +-
 modules/samples/userguide/src/userguide/springbootdemo/pom.xml    | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git 
a/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/pom.xml 
b/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/pom.xml
index c1de1b099e..47c06b0f9b 100644
--- a/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/pom.xml
+++ b/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/pom.xml
@@ -353,7 +353,7 @@
                 <executions>
                     <execution>
                         <id>install</id>
-                        <phase>install</phase>
+                        <phase>prepare-package</phase>
                         <configuration>
                             <target>
                                 <jar 
jarfile="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/services/Login.aar">
diff --git a/modules/samples/userguide/src/userguide/springbootdemo/pom.xml 
b/modules/samples/userguide/src/userguide/springbootdemo/pom.xml
index b48388db15..e4b96290e7 100644
--- a/modules/samples/userguide/src/userguide/springbootdemo/pom.xml
+++ b/modules/samples/userguide/src/userguide/springbootdemo/pom.xml
@@ -354,7 +354,7 @@
                 <executions>
                     <execution>
                         <id>install</id>
-                        <phase>install</phase>
+                        <phase>prepare-package</phase>
                         <configuration>
                             <target>
                                 <jar 
jarfile="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/services/Login.aar">
@@ -374,7 +374,8 @@
                                 <!-- Create openapi module archive for 
WEB-INF/modules -->
                                 <mkdir 
dir="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/modules"/>
                                 <copy 
file="${settings.localRepository}/org/apache/axis2/axis2-openapi/${axis2.version}/axis2-openapi-${axis2.version}.jar"
-                                      
tofile="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/modules/openapi-${axis2.version}.mar"/>
+                                      
tofile="${project.build.directory}/deploy/axis2-json-api.war/WEB-INF/modules/openapi-${axis2.version}.mar"
+                                      overwrite="true"/>
                                 <unzip 
src="${project.build.directory}/axis2-json-api-0.0.1-SNAPSHOT.war" 
dest="${project.build.directory}/exploded"/>
                                 <jar 
jarfile="${project.build.directory}/exploded/WEB-INF/services/Login.aar">
                                     <metainf 
file="resources-axis2/login_resources/services.xml"/>
@@ -393,7 +394,8 @@
                                 <!-- Create openapi module archive for 
exploded WEB-INF/modules -->
                                 <mkdir 
dir="${project.build.directory}/exploded/WEB-INF/modules"/>
                                 <copy 
file="${settings.localRepository}/org/apache/axis2/axis2-openapi/${axis2.version}/axis2-openapi-${axis2.version}.jar"
-                                      
tofile="${project.build.directory}/exploded/WEB-INF/modules/openapi-${axis2.version}.mar"/>
+                                      
tofile="${project.build.directory}/exploded/WEB-INF/modules/openapi-${axis2.version}.mar"
+                                      overwrite="true"/>
                             </target>
                         </configuration>
                         <goals>

Reply via email to