idea maven 構(gòu)建本地jar包及pom文件的過程
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、每個模塊先 clean 命令、再install命令
4、輸出文件
到此這篇關(guān)于idea maven 構(gòu)建本地jar包及pom文件的文章就介紹到這了,更多相關(guān)idea maven本地jar包內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Java8使用lambda實(shí)現(xiàn)Java的尾遞歸
這篇文章主要介紹了Java8使用lambda實(shí)現(xiàn)Java的尾遞歸的相關(guān)資料,需要的朋友可以參考下2017-10-10SpringBoot之spring.factories的使用方式
這篇文章主要介紹了SpringBoot之spring.factories的使用方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2024-01-01IDEA 設(shè)置顯示內(nèi)存的使用情況和內(nèi)存回收的方法
這篇文章主要介紹了IDEA 設(shè)置顯示內(nèi)存的使用情況和內(nèi)存回收的方法,本文通過圖文并茂的形式給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-04-04Netty啟動流程服務(wù)端channel初始化源碼分析
這篇文章主要為大家介紹了Netty啟動流程服務(wù)端channel初始化源碼分析,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2022-03-03