這期內(nèi)容當(dāng)中小編將會(huì)給大家?guī)碛嘘P(guān)Maven項(xiàng)目實(shí)現(xiàn)打Jar包并添加依賴,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
使用maven-dependency-plugin插件
子項(xiàng)目中的pom.xml文件中,添加以下maven-dependency-plugin依賴,這個(gè)maven-dependency-plugin依賴的作用就是自動(dòng)拷貝jar包到target目錄
這是我的Maven子項(xiàng)目打包,指定了將它的依賴的父項(xiàng)目中的jar包拷貝到target下的lib目錄
<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> <!-- ${project.build.directory}為Maven內(nèi)置變量,缺省為target --> <outputDirectory>${project.build.directory}/lib</outputDirectory> <overWriteReleases>true</overWriteReleases> <overWriteSnapshots>true</overWriteSnapshots> <overWriteIfNewer>true</overWriteIfNewer> </configuration> </execution> </executions> </plugin>
當(dāng)前題目:Maven項(xiàng)目實(shí)現(xiàn)打Jar包并添加依賴-創(chuàng)新互聯(lián)
地址分享:http://www.sd-ha.com/article30/phjpo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供外貿(mào)網(wǎng)站建設(shè)、電子商務(wù)、商城網(wǎng)站、Google、網(wǎng)站設(shè)計(jì)公司、外貿(mào)建站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容