-->

创建具有行家组件插件的EAR [闭合](create an EAR with maven assem

2019-09-17 13:32发布

我尝试创建使用Maven Assembly插件的EAR,但我得到一个错误信息,而不是EAR文件...

[错误]未能执行目标org.apache.maven.plugins:Maven的组装插件:2.3:单(组装:包)项目业务可维护性耳:无法创建组件:错误创建组件归档斌:无法配置归档:org.codehaus.plexus.archiver.dir.DirectoryArchiver:在找不到org.codehaus.plexus.archiver.dir.DirectoryArchiver二传手,加法器也不领域“AppXML可” - > [求助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否则我得到这个错误:

[错误]未能执行目标org.apache.maven.plugins:Maven的组装插件:2.3:单(组装:包)项目业务可维护性耳:失败埃德创建装配:错误创建组件归档斌:AppXML可是必需的属性 - > [帮助1]

谢谢你,维克托·

Answer 1:

对不起,我做的bin.xml一个错误。 我定义更多格式元素不只是一个...这是工作的解决方案。

    <formats>
<!--        <format>dir</format> -->
<!--        <format>war</format> -->
        <format>ear</format>
    </formats>


文章来源: create an EAR with maven assembly plugin [closed]