`
wbj0110
  • 浏览: 1549737 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

Maven deploy jar with dependencies to repo

阅读更多

 

I can deploy a jar by using the following in my pom.xml and running mvn deploy:

<distributionManagement><repository><id>releases</id><url>http://${host}:8081/nexus/content/repositories/releases</url></repository><snapshotRepository><id>snapshots</id><name>InternalSnapshots</name><url>http://${host}:8081/nexus/content/repositories/snapshots</url></snapshotRepository></distributionManagement>

And I can build an executable jar-with-dependencies using the following:

<plugin><artifactId>maven-assembly-plugin</artifactId><executions><execution><id>create-executable-jar</id><phase>deploy</phase><goals><goal>single</goal></goals><configuration><descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs><archive><manifest><mainClass>my.company.app.Main</mainClass></manifest></archive></configuration></execution></executions></plugin>


 

 

<plugin><artifactId>maven-deploy-plugin</artifactId><version>2.7</version><executions><execution><id>deploy-executable</id><goals><goal>deploy-file</goal></goals><configuration><file>target/Monitoring-Client-1.0-SNAPSHOT-jar-with-dependencies.jar</file></configuration></execution></executions></plugin>

 

 

 

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics