码迷,mamicode.com
首页 > 其他好文 > 详细

Intell 使用 assembly插件 打包可执行Iar包

时间:2017-12-26 14:41:50      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:.gz   gpo   with   项目   put   pen   art   nbsp   使用   

1、在pom.xml文件中增加assembly插件

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                <executions>
                   <execution>
                      <id>pack_tar_gz</id>
                      <configuration>
                          <descriptor>assembly.xml</descriptor>
                          <fileName>???</fileName>
                      </configuration>
                      <phase>package</phase>
                      <goals>
                           <goal>single</goal>
                      </goals>
                  <execution>
             </executions>   
              </configuration>
</plugin                    

  2、在项目下创建assembly.xml文件,内容为

<assembly
    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
    <id>jar-with-dependencies</id>
    <formats>
        <format>tar.gz</format>
    </formats>
//    <includeBaseDirectory>false</includeBaseDirectory>
//    <dependencySets>
//        <dependencySet>
//            <useProjectArtifact>true</useProjectArtifact>
//            <outputDirectory>/lib</outputDirectory>
//            <unpack>false</unpack>
//            <scope>runtime</scope>
//       </dependencySet>
//   </dependencySets>
    <fileSets>
        <fileSet>
            <directory>${project.build.outputDirectory}</directory>
            <outputDirectory>/</outputDirectory>
        </fileSet>
    </fileSets>
</assembly>

3、打开maven Projects  点击install打包

4、查看target文件夹下有没有打包成功的xx-all.tar,gz文件

Intell 使用 assembly插件 打包可执行Iar包

标签:.gz   gpo   with   项目   put   pen   art   nbsp   使用   

原文地址:https://www.cnblogs.com/zhangxuliang/p/8116952.html

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