<build>
<finalName>xxx-service-xxx</finalName>
<resources>
<resource>
<targetPath>${project.build.directory}/classes</targetPath>
<directory>src/main/java</directory>
<filtering>true</filtering>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<targetPath>${project.build.directory}/classes</targetPath>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
<!--dubbo主main读取META-INF/spring 下的spring文件-->
<resource>
<targetPath>${project.build.directory}/classes/META-INF/spring</targetPath>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>spring-context.xml</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<excludes><!--这几个文件排除-->
<exclude>application.properties</exclude>
<exclude>dubbo-consumer.xml</exclude>
<exclude>eda_producer.xml</exclude>
<exclude>register</exclude>
<exclude>register/zk_config.properties</exclude>
<exclude>com/xxx/globalrouter/service/client/Application.class</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
maven_build_resource_写给自己看的
最新推荐文章于 2022-07-09 17:22:43 发布