Distribution target-dist

Java Primer
Ant Build Process
Mini How-to

by Peter Braswell
Listing 1. "Distribution target-dist".


   <!--==========================-->
   <!-- TARGET [DIST]            -->
   <!--==========================-->
   <target name="dist" depends="compile">
      <!-- Create the ${dist}/lib directory -->
      <mkdir dir="${dist}/lib"/>
      <mkdir dir="${build}/META-INF"/>
      <copy todir="${build}/META-INF">
        <fileset dir="${basedir.src.resources}">
          <include name="*.xml"/>
        </fileset>
      </copy>
      <copy todir="${build}">
        <fileset dir="${basedir.src.resources}">
          <include name="*.properties"/>
        </fileset>
      </copy>
      <copy todir="${build}">
        <fileset dir="${basedir.src.resources}">
          <include name="*.policy"/>
        </fileset>
      </copy>
      <jar jarfile="${dist}/lib/SimpleBean.jar"
           basedir="${build}"
           manifest="${basedir.src.resources}/manifest.mf"
includes="com/utopiansoft/**,**/*.xml,**/*.properties,**/*.policy"
      />
   </target>

About the Author

Peter Braswell is a senior architect at Utopian Software Concepts, located in Virginia Beach, VA. He can be contacted at pbraswell@utopiansoft.com.


Featured

Most   Popular
Upcoming Events

AppTrends

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.