码迷,mamicode.com
首页 > 编程语言 > 详细

maven 打包jar && lib

时间:2018-07-18 19:05:24      阅读:123      评论:0      收藏:0      [点我收藏+]

标签:hive   ref   targe   target   cut   跳过   pil   ack   compile   

1.打包成jar直接运行:

<build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            
            <!-- 制定启动的方法 -->
              <plugin>
                 <artifactId>maven-assembly-plugin</artifactId>
                 <configuration>
                      <descriptorRefs>
                           <descriptorRef>jar-with-dependencies</descriptorRef>
                      </descriptorRefs>
                      <archive>
                           <manifest>
                                <mainClass>com.github.wycm.hpp.proxy.Main</mainClass>
                           </manifest>
                      </archive>
                 </configuration>
                 <executions>
                      <execution>
                           <id>make-assembly</id>
                           <phase>package</phase>
                           <goals>
                                <goal>single</goal>
                           </goals>
                      </execution>
                 </executions>
            </plugin>
            <!-- 跳过单元测试 -->
            <plugin>    
                <groupId>org.apache.maven.plugin</groupId>    
                <artifactId>maven-compiler-plugin</artifactId>    
                <version>2.1</version>    
                <configuration>    
                    <skip>true</skip>    
                </configuration>    
            </plugin>    
            <plugin>    
                <groupId>org.apache.maven.plugins</groupId>    
                <artifactId>maven-surefire-plugin</artifactId>    
                <version>2.5</version>    
                <configuration>    
                    <skip>true</skip>    
                </configuration>    
            </plugin>  
            
        </plugins>
    </build>

 

maven 打包jar && lib

标签:hive   ref   targe   target   cut   跳过   pil   ack   compile   

原文地址:https://www.cnblogs.com/iathanasy/p/9330885.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!