2011-05-17 52 views
0

我嘗試在不復制已編譯的類的情況下在多模塊項目上構建戰爭。我使用Ivy來管理我的模塊之間的依賴關係。包含構建戰爭的路徑的類

很難用常春藤報告的結果來構建戰爭。我的依賴關係被轉換爲路徑(classes.path=rootdir/module1/build/classes;rootdir/module2/build/classes;rootdir/module3/build/classes;)。我想將這條路徑的所有文件都包含在戰爭中。它不工作。

爲了測試我的構建,我嘗試了這個目標。結果是:Warning: skipping zip archive D:\dev\mci\admin\build\dist\admin.war because no files were included.

任何想法,爲什麼它不工作?

<target name="aaa-zip"> 

    <path id="aaa"> 
     <path path="D:/dev/mci/admin/build/classes"/> 
    </path> 

    <ac:pathtofileset name="aaa.fileset" 
        pathrefid="aaa" 
        dir="${basedir}"/> 
    <zip destfile="${build.war.full.filename}"> 
     <mappedresources> 
      <restrict> 
       <fileset refid="aaa.fileset"/> 
       <type type="file"/> 
      </restrict> 
      <globmapper from="*" to="WEB-INF/classes/*"/> 
     </mappedresources> 
    </zip> 
</target> 

回答

0

我不完全明白你在做什麼,爲什麼,所以我只是簡短地告訴你什麼對我有用,也許這會有所幫助。

  1. 創建空戰爭DIR
  2. 使用ivy.resolveA創建path.projectA,編譯,複製類戰爭DIR
  3. 使用ivy.resolveA創建path.projectB,編譯,複製類戰爭DIR
  4. 拉鍊戰爭DIR

如果需要的話,使用ivy:檢索包括LIB /側面侑存檔。

1月