maven-war-plugin 抱怨缺少程序集描述符

发布于 2024-12-22 14:10:31 字数 2740 浏览 3 评论 0原文

我目前没有在 pom.xml 中使用任何程序集插件,但出现此错误:

[INFO] Reading assembly descriptor: src/main/assembly/assembly.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error reading assemblies: Error locating assembly descriptor:           src/main/assembly/assembly.xml

[1] [INFO] Searching for file location:     C:\Users\yue\Documents\idgar_project\src\idgarsec_war\src\main\assembly\assembly.xml

[2] [INFO] File: C:\Users\yue\Documents\idgar_project\src\idgarsec_war\src\main\assembly\assembly.xml does not exist.

[3] [INFO] File: C:\Users\yue\Documents\idgar_project\src\idgarsec_war\src\main\assembly\assembly.xml does not exist.

[INFO] ------------------------------------------------------------------------

当前我在 src/main/webapp 目录中没有任何内容,相反,此内容是在其他目录中找到的。当我不在 pom.xml 中使用它时,为什么它会抱怨程序集?

原来的pom.xml比较长,这里是使用maven-war-plugin的部分

<build>
        <finalName>idgarsec</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <packagingExcludes>WEB-INF/classes/**,WEB-INF/jsscripts/**,WEB-INF/themes/**</packagingExcludes>
                    <webResources>
                        <resource>
                            <directory>../idgarsec/webapp/WEB-INF/jsscripts/</directory>
                            <targetPath></targetPath>
                            <filtering>true</filtering>
                        </resource>
                        <resource>
                            <directory>../idgarsec/webapp/WEB-INF/themes/</directory>
                            <targetPath>themes</targetPath>
                            <filtering>true</filtering>
                        </resource>
                        <resource>
                            <directory>../idgarsec/webapp/WEB-INF/</directory>
                            <targetPath>WEB-INF</targetPath>
                            <filtering>true</filtering>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
    </build>

I'm currently not using any assembly plugin in pom.xml, but I get this error:

[INFO] Reading assembly descriptor: src/main/assembly/assembly.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error reading assemblies: Error locating assembly descriptor:           src/main/assembly/assembly.xml

[1] [INFO] Searching for file location:     C:\Users\yue\Documents\idgar_project\src\idgarsec_war\src\main\assembly\assembly.xml

[2] [INFO] File: C:\Users\yue\Documents\idgar_project\src\idgarsec_war\src\main\assembly\assembly.xml does not exist.

[3] [INFO] File: C:\Users\yue\Documents\idgar_project\src\idgarsec_war\src\main\assembly\assembly.xml does not exist.

[INFO] ------------------------------------------------------------------------

Currently I don't have anything in the src/main/webapp directory, instead, this content is found at some other directory. Why does it complain about assembly when I'm not using it in pom.xml?

The original pom.xml is rather long, here's the part where it uses maven-war-plugin

<build>
        <finalName>idgarsec</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <packagingExcludes>WEB-INF/classes/**,WEB-INF/jsscripts/**,WEB-INF/themes/**</packagingExcludes>
                    <webResources>
                        <resource>
                            <directory>../idgarsec/webapp/WEB-INF/jsscripts/</directory>
                            <targetPath></targetPath>
                            <filtering>true</filtering>
                        </resource>
                        <resource>
                            <directory>../idgarsec/webapp/WEB-INF/themes/</directory>
                            <targetPath>themes</targetPath>
                            <filtering>true</filtering>
                        </resource>
                        <resource>
                            <directory>../idgarsec/webapp/WEB-INF/</directory>
                            <targetPath>WEB-INF</targetPath>
                            <filtering>true</filtering>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
    </build>

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

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

发布评论

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