Maven耳塞使用plexus-utils上的缺少类

发布于 2025-02-13 07:17:58 字数 1784 浏览 2 评论 0原文

在项目情况下,我正在使用较旧版本的Maven和Java,当我尝试使用Maven Ear插件2.7打包项目时,使用Plexus-Utils版本1.1

问题...它调用org.codehaus.plexus.util。 xml.xmlstreamwriter,此类不在plexus-utils版本1.1版本1.1

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.7:generate-application-xml (default-generate-application-xml) on project PROJECT_NAME: Execution default-generate-application-xml of goal org.apache.maven.plugins:maven-ear-plugin:2.7:generate-application-xml failed: A required class was missing while executing org.apache.maven.plugins:maven-ear-plugin:2.7:generate-application-xml: org/codehaus/plexus/util/xml/XmlStreamWriter

强迫耳塞使用其他版本的plexus-utils的方法,其中包括此 班级?

POM文件的一部分:

    <build>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <finalName>PROJECT_NAME</finalName>
                    <displayName>PROJECT_NAME</displayName>
                    <modules>
                        <webModule>
                            <groupId>some.group</groupId>
                            <artifactId>some.artifact</artifactId>
                            <bundleFileName>PROJECT_NAME_01.war</bundleFileName>
                            <contextRoot>/PROJECT_NAME_01</contextRoot>
                        </webModule>
                    </modules>
                </configuration>
            </plugin>

        </plugins>

    </build>

谢谢

For project circumstances, I'm using older versions of Maven and Java, when I try to package the project, using maven ear plugin 2.7, uses plexus-utils version 1.1

The problem... It calls org.codehaus.plexus.util.xml.XmlStreamWriter, this class is not on plexus-utils version 1.1

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.7:generate-application-xml (default-generate-application-xml) on project PROJECT_NAME: Execution default-generate-application-xml of goal org.apache.maven.plugins:maven-ear-plugin:2.7:generate-application-xml failed: A required class was missing while executing org.apache.maven.plugins:maven-ear-plugin:2.7:generate-application-xml: org/codehaus/plexus/util/xml/XmlStreamWriter

How it the way to force ear plugin to use other version of plexus-utils who include this class?

A part of pom file:

    <build>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <finalName>PROJECT_NAME</finalName>
                    <displayName>PROJECT_NAME</displayName>
                    <modules>
                        <webModule>
                            <groupId>some.group</groupId>
                            <artifactId>some.artifact</artifactId>
                            <bundleFileName>PROJECT_NAME_01.war</bundleFileName>
                            <contextRoot>/PROJECT_NAME_01</contextRoot>
                        </webModule>
                    </modules>
                </configuration>
            </plugin>

        </plugins>

    </build>

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文