嗨,我創建了一個程序集壓縮項目的圖像,我把它掛在我的pom文件的包裝階段,這裏的問題是當我執行「clean compile package」時, zip文件以及我不想創建的文件-jar-with-dependencies.jar。我怎麼可以禁止生成這個jar文件大會總是執行與依賴關係的罐子
這裏是我的POM
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/cat_image_resources_assembly.xml
</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>cat_image_resources</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<!-- appendAssemblyId>false</appendAssemblyId>
<Change the name to standard name >
<finalName>renameImages</finalName-->
</configuration>
</execution>
</executions>
</plugin>
彙編文件cat_image_resources_assembly.xml
<assembly>
<id>cat_image_resources</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<baseDirectory>${artifactId}</baseDirectory>
<fileSets>
<fileSet>
<directory>exportedImages</directory>
<outputDirectory/>
<fileMode>644</fileMode>
</fileSet>
</fileSets>
</assembly>
它生成以下文件
CATImageExport2-1.0,SNAPSHOT- cat_image_resources.zip(需要5MB), CATImageExport2-1.0-SNAPSHOT-jar -with-dependencies.jar(58mb這是用dep我想排除生成的依賴)
如果我註釋掉程序集插件maven-assembly-plugin,那麼它不會生成任何這兩個工件。 – sanat 2010-11-02 04:48:42
帕斯卡有正確的步驟來嘗試下一步。看看有效的絨球。你可能會繼承你不想要的東西。 – jgifford25 2010-11-02 16:10:50