`
ganjuelovejava
  • 浏览: 94289 次
  • 性别: Icon_minigender_2
  • 来自: 湖南
社区版块
存档分类
最新评论

AntStudentTwo

阅读更多
<project name="SupportWeb"  basedir=".">
<property file="build_sup.properties" />

    <property environment="env" />
    <property name="app.dir" value="${project.home.dir}\${web.name}" />
<property name="list.dir" value="${project.home.dir}\list" />
<property name="pro.dir" value="${project.home.dir}" />
    <property name="src.dir" value="${app.dir}\JavaSource" />

    <property name="classes.dir" value="${app.dir}\WebContent\WEB-INF\classes" />
    <property name="webcontent.dir" value="${app.dir}\WebContent" />

    <path id="build.classpath" description="classpath">
        <fileset dir="${webcontent.dir}\WEB-INF\lib">
            <include name="*.jar" />
        </fileset>
        <pathelement location="${classes.dir}" />
    </path>

<!--clean package -->

<target name="clean" description="clean package">
        <delete dir="${list.dir}"/>
    </target>
<!--create classes package -->
    <target name="prepare" depends="clean" description="create classes package">
<mkdir dir="${list.dir}" />
        <mkdir dir="${classes.dir}" />
    </target>

    <target name="compile" depends="prepare" description="compile">
        <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="on" deprecation="on" optimize="off" includes="**">
            <classpath refid="build.classpath" />
        </javac>
    </target>
   
   <!--  <target name="sessionInterface" depends="compile" description="create session bean">
        <jar destfile="${app.dir}/interface.jar">
            <fileset dir="${classes.dir}">
                <include name="com/mashiguang/ejb3/*.class" />
            </fileset>
        </jar>
    </target> -->
<!--to create War -->
    <target name="web-war" depends="ejb_jar" description="create War">
        <war destfile="${list.dir}/${web.name}.war" webxml="${webcontent.dir}/WEB-INF/web.xml">
            <fileset dir="${webcontent.dir}">
                <include name="**/*.*"/>
            </fileset>
            <!-- <manifest>
                <attribute name="Class-Path" value="interface.jar commons-collections-3.2.jar commons-lang-2.3.jar"/>
            </manifest> -->
        </war>
    </target>
<!--to create ear -->
    <target name="ear" depends="web-war" description="create ear">
        <ear destfile="${list.dir}/${ear.name}.ear" appxml="${pro.dir}/${ear.name}/META-INF/application.xml">
            <fileset dir="${list.dir}">
                <include name="*.jar"/>
                <include name="*.war"/>
            </fileset>
        <fileset dir="${pro.dir}/${ear.name}">
        <include name="META-INF/*.*"/>
        </fileset>
        </ear>
    </target>

</project>

#to change your workspace

project.home.dir=F:\\MyProjects\\arms
web.name=HossWeb
ear.name=SupportHossEAR
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics