Alex Rivera | Logout

Build Maven project with proprietary libraries included

Asked 2010-12-20T15:43:33.953
51

How to create a Maven POM file, which will make the project buildable, can I include proprietary JAR files with my project directly without having to take them from repository?

I don't want to make it runnable by building an assembly with dependencies JAR files; I want it to be buildable. So anyone having this project is able to build it, even if JAR files are nowhere to be found at any repository.

Edit
Report

2 Answers

3

A good way to achieve this is to have a Maven mirror server, such as Sonatype Nexus. It is free and is very easy to set up (Java web application). With Nexus, one can have a private (team, corporate, etc.) repository with a capability of deploying third-party and internal applications into it, while also registering other Maven repositories as part of the same server.

This way, the local Maven settings would reference only the one private Nexus server and all the dependencies will be resolved using it.

answered 2010-12-20T16:11:04.073
1

I think that the "right" solution here is to add your proprietary libraries to your own repository. It should be simple: create a POM file for your library project and publish the compiled version in your repository.

Add this repository to the list of repositories for your mail project and run build. I believe it will work for you.

answered 2010-12-20T16:35:04.077

Your Answer