我使用
eclipse来构建一个使用蚂蚁的耳朵文件.我使用oc4j,我想确保orion-application.xml包含在构建中.我目前使用但不工作的是:
<target name="ear" depends="">
<echo>Building the ear file</echo>
<copy todir="${build.dir}/META-INF">
<fileset dir="${conf.dir}" includes="orion-application.xml"/>
</copy>
<ear destfile="${dist.dir}/${ant.project.name}.ear"
appxml="${conf.dir}/application.xml">
<fileset dir="${dist.dir}" includes="*.jar,*.war"/>
</ear>
</target>
什么是正确的方法来添加到耳朵?
解决方法
Ant EAR task
应进入META-INF文件夹的所有内容都应通过嵌套的< metainf>文件集:
<ear destfile="${dist.dir}/${ant.project.name}.ear"
appxml="${conf.dir}/application.xml">
<metainf dir="${build.dir/META-INF}"/>
<fileset dir="${dist.dir}" includes="*.jar,*.war"/>
</ear>
