开发者

Maven project. Two POMs, one for dev, one for publishing

I am working on a library that uses Maven. The current pom.xml file has a lot of stuff related to tests, reports, etc.

I now want to publish a release of this library to a private Maven repository. I need to s开发者_高级运维upply a much simpler pom.xml file to the repository.

How is this managed? Can you generate the simpler pom file from the one used in development?


  • Set up your private Maven repository to mirror/ proxy all required repositories and pluginRepositories
  • Configure your settings.xml to redirect all requests to your private Maven repository
  • Remove the repositories and pluginRepositories from your POM

-> no separate POM needed for deployment


Otherwise pom simply is an XML. You can apply an XSLT wrapper to sort out the entries you want to change and wrap the maven build scripts within some batch commands.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜