How do I create an EAR file with an ant build including certain files?

Posted by user149100 on Stack Overflow See other posts from Stack Overflow or by user149100
Published on 2009-08-12T16:36:23Z Indexed on 2010/06/02 16:34 UTC
Read the original article Hit count: 362

Filed under:
|
|
|
|

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?

© Stack Overflow or respective owner

Related posts about java

Related posts about ant