zoukankan      html  css  js  c++  java
  • 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

    执行:

    执行

  • 相关阅读:
    python模块
    Django基础
    Python __str__(self)和__unicode__(self)
    Redis基本操作
    测试面试宝典
    h5页面的测试方式
    selenium IDE的使用流程
    如何安装chrome扩展程序--selenium IDE
    Selenium 中 强制等待、显示等待、隐式等待的区别
    Selenium+Python 自动化 之八种元素定位方法
  • 原文地址:https://www.cnblogs.com/byteworld/p/6373990.html
Copyright © 2011-2022 走看看