maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <>
Subject Re: cvs commit: maven-plugins/eclipse/xdocs changes.xml
Date Fri, 24 Sep 2004 14:07:59 GMT
That's a poorly named property if ever I saw one :)

lib is an artifact, not a dependency. I don't see why modifying the 
dependency helps, and its not the right thing to do (model/runtime 
separation - and yes, I notice that the version does this anyway).

lib.urlPath here should give you the 
/commons-logging/jars/commons-logging-1.0.3.jar part, but this isn't 
what you want.

A path jar override is unlikely to be in the repository (people often 
use it to test, because the jars are there though). It's actually 
usually in basedir.

I suggest you do the following:
- take lib.path
- if it starts with ${maven.repo.local}, swap it for MAVEN_REPO
- if it starts with ${basedir}/, remove it.

Sound right?


Eric Pugh wrote:

>Thanks Brett,
>That clears things up a bit..  Unfortunantly, this doesn't seem as easy to
>fix as I think it should..  ArtifactListBuilder is responsible for all the
>of the artifacts.  However, ArtifactListBuilder properly updates the path
>variable of the artifact.  So, if I change my jelly in classpath.jelly from:
>          <classpathentry kind="var" path="MAVEN_REPO${lib.urlPath}"/>
>          <classpathentry kind="var" path="${lib.path}"/>
>it takes into account the correct version or location.  Unfortunantly that
>means that I get a URL like this
>	c:\java\maven\repository\commons-logging\jars\commons-logging-1.0.3.jar
>And what I really need is just the
>/commons-logging/jars/commons-logging-1.0.3.jar part.  While I could get
>slick w/ the textediting, it seems like something along the lines of this
>should be applied:
>RCS file:
>retrieving revision 1.16
>diff -u -r1.16
>---	23 Mar 2004 02:18:18 -0000	1.16
>+++	24 Sep 2004 13:47:41 -0000
>@@ -68,13 +68,15 @@
>                     // User is requesting a specific version of a
>                     // be used.
>                     d.setVersion( mavenJarProperty );
>                     artifact.setPath(
>project.getContext().getMavenRepoLocal() + artifact.generatePath() );
>                 }
>                 else
>                 {
>                     // User is requesting a specific path to a dependency
>-                    // be used.
>+                    // be used.
>                     artifact.setPath( new File(
>mavenJarProperty ).getAbsolutePath() );
>+                    artifact.getDependency().setUrl(mavenJarProperty);
>                 }
>             }
>             else
>It boils down to needing the URL, not the full path.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message