Mavenのプラグパッキング:jarファイルの依存関係にパッケージの依存関係パッケージのlib

<! -梱包プラグ、LIBの依存関係に詰めjarファイルの依存関係と別々のパッケージ、実行可能なテスト- > 
<プラグイン>
<groupIdを> org.apache.maven.plugins </ groupIdを>
<たartifactId> JAR-のMavenプラグイン- </たartifactId>
<バージョン> 2.6 </バージョン>
<構成>
<アーカイブ>
<マニフェスト>
<addClassPath> trueに</ addClassPath>
<classpathPrefix>のlib / </ classpathPrefix>
<mainClass> com.xxx.xxxService </ mainClass>
</マニフェスト>
</アーカイブ>
</構成>
</プラグイン>
<プラグイン>
<groupIdを> org.apache.maven.plugins </ groupIdを>
<たartifactId> Mavenの依存性、プラグイン</たartifactId>
<バージョン> 2.10 </バージョン>
<実行>
<実行>
<id>のコピーの依存関係</ ID>
<相>パッケージ</相>
<目標>
<目標>コピーの依存関係</目標>
</目標>
<設定>
<OUTPUTDIRECTORY> $ {プロジェクト.build.directory} / libに</ OUTPUTDIRECTORY>
</ configuration>の
</実行>
</実行>
</プラグイン>

<! -打包、把依赖包打包到ジャー内の测试のOK - >
<! - <プラグイン> - >
<! - <たartifactId>のmaven-組立・プラグイン</たartifactId> - >
<! - <設定> - >
<! - <descriptorRefs> - >
<! - <descriptorRef>ジャーとの依存関係</ descriptorRef> - >
<! - </ descriptorRefs> - >
<! - <アーカイブ> - >
<! - <マニフェスト> - >
<! - <mainClass> com.xxx.xxxService </ mainClass> - >
<! - </マニフェスト> - >
<! - </アーカイブ> - >
<! - </ configuration>の- >
<! - <実行> - >
<! - <実行> - >
<! - <id>のメイクアセンブリ</ ID> - >
<! - <相>パッケージ</位相> - >
<! - <目標> - >
<! - <目標>シングル</目標> - >
<! - </ゴール> - >
<! - </実行> - >
<! - </実行> - >
<! - </プラグイン> - >

おすすめ

転載: www.cnblogs.com/ranran-liang123/p/11274189.html