On 14 October 2010 22:03, Les Mikesell <lesmikesell_at_gmail.com> wrote:
> On 10/14/2010 3:11 PM, David Weintraub wrote:
>>
>> What? You want a GOOD Maven manual? Real programmers don't use
>> manuals.
>
> Yeah, I know - they don't write them either (except for subversion, of
> course). As you might guess, I'm more of a system administrator than a
> programmer...
>
>> Fortunately, you don't really have to know too much about Maven if
>> you're not a Java developer. The intricacies of the pom.xml file don't
>> concern you. Possibly, the only Maven command you really have to know
>> is "mvn deploy:deploy-file" which doesn't require a pom.xml file
>>
>> <http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html>.
>> And, if that command concerns you too much, you can simply revert to
>> "curl".
>>
>> You do have to understand the Maven repository layout which is a
>> fairly straight forward hierarchal affair and both Nexus and
>> Artifactory cover that pretty well.
>
> Thanks - the piece I need is how to map our project tags and
> branch/revision_numbers into the maven repo URLs, hopefully in a way that
> wouldn't break it for actual maven use since we do have some java developers
> here.
every artifact in the maven repository has a set of coordinates, known
as GAV (though technically it is GAVCT)
GroupId:ArtifactId:Version[:Classifier]:Type
in the group id, you use reverse DNS name to establish ownership of
the namespace, dot's are replaced by slashes... so one project I am
working on at github uses the groupId
com.github.stephenc.java-iso-tools as the project url is
http://github.com/stephenc/java-iso-tools
I have other things where I use groupIds starting with com.one-dash
because I own the domain.
The artifactId can be whatever you like (within reason)
The version is a version number
The classifier is similar to artifactId and this is more for
side-artifacts... you probably don't want classifiers in most cases...
side-artifacts would be things like javadocs... try to keep one GAV
for one theing that you build, e.g. a separate GAV for the x86 and the
ARM versions of your build rather than abuse classifiers [so that you
play better with the java builds]
to consturuct the url
URL=${REPO_ROOT}/$(echo ${GROUP_ID} | sed -e
"s:\.:/:g")/$ARTIFACT_ID/$VERSION/$ARTIFACT_ID-${CLASSIFIER}-${VERSION}.${TYPE}
if you have a classifier and
URL=${REPO_ROOT}/$(echo ${GROUP_ID} | sed -e
"s:\.:/:g")/$ARTIFACT_ID/$VERSION/$ARTIFACT_ID-${VERSION}.${TYPE}
if you don't
-Stephen
>
> --
> Les Mikesell
> lesmikesell_at_gmail.com
>
Received on 2010-10-15 00:33:42 CEST