I need help. My build.xml script seems to be ignoring a copy that
would copy my third-party jar files to WEB-INF/lib. Running ant in
regular and verbose mode does not give me any error messages that I
can see (although Im a newbie with ant and just modifying my
instructor's pre-created script).

Script is below. The "bad" copy directive is the last one in the build
target before the <jar> directives.

Jason

<!-- build.xml -->
<project name="Project4" default="build" basedir=".">
<property name="app" value="st_ferguson_Project4" />
<property name="entities" value="${app}Entities" />
<property name="ejbs" value="${app}Ejbs" />
<property name="web" value="${app}Web" />
<property name="lib" value="${app}lib" />
<property name="lib1" value="lib" />
<property name="ejbsPkg" value="st_ferguson_Project4Ejbs" />
<property name="entitiesPkg" value="st_ferguson_Project4Entities" />
<property name="webPkg" value="st_ferguson_Project4Web" />
<property name="libpkg" value="st_ferguson_Project4lib" />

<target name="compile">
   <antcall target="clean" />
   <copy todir="compile">
       <fileset dir="${ejbs}">
           <patternset>
               <include name="*.java" />
           </patternset>
       </fileset>
   </copy>
   <copy todir="compile">
       <fileset dir="${entities}">
           <patternset>
             <include name="*.java" />
           </patternset>
       </fileset>
   </copy>
   <copy todir="compile">
       <fileset dir="${web}">
           <patternset>
               <include name="*.java" />
           </patternset>
       </fileset>
   </copy>
   <copy todir="compile">
        <fileset dir="${lib}">
            <patternset>
                <include name="*.jar" />
            </patternset>
       </fileset>
   </copy>
   <javac srcdir="compile" destdir="compile" />
</target>
<target name="build" depends="compile">
   <copy todir="build\${entities}\${entitiesPkg}">
     <fileset dir="compile\${entitiesPkg}" />
   </copy>
   <copy file="${entities}\persistence.xml"
tofile="build\${entities}\META-INF\persistence.xml" />
   <copy todir="build\${ejbs}\${ejbsPkg}">
     <fileset dir="compile\${ejbsPkg}" />
   </copy>

   <copy todir="build\${web}\WEB-INF\classes\${webPkg}">
     <fileset dir="compile\${webPkg}" />
   </copy>
   <copy todir="build\${web}">
       <fileset dir="${web}">
           <patternset>
             <include name="*.jsp" />
           </patternset>
       </fileset>
   </copy>
   <copy file="${web}/web.xml" todir="build/${web}/WEB-INF" />
   <copy todir="build/${web}/">
       <fileset dir="${web}">
         <include name="**/*.jsp" />
       </fileset>
   </copy>

   <copy todir="build/${web}/WEB-INF/lib">
     <fileset dir="compile/${webPkg}">
            <patternset>
                <include name="*.jar" />
            </patternset>
     </fileset>
   </copy>
   <jar destfile="build/${entities}.jar" basedir="build/${entities}" />
   <jar destfile="build/${ejbs}.jar" basedir="build/${ejbs}" />
   <jar destfile="build/${web}.war" basedir="build/${web}" />
   <jar destfile="build/${app}.ear" basedir="build"
includes="lib/*.jar *.jar ${web}.war" />
</target>
<target name="deploy" depends="build">
   <exec executable="asadmin" failonerror="true" vmlauncher="false">
     <arg line="deploy --createtables build/${app}.ear" />
   </exec>
</target>
<target name="undeploy">
   <exec executable="asadmin" failonerror="true" vmlauncher="false">
     <arg line="undeploy ${app}" />
   </exec>
 </target>
<target name="clean">
 <delete dir="compile" />
 <delete dir="build" />
</target>
</project>

--
Check these out:
Family Photo Album: http://photogallery.jennyleigh.net
Personal Web Site:
http://fergusonjason.googlepages.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to