开发者

How to make a maven project buildable for the customer

We have a project which should be buildable by the customer using maven. It has some open 开发者_StackOverflow社区source dependencies that are mavenized (no problem), some that aren't mavenized, proprietary stuff (oracle jdbc driver) and some internal stuff.

Until now we had everything but the first category packaged with the project itself in a local repository (repository with file://path-in-project-folder specified in the projects pom.xml).

We would love to move these out of the project, as we are about to use them in other projects as well. Currently we plan to use nexus as an internal maven repository.

Whats the best practice to make such dependencies/maven repositories available to the customer so he can continue to build the project.

Ideas so far:

  • Customer sets up a nexus repository as well, we somehow deploy all these non-public dependencies to his repository (like a mirror)
  • We provide a 'dumb' dump/snapshot of the non-public dependencies, customer adds this snapshot to this settings.xml as a repository, (but how is this possible).
  • Make our internal nexus repo available to the customers build server (not an option in our case)

I'm wondering how others solve these problems.

Thank you!


Of course, hosting a repository of some kind is a straightforward option, as long as you can cover the uptime / bandwidth / authentication requirements.

If you're looking to ship physical artifacts, you'll find this pattern helpful: https://brettporter.wordpress.com/2009/06/10/a-maven-friendly-pattern-for-storing-dependencies-in-version-control/

That relies on the repository being created in source control - if you want a project to build a repository, consider something like: http://svn.apache.org/viewvc/incubator/npanday/trunk/dist/npanday-repository-builder/pom.xml?revision=1139488&view=markup (using the assembly plugin's capability to build a repository).

Basically, by building a repository you can ship that with the source code and use file:// to reference it from within the build.


There are two options:

  1. Document exactly what artifacts you need to compile which are not available via Maven Central
  2. Implement Nexus and make a export with Nexus give the export to customer and they need to do a import of it. I'm not sure if you come to licenses issues.

I assumed that you already have a Repository Manager already but it reads like you didn't.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜