Advertisement
mitrakov

Shade plugin

Sep 22nd, 2018
405
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.21 KB | None | 0 0
  1. <build>
  2.   <finalName>cue-finder</finalName>
  3.   <plugins>
  4.     <!-- Compiler plugin -->
  5.     <plugin>
  6.       <groupId>org.apache.maven.plugins</groupId>
  7.       <artifactId>maven-compiler-plugin</artifactId>
  8.       <version>2.3.2</version>
  9.       <configuration>
  10.         <source>${maven.compiler.source}</source>
  11.         <target>${maven.compiler.target}</target>
  12.       </configuration>
  13.     </plugin>
  14.  
  15.     <!-- Maven Shade Plugin -->
  16.     <plugin>
  17.       <groupId>org.apache.maven.plugins</groupId>
  18.       <artifactId>maven-shade-plugin</artifactId>
  19.       <version>2.3</version>
  20.       <executions>
  21.         <!-- Run shade goal on package phase -->
  22.         <execution>
  23.           <phase>package</phase>
  24.           <goals>
  25.             <goal>shade</goal>
  26.           </goals>
  27.           <configuration>
  28.             <transformers>
  29.               <!-- add Main-Class to manifest file -->
  30.               <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
  31.                 <mainClass>ru.mitrakov.self.myapp.App</mainClass>
  32.               </transformer>
  33.             </transformers>
  34.           </configuration>
  35.         </execution>
  36.       </executions>
  37.     </plugin>
  38.   </plugins>
  39. </build>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement