java - Best practices for installing 3rd party libraries into your hosted Maven repository? -
Assume that you have a project that is using 3rd party libraries, such as currently not being deployed Also, this is not a problem of popular or popular Maven public treasures / indexes, because I can deploy artifact only in my local hosted Nexus repository.
But, for any best practice in the Maven community, how should I name the "coordinates" of this library "in my POM, because the standard is not already set in public treasury? >
For example, I should refer to it in its POM
dependency> gt; & lt; group & gt; com.google & lt; / group & Gt; & lt; artifactId & gt; GData-Analysis & lt; / artifactId> & lt; version & gt; 1.0 & lt; / version & gt; & lt; / dependency & gt; Is there a better / more standard way for me to come up with artifactId ?
What you have done is very reasonable Blank Dots:
-
When Maven has received an Artifact from Nexus, then Artwork has been designated as Artifact ID-Edition. The GroupID has been annoyingly dropped. Therefore, when artifacts are taken around (say, a web app is copied to the web-INF / Lib), your jar file will be read "
". This is usually not a problem, however, if the name of the hypnotic is very common, like "usage", then you want to include group information inside artistic, like " com.google " Group ID and " com.google.gdata-analysis ". Yes, repatition is upset, but it generates maximum clarity on the file system and in searches. I actually have a problem where two different group ids are of both " core -1.0 " jars, and when overwriting each other, the link directory is copied at the time of creation . -
Artwork is commonly known with any version, along with the suggestions of other matlikes to align my Maven version.
-
If you adhere to the prefixing of Dominic Group, with your company name (like ACM), it can make it easier to take advantage of Nexus's routing feature. This will ensure that the requests of internal artifacts have not been promoted for Maven Central and have ended in their logs (which may be important for your group ID " acme.secret.project " !)
Comments
Post a Comment