EAR
■build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="【EARプロジェクト名】">
<property name="app.name" value="【アプリケーション名】" />
<target name="clean" description="clean up">
<delete dir="dist" />
</target>
<target name="init">
<tstamp>
<format property="DATE" pattern="yyyy.MM.dd" />
<format property="TIME" pattern="HH:mm:ss" />
<format property="NOW" pattern="yyyyMMdd-HHmmss" />
</tstamp>
<mkdir dir="dist/${NOW}" />
</target>
<target name="modules" depends="init">
<ant antfile="../【WARプロジェクト名】/build.xml" target="build" inheritall="false" />
</target>
<target name="build" depends="modules" description="generate the distribution">
<echo message="Implementation-Version: ${DATE}-${TIME}" />
<echo message="Implementation-Version: ${DATE}-${TIME}" file="dist/${NOW}/【メッセージファイル名】${NOW}.txt" />
<ear destfile="dist/${NOW}/【EARファイル名】.ear" appxml="EarContent/META-INF/application.xml">
<fileset dir="../【WARプロジェクト名】/dist">
<include name="【WARファイル名】.war" />
</fileset>
<manifest>
<attribute name="Manifest-Version" value="1.0" />
<attribute name="Implementation-Version" value="${DATE}-${TIME}" />
</manifest>
</ear>
<!-- 事前に 作成した javadoc.zip をコピーするなら -->
<copy file="../【WARプロジェクト名】/dist/javadoc.zip" todir="dist/${NOW}/" />
</target>
</project>