您可以使用 maven-resources-plugin 为每个资源提供覆盖吗?

问题描述

因此,由于 IntelliJ,我在共享资源根时遇到了问题,我们已经通过资源插件添加了一些资源,出于性能原因,我不想覆盖其中的一些资源。在其他情况下,我希望它们被覆盖 所以我们不要忘记如果我们改变它们,我们必须删除它们。我可以指定吗(主要是从 the official documentation

复制粘贴
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>copy-resources</id>
            <!-- here the phase you need -->
            <phase>validate</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/extra-resources</outputDirectory>
              <resources>          
                <resource>
                  <overwrite>true</overwrite> <!-- will this work -->
                  <directory>src/non-packaged-resources</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>              
            </configuration>            
          </execution>
        </executions>
      </plugin>
    </plugins>

在我想覆盖的资源中?这个问题真的很简单我可以将覆盖直接放在资源上吗?它会起作用吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)