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?

And do you have an ANT task that can upload the JAR to the repository?

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply