maven-assembly-plugin 打包可执行jar包

<build> 
  <plugins> 
    <plugin> 
      <artifactId>maven-assembly-plugin</artifactId>  
      <configuration> 
        <appendAssemblyId>false</appendAssemblyId>  
        <descriptorRefs> 
          <descriptorRef>jar-with-dependencies</descriptorRef> 
        </descriptorRefs>  
        <archive> 
          <manifest> 
            <mainClass>the.Main</mainClass> 
          </manifest> 
        </archive> 
      </configuration>  
      <executions> 
        <execution> 
          <id>make-assembly</id>  
          <phase>package</phase>  
          <goals> 
            <goal>assembly</goal> 
          </goals> 
        </execution> 
      </executions> 
    </plugin> 
  </plugins> 
</build>

No Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

粤ICP备15062915号-1