• 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>
    

      

    做自己的太阳,成为别人的光!
  • 相关阅读:
    51单片机按键连击
    未知设备号创建设备节点
    C语言中enum的用法
    linux 端口IO操作
    读写控制台记录级别
    linux内核驱动中读写函数
    使用gawk记录一段时间内,某个进程占用内存和CPU的情况
    <Linux> Ubuntu error: ssh: connect to host master port 22: No route to host lost connection
    MapReduce的分区与 分组二次排序
    问题
  • 原文地址:https://www.cnblogs.com/botaoli/p/12750876.html
Copyright © 2020-2023  润新知