java – 如何使用包含特定文件的ant构建创建EAR文件?

我使用
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>

dawei

【声明】:唐山站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。