最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Why spring-boot maven plugin exclude my resource file in final jar - Stack Overflow

programmeradmin1浏览0评论

I have spring-boot 3.4.3 project:

  <plugin>
    <groupId>.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <executions>
      <execution>
        <phase>generate-sources</phase>
        <goals>
          <goal>add-source</goal>
        </goals>
        <configuration>
          <sources>
            <source>src/main/generated</source>
          </sources>
        </configuration>
      </execution>
    </executions>
  </plugin>

  <plugin>
    <groupId>.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
  </plugin>

I add a dir as source directory using the plugin build-helper-maven-plugin, In that src/main/generated folder, there are java files and XML files, after run mvn clean package, only java class files was included, all XML files wrere missing..

but both java classes files and XML files were in target/classes

I tried to look into configs of both build-helper-maven-plugin and spring-boot-maven-plugin, can't found suspicious config.

发布评论

评论列表(0)

  1. 暂无评论