Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

Creating Jar files from NWDS using Ant

$
0
0

When dealing with PI development of java mappings or XLS(T) mapping you have to create a jar or zip file with the mapping source. This can take some time to create every time you make mapping changes. I have found that it is easy to create an Ant build/script to create the Jar files.

Hundred years ago (well almost), I wrote about how you could use the Ant build file to create mapping archives. Eclipse has changed the way it can create build files easily, so you also have to change the new format.

I have created a video that show what are the different steps required to make this work.

 

The code for the userbuild.xml file is there.

 

<?xml version="1.0" encoding="UTF-8"?><?eclipse.ant.import?><project name="test1" ><!--  Sample XML created by Daniel Graversen figaf.com -->      <import file="build.xml"/>      <target depends="build" name="pack1">  <!-- define the directory to place the packed files in -->  <property name="dist" value="packedfiles"/>  <property name="src" value="src"/>  <!-- delete and create a new directory -->  <delete quiet="true">  <fileset dir="${dist}" includes="*.jar"/>  </delete>  <mkdir dir="${dist}"/>  <echo message="${ant.project.name}: ${ant.file} packing"/>  <!-- create the jarfile -->  <jar destfile="${dist}/CRM.jar" >  <!-- class and jar files to be included -->  <fileset dir="${src}">  <include name="com/figaf/crm/**" />  </fileset>  <!-- xsl file to be included -->  </jar>  </target>  </project>

 

As you can see it is just normal Ant build that is required, so you can easy plug all your and skills in to it to enhance the user build file with tons of useful material.

I often use a build file to also create the jar files for XSL(T) even they are not used for other things in the project.

Do you have anything useful in your Ant build file, then please share.


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>