我嘗試創建使用Maven Assembly插件的EAR,但我得到一個錯誤信息,而不是EAR文件...創建與Maven Assembly插件的EAR
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.3: single (assembly:package) on project business-serviceability-ear: Failed to create assembly: Error creating assembly archive bin: Failed to configure archiver: org.codehaus.plexus.archiver.dir.DirectoryArchiver: Cannot find setter, adder nor field in org.codehaus.plexus.archiver.dir.DirectoryArchiver for 'appxml' -> [Help 1]
我pom.xml中有趣的部分:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>assembly:package</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archiverConfig>
<appxml>src/main/resources/META-INF/application.xml</appxml>
</archiverConfig>
<descriptors>
<descriptor>src/main/assembly/bin.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
能否請你幫忙,我應該把元素在pom.xml? 我必須把somehwere否則我得到這個錯誤:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single (assembly:package) on project business-serviceability-ear: Fail ed to create assembly: Error creating assembly archive bin: appxml attribute is required -> [Help 1]
謝謝 尤
爲什麼你不使用maven-ear-plugin? – khmarbaise