cancel
Showing results for 
Search instead for 
Did you mean: 

Ant build will call which class ?

Former Member
0 Kudos
 

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

ant build commands are listed in hybris\bin\platform\build.xml . Here implementation details of each ant target is provided.

For your specific ant target "build" : the implementation in platform is :

 <target>
         <callback extname="" target="before_build"/>
         <build/>
         <callback extname="" target="after_build"/>
     </target>
     
 

  This means it will call buildcallbacks.xml of all extensions which are listed in localextensions.xml file .
 Inside buildcallbacks.xml files of each extension again you will specify what code to execute in  <ext_name>_before_build and <ext_name>_after_build ant targets.
 For example if I have an extension name : travel.
 Then inside travel there will be a file : buildcallbacks.xml.
 Inside that you can provide your code in below tags:
 


     <macrodef name="travel_before_build">
         <sequential>
          <!--Your custom tasks goes here .You can execute any java code as well-->
         </sequential>        
     </macrodef>    
     <macrodef name="travel_after_build">
         <sequential>
          <!--Your custom tasks goes here .You can execute any java code as well-->
         </sequential>        
     </macrodef>    
 

Let me know if it answers your query