maven-assembly-plugin,支持自定义的打包结构,也可以定制依赖项等 现有maven的普通java项目,项目根路径下有files文件夹,该文件夹下有一些文件 1、利用resource插件将files文件夹编译到target/classes目录下 <build> <resources> <resource> <directory>files</directory> <targetPath>/files</targetPath> </resource> ...
6.maven-resources-plugin <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>3.1.0</version> </plugin> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>application.yml</include> <incl...
<artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>${source.encoding}</encoding> </configuration> </plugin> <!--spring boot 的编译插件 --> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <executions> <execution> ...
<fileSet> <directory>src/main/resources</directory> conf <fileMode>0644</fileMode> </fileSet> <!-- 将项目中src/main/resources目录下的日志文件copy到target目录的logs目录下 --> <fileSet> <directory>src/main/resources</directory> logs <fileMode>0755</fileMode> <excludes> <exclude>**/*</exclude...
<resources> <resource> <directory>src/main/conf</directory> </resource> <resource> <directory>src/main/resources</directory> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> ...
-- 设置文件 UNIX 属性,是一种读写权限 --></fileSet><fileSet><directory>src/main/resources</directory>conf<includes><include>config.properties</include><include>logback.xml</include></includes><fileMode>0644</fileMode></fileSet></fileSets></assembly> 二、maven-shade-plugin 1. 插件...
<directory>${project.basedir}/src/main/resources</directory> <!-- outputDirectory:生成目录的路径。--> ${file.separator} <!-- includes/excludes:设定包含或排除哪些文件,支持通配符--> <includes> <include>application*.yml</include> <include>log*.xml</include> <include...
{project.build.directory}/classes</directory> <outputDirectory>/classes</outputDirectory> </fileSet> <fileSet> <directory>src/main/resources</directory> <outputDirectory>/resources</outputDirectory> <includes> <include>...
-- 配置项目中需要被打包的文件的存储路径 --> <directory>${project.basedir}/src/main/resources/${env}</directory> /config <includes> <!-- 可以指定单个文件 --> <!--<include>project.config</include>--> <!-- 可以直接指定所有文件 --> <include>*.*</include> </includes> </fileSet> ...
-- 将项目中src/main/resources目录下的日志文件copy到target目录的logs目录下 --><fileSet><directory>src/main/resources</directory>logs<fileMode>0755</fileMode><excludes><exclude>**/*</exclude></excludes></fileSet><!-- 将项目中target目录下的包含jar的文件copy到lib目录下 --><fileSet><directory...