gpt4 book ai didi

java - Maven 远程资源插件未创建 remote-resources.xml list 文件

转载 作者:行者123 更新时间:2023-11-29 06:34:47 27 4
gpt4 key购买 nike

我有一个多模块 Maven 项目,它跨模块使用相同的资源文件。我创建了资源项目并将资源添加到 src/main/resources 文件夹。这是我的 pom.xml 文件:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myproject</groupId>
<artifactId>project-resources</artifactId>
<version>0.0.1</version>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>**/*.*</include>
</includes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

当我进行构建时,未创建 META-INF/maven/remote-resources.xml 文件。我做错了什么吗?

最佳答案

尝试:

   <pluginManagement>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.5</version>
</plugin>
...
</plugins>
</pluginManagement>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>**/*</include>
</includes>
</configuration>
</plugin>
...
</plugins>

换句话说:也将它添加到插件部分,而不仅仅是插件管理部分。

关于java - Maven 远程资源插件未创建 remote-resources.xml list 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23087222/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com