maven生成可执行jar包
写好的工具要打包,需要在pom文件,(我用mave来管理)里添加如下的配置
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>*.account.cor(www.111cn.net)e.GenerateAccount</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>assembly</goal>
</goals>
</execution>
</executions>
</plugin>
然后在工程目录执行
mvn assembly:assembly
就会在target目录生成jar包啦
from:http://www.111cn.net/jsp/Java/77784.htm |
|