Hi ant admin's,
     I need help in my Ant project

  I have the following attached files for ant.

Screenshot is attached to this email which depicts the folder structure.

RecentError.txt has part of build.xml file and project_build.properties
file.

Build is successful but WAR file is not getting generated.

Could you please look into this and let me know how to proceed further. ?

Regards,
Deepak.
-----------------------------------------------------------------------------------------------------


    <target name="compile_web_classes" depends="compile_clean_jsp"
            description="compile the web source classes">
        <mkdir dir="${build_dir_war}/WEB-INF"/>
        <mkdir dir="${build_dir_war}/WEB-INF/classes"/>
        <javac  classpathref="web.classpath" executable="${javacompiler}"
                 fork="yes" srcdir="${src_web_java}" 
                 destdir="${build_dir_war}/WEB-INF/classes/">
            <classpath>
                <fileset dir="${external_jar_classpath}">
                    <include name="**/*.jar"/>
                </fileset>
            </classpath>
            <include name="com/**/*.java"/>
        </javac>
    </target>


    <!-- creates the war files for web classes and jsp -->
    <target name="make_fptool_war" depends="compile_web_classes"
        description="creates the war files for the web classes and jsp" >
        <!-- copy the  files for  war-->
        
        <copy todir="${build_dir_war}/" preservelastmodified="true">
            <fileset dir="${src_web_jsp}">
                <exclude name="CVS"/>
                <exclude name="CVS/**/*.*"/>
                <exclude name="WEB-INF/**/*.class"/>
            </fileset>
        </copy>

        <copy toDir="${build_dir_war}${web_apps_property_destination}">
            <fileset dir="${web_apps_property_source}" includes="*.properties"/>
        </copy>

        <!-- make the war-->
        <jar destfile="${build_dir_war}/MyProject_NEW.war">
            <fileset dir="${build_dir_war}" includes="**/*.*"/>
        </jar>
    </target>

    <!-- Delete the ${build_dir_war} used by jsp compilation --> 
    <target name="compile_clean_jsp"
        description="compile clean for jsp build" >
        <delete dir="${build_dir_war}/"/>
        <mkdir dir="${build_dir_war}"/>
    </target>
 

     <!--Delete the ${build_dir} directory -->  
    <target name="buildclean"
                description="compileclean up" >
        <delete  dir="${build_dir}/"/>
    </target>
    

-----------------------------------------------------------------------------------------------------
# <!-- directories for build -->
build_dir=MyProject
#Java compiler 
javacompiler=C:\\Program Files\\Java\\jdk-17.0.3.1\\bin\\javac
# Location to the JDK
java_home=C:\\Program Files\\Java\\jdk-17.0.3.1
#C:\Program Files\Java\jdk-17.0.3.1
#< !-- compile the web source classes-->, target name = compile_web_classes
src_web_java=srcClasses
#< !-- creates the war files for web classes and jsp -->, target name - make_war
src_web_jsp=pages
#< !-- creates the war files for web classes and jsp -->
web_apps_property_source=\WEB-INF\\
# Location of folder that contains other properties files
web_apps_property_destination=/DestinationProperties
# Location of folder that contains external jar files
external_jar_classpath=\WEB-INF\\lib


-----------------------------------------------------------------------------------------------------


WEB-INF has messageResources.properties file which exists under WEB-INF folder


BUILD IS SUCCESSFUL but MyProject_NEW.war is not getting generated.

-----------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to