• Maven 编译


    pom.xml 添加插件

      <build>
    		<plugins>
    			<plugin>
    				<groupId>org.apache.maven.plugins</groupId>
    				<artifactId>maven-shade-plugin</artifactId>
    				<version>1.4</version>
    				<executions>
    					<execution>
    						<phase>package</phase>
    						<goals>
    							<goal>shade</goal>
    						</goals>
    						<configuration>
    						<webXml>WebContentWEB-INFweb.xml</webXml>    
    							<filters>
    								<filter>
    									<artifact>*:*</artifact>
    									<excludes>
    										<exclude>META-INF/*.SF</exclude>
    										<exclude>META-INF/*.DSA</exclude>
    										<exclude>META-INF/*.RSA</exclude>
    										<exclude>META-INF/*.XSD</exclude>
    									</excludes>
    								</filter>
    							</filters>
    							<transformers>
    								<transformer
    									implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
    									<mainClass>com.defonds.RsaEncryptor</mainClass>
    								</transformer>
    								<transformer
    									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
    									<resource>META-INF/spring.handlers</resource>
    								</transformer>
    								<transformer
    									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
    									<resource>META-INF/spring.schemas</resource>
    								</transformer>
    							</transformers>
    						</configuration>
    					</execution>
    				</executions>
    			</plugin>
    		</plugins>
    	</build>
        <!-- 可执行jar包 -->
    			<plugin>
    				<groupId>org.apache.maven.plugins</groupId>
    				<artifactId>maven-assembly-plugin</artifactId>
    				<version>2.3</version>
    				<configuration>
    					<appendAssemblyId>false</appendAssemblyId>
    					<descriptorRefs>
    						<descriptorRef>jar-with-dependencies</descriptorRef>
    					</descriptorRefs>
    					<archive>
    						<manifest>
    							<mainClass>com.spider.DYMovieProcessor</mainClass>
    						</manifest>
    					</archive>
    				</configuration>
    				<executions>
    					<execution>
    						<id>make-assembly</id>
    						<phase>package</phase>
    						<goals>
    							<goal>assembly</goal>
    						</goals>
    					</execution>
    				</executions>
    			</plugin>    
    

      

      

    pom.xml:<packaging>jar</packaging> 表示包  war 或者jar

    执行:

    执行

  • 相关阅读:
    ubuntu root 登录没有声音(waiting for sound system to respond)
    android openVG source prj
    http://source.android.com/ android官网(下载源码及sdk)
    8个优秀的Android开源游戏引擎
    2010開放原始碼創新應用開發大賽 (有很好的源码)
    GIT和repo使用方法:下载内核 android源码包
    Real6410系列教程 android
    [转]Protel布局文件转化为Allegro placement文件
    ubuntu网卡设置
    ubuntu 下安装java6的源
  • 原文地址:https://www.cnblogs.com/byteworld/p/6373990.html
Copyright © 2020-2023  润新知