zoukankan      html  css  js  c++  java
  • maven 打 fatjar

    备忘。

    1、

    <plugins>
    <plugin>
    <artifactId>maven-assembly-plugin</artifactId>
    <configuration>
    <descriptorRefs>
    <descriptorRef>jar-with-dependencies</descriptorRef>
    </descriptorRefs>
    <archive>
    <manifest>
    <mainClass>com.talkingdata.engineer.util.CombineAppList</mainClass> <!-- 含main方法的类 -->
    </manifest>
    </archive>
    </configuration>
    </plugin>
    </plugins>

    2、

    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <executions>
    <execution>
    <id>copy-dependencies</id>
    <phase>package</phase>
    <goals>
    <goal>copy-dependencies</goal>
    </goals>
    </execution>
    </executions>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-resources-plugin</artifactId>
    <version>2.4</version>
    <configuration>
    <encoding>UTF-8</encoding>
    </configuration>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
    <configuration>
    <source>1.5</source>
    <target>1.5</target>
    </configuration>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <version>2.1</version>
    <configuration>
    <tagBase>ssh://git@10.10.32.51/tdinsight-app-core/tags</tagBase>
    <autoVersionSubmodules>true</autoVersionSubmodules>
    <releaseProfiles>release</releaseProfiles>
    </configuration>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-deploy-plugin</artifactId>
    <version>2.6</version>
    </plugin>
    <plugin>
    <artifactId>maven-assembly-plugin</artifactId>
    <configuration>
    <appendAssemblyId>false</appendAssemblyId>
    <descriptorRefs>
    <descriptorRef>jar-with-dependencies</descriptorRef>
    </descriptorRefs>
    <archive>
    <manifest>
    </manifest>
    </archive>
    </configuration>
    <executions>
    <execution>
    <id>make-assembly</id>
    <phase>package</phase>
    <goals>
    <goal>assembly</goal>
    </goals>
    </execution>
    </executions>
    </plugin>

    </plugins>
    <pluginManagement>
    <plugins>
    <!--This plugin's configuration is used to store Eclipse m2e settings
    only. It has no influence on the Maven build itself. -->
    <plugin>
    <groupId>org.eclipse.m2e</groupId>
    <artifactId>lifecycle-mapping</artifactId>
    <version>1.0.0</version>
    <configuration>
    <lifecycleMappingMetadata>
    <pluginExecutions>
    <pluginExecution>
    <pluginExecutionFilter>
    <groupId>
    org.apache.maven.plugins
    </groupId>
    <artifactId>
    maven-dependency-plugin
    </artifactId>
    <versionRange>
    [2.1,)
    </versionRange>
    <goals>
    <goal>
    copy-dependencies
    </goal>
    </goals>
    </pluginExecutionFilter>
    <action>
    <ignore />
    </action>
    </pluginExecution>
    </pluginExecutions>
    </lifecycleMappingMetadata>
    </configuration>
    </plugin>
    </plugins>
    </pluginManagement>

  • 相关阅读:
    魅族17系列真机谍照泄露 前摄挖孔将添新功能
    联想在S规则债券市场完成了里程碑式的新债券发行
    王小二切饼、马拦过河卒
    Codeforces Round #561 (Div. 2) A Tale of Two Lands 【二分】
    19年省赛后总结
    Winner Winner【模拟、位运算】
    GCDLCM 【米勒_拉宾素数检验 (判断大素数)】
    Floating-Point Hazard【求导公式】
    Communication【floyd判环+并查集】
    Largest Allowed Area【模拟+二分】
  • 原文地址:https://www.cnblogs.com/fbiswt/p/3718847.html
Copyright © 2011-2022 走看看