0
嗨 我已經想通了怎麼做才能在我的項目目錄中分解一個zip文件 但是我想只做一次。我的意思是,如果指揮官已經存在,不會再次爆炸。 這是我今天做用maven依賴插件解壓依賴一次
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.2</version>
<executions>
<!--Import qooxdoo sdk and add it to target directory-->
<execution>
<id>extract-qooxdoo-sdk</id>
<phase>process-resources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeArtifactIds>qooxdoo-sdk</includeArtifactIds>
<outputDirectory>${project.basedir}/qooxdoo-sdk</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>>2.2</version>
<executions>
<!--Import qooxdoo sdk and add it to target directory-->
<execution>
<id>extract-qooxdoo-sdk</id>
<phase>process-resources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeArtifactIds>qooxdoo-sdk</includeArtifactIds>
<outputDirectory>${project.basedir}/qooxdoo-sdk</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
感謝您的幫助
是的。不要把它放在目標目錄中,因爲在每個'mvn clean'過程中都會被刪除,所以你最終會將qooxdoo解壓縮得超出你的需要。 – 2011-03-02 12:52:54