How to deploy maven artifacts if they are not present in the central repository

和自甴很熟 提交于 2020-01-15 12:05:11

问题


What would be the mechanism to deploy rar artifacts if they are not present in the repository. (e.g. I would like to deploy jackrabbit to my j2ee application, but it is not available as part of the maven repositories. Should I have to store the binary locally in SVN and use the antrun plugin to copy it?


回答1:


A more specific answer to your question however is that Jackrabbit is available in the central repository:

http://repo2.maven.org/maven2/org/apache/jackrabbit/jackrabbit-jca/2.0.0/

You can include it with:

<dependency>
  <groupId>org.apache.jackrabbit</groupId>
  <artifactId>jackrabbit-jca</artifactId>
  <version>2.0.0</version>
  <type>rar</type>
</dependency>



回答2:


One would typically use an enterprise repository (like Nexus) for this. If this is not an option, have a look at this previous answer for a way to store dependencies in your version control system.



来源:https://stackoverflow.com/questions/2468028/how-to-deploy-maven-artifacts-if-they-are-not-present-in-the-central-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!