Skip to Content

When developing XSLT or java mapping for use in XI, it is necessary to create a jar file with the objects. If this should be performed with winzip or 7-zip, but it often result in archives, with incorrect paths like classpaths or missing files. At least it takes some time.

By using this tip it is easy to create zip files, with the same content every time in Eclipse. It should be a separate Eclipse installation and not NWDS, does not support this feature. It has been tested with Eclipse version 3.2.0. I do not know when the feature was implemented.

Create a project with same folder for sources and class files. For XI projects I prefer to have both class and source files in the same structure, so it is easy to pack them together. Clients are therefore able to maintain the project or mappings.

To create the build file selecting File -> Import/Export. On the export tab select “Ant Buildfiles” and next.

image
      

The select the project you want to pack.

image
  

  This creates two ant files in the project;

  •      build.xml is an auto generated file containing information about how to build the project.
  •      build-user.xml is a file which can be customized by the user, to create the build necessary. The file does unfortunately not have a root, which therefore does not validate in XMLSPY.

A build could look like the following.


After creating the user build file it should be executed. This I done by selecting Run -> External Tools -> External Tools. On the Targets page select the new target created in the user profile. Then select run.

image
  

This generates a log file like the one below.

image

If you want to run build again, it can be performed from the external build tool bar below. Just select the project created.

image
  

To learn more about, what is possible to perform in an Ant build visit the Ant homepage.

To make the XI integration more complete, there missing the ant task for deploy the archive directly to the Imported Archive.

To report this post you need to login first.

Be the first to leave a comment

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

Leave a Reply