我的pom文件中有一个appassembler-maven-plugin,它曾经工作得很好 - 我可以通过运行mvn assembly:assembly来创建一个可部署的包,包括windows和unix。
然而,它停止为新的Spring启动项目工作,抱怨:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.6:single (default) on project rest: Failed to create assembly: Error creating assembly archive bin: You must set at least one file. -> [Help 1]
出了什么问题? b / w appassembler-maven-plugin和maven-assembly-plugin有什么区别?我尝试了后者,它似乎抛出了同样的错误(我不记得错误的细节)。
我的pom中的插件看起来像:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
<configuration>
<configurationSourceDirectory>src/main/resources</configurationSourceDirectory>
<configurationDirectory>config</configurationDirectory>
<copyConfigurationDirectory>true</copyConfigurationDirectory>
<includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath>
<assembleDirectory>${project.build.directory}/${project.name}</assembleDirectory>
<extraJvmArguments>
-Xms128m -Xmx128m
</extraJvmArguments>
<platforms>
<platform>unix</platform>
</platforms>
<programs>
<program>
<mainClass>com.mycompany.Application</mainClass>
<name>gs_rest.sh</name>
</program>
</programs>
</configuration>
</plugin>