标签:als ram cat add beta xml文件 jar XML pom.xml文件
pom.xml文件中packaging为jar
<packaging>jar</packaging>
安装插件
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> <mainClass>com.ysusoft.nowidwatcher.NowidwatcherApplication</mainClass> </configuration> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-5</version> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <!--<mainClass>com.bms.Main.Main</mainClass>--> <mainClass>com.ysusoft.nowidwatcher.NowidwatcherApplication</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> <executions> <execution> <id>assemble-all</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin>
用idea开发工具,点击右侧【maven project】先clean,然后再package,就会把jar包打进target目录中
标签:als ram cat add beta xml文件 jar XML pom.xml文件
原文地址:https://www.cnblogs.com/javaddd/p/10010084.html