admin管理员组

文章数量:1391934

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.

本文标签: Why springboot maven plugin exclude my resource file in final jarStack Overflow