是否有可能将任务添加到pom.xml文件将创建一个tar.gz/.zip文件。
为eample:的pom.xml - 焦油任务
<tar type="tar.gz" source="resources/sql" tofile="target/sql.tar.gz"/>
感谢
是否有可能将任务添加到pom.xml文件将创建一个tar.gz/.zip文件。
为eample:的pom.xml - 焦油任务
<tar type="tar.gz" source="resources/sql" tofile="target/sql.tar.gz"/>
感谢
使用maven-assembly-plugin
创建一个src /主/组装/截至http://maven.apache.org/plugin-developers/cookbook/generate-assembly.html详细bin.xml和http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#bin
把你的资源,SQL文件在includes
并给予output
格式为tar.gz的
接下来,在你的pom.xml把参考这个插件
<project>
[...]
<build>
[...]
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/bin.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
http://maven.apache.org/plugins/maven-assembly-plugin/usage.html
末,把这种用
mvn package
这大概需要被标记为 “Maven的” – Ither 2010-09-09 14:05:23