http://www.google.com/codesearch?hl=en&lr=&q=DefaultArtifactRepository.java&btnG=Search
On 12/6/06, Ole Ersoy <[EMAIL PROTECTED]> wrote:
Hi,
Does anyone have a link to the Subversion
DefaultArtifactRepository.java? I looked all over
in the various maven-artifact directories...
If I could find it, I could probably figure this out.
Here's what I'm trying to figure out just in case you
have know.
I created a testcase with a DefaultArtifactRepository
instance, like this:
artifactRepository = new
DefaultArtifactRepository("/home/ole/.m2/","/home/ole/.m2/",
null);
Then I try to get it to tell me the path to an
artifact like this:
public void testTemp() {
String artifactId = "apacheds-server-main";
String groupId = "org.apache.directory.server";
String version = "1.5.0-SNAPSHOT";
ArtifactFactory artifactFactory =
mojo.getArtifactFactory();
assertNotNull(artifactFactory);
Artifact pom =
artifactFactory.createArtifact(groupId, artifactId,
version, null, "pom");
assertNotNull(pom);
String string = artifactRepository.pathOf(pom);
System.out.println(string);
}
However when I run this I get a NullPointerException
like this:
java.lang.NullPointerException
at
org.apache.maven.artifact.repository.DefaultArtifactRepository.pathOf(DefaultArtifactRepository.java:107)
Thanks,
- Ole
____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]