zoukankan      html  css  js  c++  java
  • maven打包插件

    maven打包插件

    <build>
    	<pluginManagement>
    		<plugins>
    			<!-- 编译scala的插件 -->
    			<plugin>
    				<groupId>net.alchim31.maven</groupId>
    				<artifactId>scala-maven-plugin</artifactId>
    				<version>3.2.2</version>
    			</plugin>
    			<!-- 编译java的插件 -->
    			<plugin>
    				<groupId>org.apache.maven.plugins</groupId>
    				<artifactId>maven-compiler-plugin</artifactId>
    				<version>3.5.1</version>
    			</plugin>
    		</plugins>
    	</pluginManagement>
    	<plugins>
    		<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>
    			</executions>
    		</plugin>
    
    		<plugin>
    			<groupId>org.apache.maven.plugins</groupId>
    			<artifactId>maven-compiler-plugin</artifactId>
    			<executions>
    				<execution>
    					<phase>compile</phase>
    					<goals>
    						<goal>compile</goal>
    					</goals>
    				</execution>
    			</executions>
    		</plugin>
    
    	<!-- 打jar插件 -->
    		<plugin>
    			<groupId>org.apache.maven.plugins</groupId>
    			<artifactId>maven-shade-plugin</artifactId>
    			<version>2.4.3</version>
    			<executions>
    				<execution>
    					<phase>package</phase>
    					<goals>
    						<goal>shade</goal>
    					</goals>
    					<configuration>
    						<filters>
    							<filter>
    								<artifact>*:*</artifact>
    								<excludes>
    									<exclude>META-INF/*.SF</exclude>
    									<exclude>META-INF/*.DSA</exclude>
    									<exclude>META-INF/*.RSA</exclude>
    								</excludes>
    							</filter>
    						</filters>
    					</configuration>
    				</execution>
    			</executions>
    		</plugin>
    	</plugins>
    </build>
    

      

    做自己的太阳,成为别人的光!
  • 相关阅读:
    Java怎样对一个属性设置set或get方法的快捷键
    小程序怎样控制rich-text中的<img>标签自适应
    Java中Arrys数组常用的方法
    Java 怎样实现调用其他方法
    Java保留两位小数
    解决ajax请求跨域
    rand(7) 到rand(10)
    c++生成随机数
    批量该文件名
    正则表达式(=)
  • 原文地址:https://www.cnblogs.com/botaoli/p/12750876.html
Copyright © 2011-2022 走看看