idea工具用maven打jar包
程序员文章站
2024-02-02 10:26:13
...
配置pom.xml加入
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<useUniqueVersions>false</useUniqueVersions>
<classpathPrefix>lib/</classpathPrefix>
<!--mainclass指的是运行类的全类名-->
<mainClass>com.ebiz.CompetingMainApplication</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
在maven project 模块中点击package