赞
踩
- <!-- 将工程依赖的jar包,复制至target/lib目录下进行管理,方便已生成jar的工程进行引用。 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/lib</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>false</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <includes>
- <include>
- <groupId>nothing</groupId>
- <artifactId>nothing</artifactId>
- </include>
- </includes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <!-- 主函数的入口 -->
- <mainClass>com.ed.core.CoreCaseApplication</mainClass>
- <!-- 打包时 MANIFEST.MF文件不记录的时间戳版本 -->
- <useUniqueVersions>false</useUniqueVersions>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib/</classpathPrefix>
- </manifest>
- <manifestEntries>
- <Class-Path>.</Class-Path>
- </manifestEntries>
- </archive>
- <packagingExcludes>WEB-INF/lib/**.jar</packagingExcludes>
- </configuration>
- </plugin>
Pom.xml 中配置完成后,需要执行命令:mvn install 即可。
命令执行完成后,对应的target 文件夹下会多一个lib的文件夹。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。