idea maven 構(gòu)建本地jar包及pom文件的過(guò)程
1、設(shè)置模塊build 本地輸出路徑
<build>
<defaultGoal>compile</defaultGoal>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
<outputDirectory>D:\Maven\apache-maven-3.8.4\repository\</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
2、父項(xiàng)目pom 文件,build 項(xiàng)、repository 項(xiàng) 設(shè)置
<build>
<defaultGoal>compile</defaultGoal>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.tql</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<excludes>
<exclude>**/node_modules/**</exclude>
</excludes>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>releases</id>
<name>Releases</name>
<url>D://Maven//apache-maven-3.8.4//repository/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<name>Snapshots</name>
<url>D://Maven//apache-maven-3.8.4//repository/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>releases</id>
<name>Releases</name>
<url>D://Maven//apache-maven-3.8.4//repository/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>3、每個(gè)模塊先 clean 命令、再install命令

4、輸出文件

到此這篇關(guān)于idea maven 構(gòu)建本地jar包及pom文件的文章就介紹到這了,更多相關(guān)idea maven本地jar包內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
IntelliJ IDEA 2021.1 EAP 4 發(fā)布:字體粗細(xì)可調(diào)整Git commit template 支持
這篇文章主要介紹了IntelliJ IDEA 2021.1 EAP 4 發(fā)布:字體粗細(xì)可調(diào)整,Git commit template 支持,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2021-02-02
使用JPA進(jìn)行CriteriaQuery進(jìn)行查詢的注意事項(xiàng)
這篇文章主要介紹了使用JPA進(jìn)行CriteriaQuery進(jìn)行查詢的注意事項(xiàng),具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2021-12-12
Java基于分治算法實(shí)現(xiàn)的線性時(shí)間選擇操作示例
這篇文章主要介紹了Java基于分治算法實(shí)現(xiàn)的線性時(shí)間選擇操作,涉及java排序、比較、計(jì)算等相關(guān)操作技巧,需要的朋友可以參考下2017-11-11
AJAX Servlet實(shí)現(xiàn)數(shù)據(jù)異步交互的方法
本篇文章主要介紹了AJAX Servlet實(shí)現(xiàn)數(shù)據(jù)異步交互的方法,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2017-07-07
SpringBoot項(xiàng)目從開(kāi)發(fā)到打包發(fā)布的完整教程
本文手把手帶你從零搭建 SpringBoot 項(xiàng)目,實(shí)現(xiàn)Redis 緩存 + MySQL 日志 + 第三方接口調(diào)用,并完成服務(wù)器打包部署,全程與 Node.js 對(duì)比,新手也能快速上手,需要的朋友可以參考下2026-04-04
java8中的Collectors.groupingBy用法詳解
這篇文章主要介紹了java8中的Collectors.groupingBy用法詳解,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2021-03-03
JAVA-NIO之Socket/ServerSocket Channel(詳解)
下面小編就為大家?guī)?lái)一篇JAVA-NIO之Socket/ServerSocket Channel(詳解)。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2017-06-06

