|
@@ -214,4 +214,169 @@
|
|
<optional>true</optional>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencies>
|
|
|
|
+ <build>
|
|
|
|
+ <finalName>${project.artifactId}</finalName>
|
|
|
|
+ <resources>
|
|
|
|
+ <resource>
|
|
|
|
+ <directory>src/main/java</directory>
|
|
|
|
+ <includes>
|
|
|
|
+ <include>**/*.xml</include>
|
|
|
|
+ </includes>
|
|
|
|
+ </resource>
|
|
|
|
+
|
|
|
|
+ <resource>
|
|
|
|
+ <directory>src/main/resources</directory>
|
|
|
|
+ <includes>
|
|
|
|
+ <include>**/*.xml</include>
|
|
|
|
+ <include>**/*.txt</include>
|
|
|
|
+ <include>**/*.yml</include>
|
|
|
|
+ <include>**/*.proterties</include>
|
|
|
|
+ <include>**/*.factories</include>
|
|
|
|
+ <include>**/*.sql</include>
|
|
|
|
+ <include>**/*.json</include>
|
|
|
|
+ </includes>
|
|
|
|
+ </resource>
|
|
|
|
+ <resource>
|
|
|
|
+ <directory>src/main/resources</directory>
|
|
|
|
+ <filtering>true</filtering>
|
|
|
|
+ <includes>
|
|
|
|
+ <include>**/version.txt</include>
|
|
|
|
+ </includes>
|
|
|
|
+ </resource>
|
|
|
|
+ <resource>
|
|
|
|
+ <directory>src/main/resources</directory>
|
|
|
|
+ <filtering>false</filtering>
|
|
|
|
+ <excludes>
|
|
|
|
+ <exclude>**/version.txt</exclude>
|
|
|
|
+ </excludes>
|
|
|
|
+ </resource>
|
|
|
|
+ </resources>
|
|
|
|
+ <plugins>
|
|
|
|
+ <plugin>
|
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
+ <artifactId>maven-surefire-plugin</artifactId>
|
|
|
|
+ <configuration>
|
|
|
|
+ <skipTests>true</skipTests>
|
|
|
|
+ </configuration>
|
|
|
|
+ </plugin>
|
|
|
|
+ <plugin>
|
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
+ <artifactId>maven-compiler-plugin</artifactId>
|
|
|
|
+ <configuration>
|
|
|
|
+ <source>${java.version}</source>
|
|
|
|
+ <target>${java.version}</target>
|
|
|
|
+ </configuration>
|
|
|
|
+ </plugin>
|
|
|
|
+
|
|
|
|
+ <plugin>
|
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
|
+ <artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
|
+ </plugin>
|
|
|
|
+
|
|
|
|
+ <plugin>
|
|
|
|
+ <groupId>pl.project13.maven</groupId>
|
|
|
|
+ <artifactId>git-commit-id-plugin</artifactId>
|
|
|
|
+ <executions>
|
|
|
|
+ <execution>
|
|
|
|
+ <goals>
|
|
|
|
+ <goal>revision</goal>
|
|
|
|
+ </goals>
|
|
|
|
+ </execution>
|
|
|
|
+ </executions>
|
|
|
|
+ <configuration>
|
|
|
|
+ <verbose>true</verbose>
|
|
|
|
+ <dateFormat>yyyyMMddHHmm</dateFormat>
|
|
|
|
+ <generateGitPropertiesFile>true</generateGitPropertiesFile>
|
|
|
|
+ <generateGitPropertiesFilename>target/git.properties</generateGitPropertiesFilename>
|
|
|
|
+ </configuration>
|
|
|
|
+ </plugin>
|
|
|
|
+ <plugin>
|
|
|
|
+ <groupId>com.coderplus.maven.plugins</groupId>
|
|
|
|
+ <artifactId>copy-rename-maven-plugin</artifactId>
|
|
|
|
+ <version>1.0.1</version>
|
|
|
|
+ <executions>
|
|
|
|
+ <execution>
|
|
|
|
+ <id>rename-file</id>
|
|
|
|
+ <phase>compile</phase>
|
|
|
|
+ <goals>
|
|
|
|
+ <goal>rename</goal>
|
|
|
|
+ </goals>
|
|
|
|
+ <configuration>
|
|
|
|
+ <sourceFile>${project.build.directory}/git.properties</sourceFile>
|
|
|
|
+ <destinationFile>${project.build.directory}/version.txt</destinationFile>
|
|
|
|
+ </configuration>
|
|
|
|
+ </execution>
|
|
|
|
+ </executions>
|
|
|
|
+ </plugin>
|
|
|
|
+ <plugin>
|
|
|
|
+ <artifactId>maven-resources-plugin</artifactId>
|
|
|
|
+ <executions>
|
|
|
|
+ <execution>
|
|
|
|
+ <id>copy-resources</id>
|
|
|
|
+ <phase>package</phase>
|
|
|
|
+ <goals>
|
|
|
|
+ <goal>copy-resources</goal>
|
|
|
|
+ </goals>
|
|
|
|
+ <configuration>
|
|
|
|
+ <resources>
|
|
|
|
+ <resource>
|
|
|
|
+ <directory>src/main/resources/</directory>
|
|
|
|
+ <includes>
|
|
|
|
+ <include>**/template/**.**</include>
|
|
|
|
+ <include>**/*.yml</include>
|
|
|
|
+ <include>**/*.properties</include>
|
|
|
|
+ </includes>
|
|
|
|
+ </resource>
|
|
|
|
+ <resource>
|
|
|
|
+ <directory>${project.build.directory}</directory>
|
|
|
|
+ <includes>
|
|
|
|
+ <include>**/version.txt</include>
|
|
|
|
+ </includes>
|
|
|
|
+ </resource>
|
|
|
|
+ </resources>
|
|
|
|
+ <outputDirectory>${project.build.directory}/config</outputDirectory>
|
|
|
|
+ </configuration>
|
|
|
|
+ </execution>
|
|
|
|
+ <execution>
|
|
|
|
+ <id>copy-version</id>
|
|
|
|
+ <phase>package</phase>
|
|
|
|
+ <goals>
|
|
|
|
+ <goal>copy-resources</goal>
|
|
|
|
+ </goals>
|
|
|
|
+ <configuration>
|
|
|
|
+ <resources>
|
|
|
|
+ <resource>
|
|
|
|
+ <directory>src/script</directory>
|
|
|
|
+ </resource>
|
|
|
|
+ </resources>
|
|
|
|
+ <outputDirectory>${project.build.directory}</outputDirectory>
|
|
|
|
+ </configuration>
|
|
|
|
+ </execution>
|
|
|
|
+ </executions>
|
|
|
|
+ </plugin>
|
|
|
|
+
|
|
|
|
+ <plugin>
|
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
+ <artifactId>maven-assembly-plugin</artifactId>
|
|
|
|
+ <executions>
|
|
|
|
+ <execution>
|
|
|
|
+ <id>make-assembly</id>
|
|
|
|
+ <phase>package</phase>
|
|
|
|
+ <goals>
|
|
|
|
+ <goal>single</goal>
|
|
|
|
+ </goals>
|
|
|
|
+ <configuration>
|
|
|
|
+ <finalName>
|
|
|
|
+ ${project.artifactId}_${git.commit.time}_git_${git.branch}_${git.commit.id.abbrev}
|
|
|
|
+ </finalName>
|
|
|
|
+ <appendAssemblyId>false</appendAssemblyId>
|
|
|
|
+ <descriptors>
|
|
|
|
+ <descriptor>src/script/zip.xml</descriptor>
|
|
|
|
+ </descriptors>
|
|
|
|
+ </configuration>
|
|
|
|
+ </execution>
|
|
|
|
+ </executions>
|
|
|
|
+ </plugin>
|
|
|
|
+ </plugins>
|
|
|
|
+ </build>
|
|
</project>
|
|
</project>
|