cancel
Showing results for 
Search instead for 
Did you mean: 

how to create .sda or .rer file using ant builder

Former Member
0 Kudos

hello all,

currently i have to manually build the .rer or .sda file from .jar + .xml files. i got that with the ant builder you can make it automatically.

but i dont know how to use that ant builder. so plz anybody help me by sending some solution or some example document(which contains all the steps).

Thanx in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Project structure in Eclipse

src: all java source files

classes: the compiled class files

template: all the template of deployment file

/meta-inf: all the templates for resource adapter deployment descriptor files

/meta-inf_sda: all the templates for sda deployment descriptor files

lib: all the referenced libraries when building

archive: the ultimate sda deployment file

includedlib: all the jar files in this folder will be included in the rar file

you can reference my build.xml

<?xml version="1.0" ?>

<project name="myxiadapter" default="package2sda" basedir="." >

<description>build ariba xi adapter</description>

<!-- for directory -->

<property file="build.properties"/>

<property name="project.src" value="./src"/>

<property name="project.build" value="./classes"/>

<!--

<property name="project.build.metainf" value="${project.build}/META-INF"/>

-->

<property name="project.archive" value="./archive"/>

<property name="project.archive.rar" value="${project.archive}/rar"/>

<property name="project.archive.rar.metainf" value="${project.archive.rar}/META-INF"/>

<property name="project.archive.sda" value="${project.archive}/sda"/>

<property name="project.archive.sda.metainf" value="${project.archive.sda}/META-INF"/>

<property name="project.lib" value="./lib"/>

<property name="project.template" value="./template"/>

<property name="project.template.metainf" value="${project.template}/META-INF"/>

<property name="project.template.metainf_sda" value="${project.template}/META-INF_SDA"/>

<property name="project.includedlib" value="./includedlib"/>

<!-- for meta-inf file -->

<path id="project.classpath">

<fileset dir="${project.lib}">

<include name="*.jar"/>

</fileset>

</path>

<target name="init" description="create the directory">

<echo>${ant.version}</echo>

<tstamp/>

<mkdir dir="${project.src}" />

<mkdir dir="${project.build}" />

<!--

<mkdir dir="${project.build.metainf}" />

-->

<mkdir dir="${project.archive}" />

<mkdir dir="${project.archive.rar}" />

<mkdir dir="${project.archive.rar.metainf}" />

<mkdir dir="${project.archive.sda}" />

<mkdir dir="${project.archive.sda.metainf}" />

</target>

<target name="clean">

<delete file="${project.build}/${log-package}/LogMgr.properties"/>

<!--

<delete includeemptydirs="true">

<fileset dir="${project.archive.sda.metainf}" includes="*/"/>

<fileset dir="${project.archive.rar.metainf}" includes="*/"/>

</delete>

-->

</target>

<target name="compile" depends="init" description="compile the source code">

<javac srcdir="${project.src}" destdir="${project.build}" classpathref="project.classpath"/>

</target>

<target name="package2sda" depends="compile,clean" description="package the deployment file">

<filter filtersfile="build.properties"/>

<!--copy log.properties -->

<!--

<copy todir="${project.build}/${log-package}" filtering="true">

<fileset dir="${project.template}" >

<include name="LogMgr.properties"/>

</fileset>

</copy>

-->

<!-- test-->

<copy file="${project.template}/LogMgr.properties" todir="${project.archive.rar}" />

<!-- make resouce adapter jar file -->

<jar jarfile="${project.archive.rar}/${archive-name}.jar" basedir="${project.build}" />

<!-- referenced library -->

<copy todir="${project.archive.rar}">

<fileset dir="${project.includedlib}"/>

</copy>

<copy todir="${project.archive.rar.metainf}" filtering="true">

<fileset dir="${project.template.metainf}"/>

</copy>

<!--

<jar jarfile="${project.archive.rar}/${archive-name}.${archive-suffix}" basedir="${project.build}" />

-->

<zip destfile="${project.archive.sda}/${archive-name}.rar" basedir="${project.archive.rar}" />

<!-- make sda file -->

<copy file="${project.template.metainf_sda}/dd.xml" tofile="${project.template.metainf_sda}/${class-package}-dd.xml" />

<copy todir="${project.archive.sda.metainf}" filtering="true">

<fileset dir="${project.template.metainf_sda}" >

<exclude name="dd.xml"/>

</fileset>

</copy>

<delete file="${project.template.metainf_sda}/${class-package}-dd.xml" />

<!--

<jar jarfile="${project.archive}/${archive-name}.sda" basedir="${project.archive.rar}" />

-->

<zip destfile="${project.archive}/${archive-name}.sda" basedir="${project.archive.sda}" />

<delete dir="${project.archive.rar}"/>

<delete dir="${project.archive.sda}"/>

</target>

</project>

Message was edited by: Spring Tang

Message was edited by: Spring Tang

Message was edited by: Spring Tang

former_member184154
Active Contributor
0 Kudos

Hi Hetal,

try have a look at note 696084 and at this

Let me know it those help you.

Alex