I have used Maven extensively for my personal projects, but now I have to set it up for a small team of 5-7 developers.
My main question is, what's the recommended approach for managing dependencies to commercial libraries that are not available in the Maven repos? How can I manage the dependency of these commercial libraries on the open source libraries that they use and are available in Maven repos?
Also, are there any other recommendations and advices that I should know or implement to make the setup as efficient, effective, and smooth as possible?
Thanks in advance.
You probably want to start by setting up your own internal Maven repository using Nexus or Artifactory. Configure it as a repository for your own artifacts, and as a caching proxy for Central and any other external repositories that you need to fetch stuff from.
Then create binary only POM files for each of the commercial libraries, including dependencies on the published libraries that they depend on. Upload the POM files and corresponding JAR files to your internal repository in the required structure. Just make sure that these POMs and JARs are not visible outside your group / organization ... depending on what the license for the respective commercial products permit / require.
Of course, this means that you won't be able to make your applications (that depend on these libraries) publicly available via Maven. But you've probably already factored this into your planning.
i strongly advise to use a super parent pom with some common settings like
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<source>1.6</source><!-- java version -->
<target>1.6</target>
<encoding>UTF-8</encoding><!-- your source encodings -->
<debug>true</debug><!-- false for production -->
<optimize>false</optimize><!-- true for production -->
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
actually there a lot of those "common" settings (report plugins), a parent pom guarantees that all use the same and a change reaches all
well what else - beside an own maven repo (try nexus) - ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With