无法将war,ear文件复制到jboss / default / deploy文件夹。使用ANT

时间:2012-04-19 07:25:57

标签: ant build jboss

我为所有后续项目制作build.xml文件,然后在master build.xml中调用所有build.xml文件

在所有build.xml运行之后,所有jar,war,ear都已创建

之后我想将所有war和ear文件复制到jboss的jboss / default / deploy文件夹。

为此,我编写以下代码,但这不会将任何文件复制到jboss / default / deploy文件夹。

<project name="master" >

    <property name="class.dir" location="../Source/buildwork" />
    <property name="ecpsproperties.dir" location="D:\ecpsproperties\jars\platform" />
    <property name="jbossdeploy.dir" location="D:\jboss-6.1.0.Final\server\default\deploy" />

    <target name="clean">
        <delete dir="${class.dir}" />

    </target>

    <target name="makedir">
        <mkdir dir="${class.dir}" />
        <mkdir dir="${class.dir}/jar" />
        <mkdir dir="${class.dir}/ear" />
        <mkdir dir="${class.dir}/war" />
    </target>

<filelist id="projects" dir=".">
        <file name="../Source/ValueObjects/build.xml"/>
        <file name="../Source/ECPSValueObjects/build.xml"/>
        <file name="../Source/ECPSUtils/build.xml"/>
        <file name="../Source/CommonExceptions/build.xml"/>
         <file name="../Source/ECPSExceptions/build.xml"/>
         <file name="../Source/ECPSCommon/build.xml"/>
         <file name="../Source/BaseDAO/build.xml"/>
         <file name="../Source/PageManagerValueObjects/build.xml"/>
         <file name="../Source/PageManagerDAO/build.xml"/>
         <file name="../Source/ECPSDAO/build.xml"/>
         <file name="../Source/PageManagerEJBClient/build.xml"/>
         <file name="../Source/PartyEJBClient/build.xml"/>
          <file name="../Source/ReportsEJBClient/build.xml"/>
         <file name="../Source/StagingEJBClient/build.xml"/>
          <file name="../Source/MessageBoardEJBClient/build.xml"/>
         <file name="../Source/PageManagerFacade/build.xml"/>
          <file name="../Source/PartyFacade/build.xml"/>
         <file name="../Source/ReportsFacade/build.xml"/>
          <file name="../Source/StagingFacade/build.xml"/>
         <file name="../Source/MessageBoardFacade/build.xml"/>

          <file name="../Source/MessageBoardEJB/build.xml"/>
         <file name="../Source/MessageBoardEAR/build.xml"/>
         <file name="../Source/PageManagerEJB/build.xml"/>
          <file name="../Source/PageManagerEAR/build.xml"/>

           <file name="../Source/PartyEJB/build.xml"/>
         <file name="../Source/PartyEAR/build.xml"/>

         <file name="../Source/ReportsEJB/build.xml"/>
          <file name="../Source/ReportsEAR/build.xml"/>

          <file name="../Source/StagingEJB/build.xml"/>
         <file name="../Source/StagingEAR/build.xml"/>

          <file name="../Source/Admin/build.xml"/>
         <file name="../Source/eCPSClient/build.xml"/>
          <file name="../Source/MessageBoardServices/build.xml"/>
           <file name="../Source/OAuth/build.xml"/>
            <file name="../Source/PageManagerRest/build.xml"/>
             <file name="../Source/PartyServices/build.xml"/>
             <file name="../Source/ReportsServices/build.xml"/>
          <file name="../Source/StagingServices/build.xml"/>


 </filelist>

 <target name="copy" depends="main">
     <copy todir="${ecpsproperties.dir}">
        <fileset dir="${class.dir}/jar" includes="**/*.jar"/>
    </copy>

    <copy todir="${jbossdeploy.dir}">
        <fileset dir="${class.dir}/ear" includes="**/*.ear"/>
        <fileset dir="${class.dir}/war" includes="**/*.war"/>
    </copy>

 </target>


 <target name="main" depends="clean, makedir">
    <subant>

      <filelist refid="projects" />

    </subant>

 </target>
</project>

0 个答案:

没有答案