Created
November 7, 2017 03:23
-
-
Save RebieKong/f235bf2f6a7a22c9945951c1129fa1f7 to your computer and use it in GitHub Desktop.
常用的一个maven-build的节点
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<resources> | |
<resource> | |
<directory>src/main/resources</directory> | |
<includes> | |
<include>*.xml</include> | |
<include>*.properties</include> | |
</includes> | |
<filtering>false</filtering> | |
</resource> | |
</resources> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<configuration> | |
<source>1.8</source> | |
<target>1.8</target> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-source-plugin</artifactId> | |
<version>3.0.1</version> | |
<executions> | |
<execution> | |
<id>attach-sources</id> | |
<goals> | |
<goal>jar</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-javadoc-plugin</artifactId> | |
<version>2.10.4</version> | |
<configuration> | |
<encoding>UTF-8</encoding> | |
<aggregate>true</aggregate> | |
<charset>UTF-8</charset> | |
<docencoding>UTF-8</docencoding> | |
</configuration> | |
<executions> | |
<execution> | |
<id>attach-javadocs</id> | |
<goals> | |
<goal>jar</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-dependency-plugin</artifactId> | |
<executions> | |
<execution> | |
<id>copy-dependencies</id> | |
<phase>prepare-package</phase> | |
<goals> | |
<goal>copy-dependencies</goal> | |
</goals> | |
<configuration> | |
<outputDirectory>${project.build.directory}/lib</outputDirectory> | |
<overWriteReleases>false</overWriteReleases> | |
<overWriteSnapshots>false</overWriteSnapshots> | |
<overWriteIfNewer>true</overWriteIfNewer> | |
<includeScope>runtime</includeScope> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>net.alchim31.maven</groupId> | |
<artifactId>scala-maven-plugin</artifactId> | |
<executions> | |
<execution> | |
<id>scala-compile-first</id> | |
<phase>process-resources</phase> | |
<goals> | |
<goal>add-source</goal> | |
<goal>compile</goal> | |
</goals> | |
</execution> | |
<execution> | |
<id>scala-test-compile</id> | |
<phase>process-test-resources</phase> | |
<goals> | |
<goal>testCompile</goal> | |
</goals> | |
</execution> | |
<execution> | |
<id>attach-scaladocs</id> | |
<phase>package</phase> | |
<goals> | |
<goal>doc-jar</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment