我如何创建一个Ant构建包括某些文件EAR文件? [英] How do I create an EAR file with an ant build including certain files?
本文介绍了我如何创建一个Ant构建包括某些文件EAR文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用Eclipse使用Ant构建一个EAR文件。我使用的是OC4J,我想确保的orion-application.xml中包含在构建中。我目前使用但不工作是什么:
I'm using eclipse to build an ear file using ant. I'm using oc4j, and I want to make sure that orion-application.xml is included in the build. What I'm currently using but does not work is:
<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>
什么是它添加到耳朵的正确方法?
What is the right way to add this to the ear?
推荐答案
这应该进入 META-INF
文件夹,一切都应该通过嵌套指定&LT; metainf&GT;
文件集:
Everything that should go into META-INF
folder should be specified via nested <metainf>
fileset:
<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>
这篇关于我如何创建一个Ant构建包括某些文件EAR文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文