Advertisement
hivefans

java_scala_pom.xml

Aug 5th, 2020
1,565
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.14 KB | None | 0 0
  1. <build>
  2.         <pluginManagement>
  3.             <plugins>
  4.                 <!-- 编译scala的插件 -->
  5.                 <plugin>
  6.                     <groupId>net.alchim31.maven</groupId>
  7.                     <artifactId>scala-maven-plugin</artifactId>
  8.                     <version>3.2.2</version>
  9.                 </plugin>
  10.                 <!-- 编译java的插件 -->
  11.                 <plugin>
  12.                     <groupId>org.apache.maven.plugins</groupId>
  13.                     <artifactId>maven-compiler-plugin</artifactId>
  14.                     <version>3.5.1</version>
  15.                 </plugin>
  16.             </plugins>
  17.         </pluginManagement>
  18.         <plugins>
  19.             <plugin>
  20.                 <groupId>net.alchim31.maven</groupId>
  21.                 <artifactId>scala-maven-plugin</artifactId>
  22.                 <executions>
  23.                     <execution>
  24.                         <id>scala-compile-first</id>
  25.                         <phase>process-resources</phase>
  26.                         <goals>
  27.                             <goal>add-source</goal>
  28.                             <goal>compile</goal>
  29.                         </goals>
  30.                     </execution>
  31.                     <execution>
  32.                         <id>scala-test-compile</id>
  33.                         <phase>process-test-resources</phase>
  34.                         <goals>
  35.                             <goal>testCompile</goal>
  36.                         </goals>
  37.                     </execution>
  38.                 </executions>
  39.             </plugin>
  40.  
  41.             <plugin>
  42.                 <groupId>org.apache.maven.plugins</groupId>
  43.                 <artifactId>maven-compiler-plugin</artifactId>
  44.                 <executions>
  45.                     <execution>
  46.                         <phase>compile</phase>
  47.                         <goals>
  48.                             <goal>compile</goal>
  49.                         </goals>
  50.                     </execution>
  51.                 </executions>
  52.             </plugin>
  53.             <!-- 打包插件 -->
  54.             <plugin>
  55.                 <groupId>org.apache.maven.plugins</groupId>
  56.                 <artifactId>maven-shade-plugin</artifactId>
  57.                 <version>2.4.3</version>
  58.                 <executions>
  59.                     <execution>
  60.                         <phase>package</phase>
  61.                         <goals>
  62.                             <goal>shade</goal>
  63.                         </goals>
  64.                         <configuration>
  65.                             <filters>
  66.                                 <filter>
  67.                                     <artifact>*:*</artifact>
  68.                                     <excludes>
  69.                                         <exclude>META-INF/*.SF</exclude>
  70.                                         <exclude>META-INF/*.DSA</exclude>
  71.                                         <exclude>META-INF/*.RSA</exclude>
  72.                                     </excludes>
  73.                                 </filter>
  74.                             </filters>
  75.                         </configuration>
  76.                     </execution>
  77.                 </executions>
  78.             </plugin>
  79.         </plugins>
  80.     </build>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement