标签:使用 cti oal cat 现在 找不到 artifact imp 第三方
使用这个命令 mvn compile && mvn package
<!--用以生成jar包的-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<!--区别于maven本身生成的构件,加上相关后缀-->
<classifier>release</classifier>
<!--排除的文件以及目录,这个是以class为当前目录的-->
<excludes>
<exclude>picture/**</exclude>
<exclude>mapper/**</exclude>
<exclude>**.yml</exclude>
<exclude>**.xml</exclude>
<exclude>**.properties</exclude>
</excludes>
<archive>
<!--这里是添加当前目录到classpath的依赖-->
<manifestEntries>
<class-path>.</class-path>
</manifestEntries>
<manifest>
<addClasspath>true</addClasspath>
<!--这个就是清单文件中classpath的前缀配置,比如你把所有jar包放入example_lib文件夹中,这里就配置example_lib-->
<classpathPrefix>aths_lib/</classpathPrefix>
<!--程序入口,main()所在文件的全限定类名-->
<mainClass>love.forte.simbot.demo.JavaDemoApplication</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>
copy-dependencies
</goal>
</goals>
<configuration>
<!--第三方将jar要导出的文件路径-->
<outputDirectory>${project.build.directory}/aths_lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
标签:使用 cti oal cat 现在 找不到 artifact imp 第三方
原文地址:https://www.cnblogs.com/pikatao/p/14354625.html