Actually now that I think about it, it probably makes
sense since Maven wants to check remote repositories
for SNAPSHOT updates.
--- Ole Ersoy <[EMAIL PROTECTED]> wrote:
> Tom,
>
> Guess what... I did that and now it works!
>
> Thanks!
>
> It's good to have it working, although seems that I
> should be able to pass null, rather than create an
> empty list of remote repositories. I would also
> think
> it would search my local repository reference first.
>
> I'll ask on the Dev list.
>
> Thank again,
> - Ole
>
> --- Tom Huybrechts <[EMAIL PROTECTED]> wrote:
>
> > On 1/1/07, Ole Ersoy <[EMAIL PROTECTED]> wrote:
> > > Hmmm...
> > >
> > > Getting warmer:
> > >
> > > It's trying to look at the remote repositories,
> > but
> > > failing, since I don't pass a list of remote
> > > repositories:
> > >
> > > for ( Iterator i =
> remoteRepositories.iterator();
> > > i.hasNext(); )
> > >
> > > I would think that it should check whether
> remote
> > > repositories are passed and then search them
> only
> > if
> > > the remoteRepositories list exists...
> > >
> >
> > You could also just pass a (empty) list if the
> > method expects one
> >
> > > --- Ole Ersoy <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi,
> > > >
> > > > I'm getting a strange exception when trying to
> > > > resolve
> > > > an artifact.
> > > >
> > > > If the version on the artifact is
> 1.0-SNAPSHOT.
> > > >
> > > > If I try to resolve the artifact using this as
> > the
> > > > version I get a NullPointerException, along
> with
> > > > this
> > > > in the stacktrace:
> > > >
> > > > at
> > > >
> > >
> >
>
org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolve(DefaultRepositoryMetadataManager.java:61)
> > > > at
> > > >
> > >
> >
>
org.apache.maven.artifact.transform.AbstractVersionTransformation.resolveVersion(AbstractVersionTransformation.java:62)
> > > > at
> > > >
> > >
> >
>
org.apache.maven.artifact.transform.SnapshotTransformation.transformForResolve(SnapshotTransformation.java:60)
> > > >
> > > > If I change the version to 1.0 in the lookup
> > code,
> > > > it
> > > > works.
> > > >
> > > > Keep in mind I'm not changing the version on
> the
> > > > pom.
> > > > Just in the code as shown below:
> > > >
> > > >
> > > >
> > > > Artifact pomArtifact =
> > > > artifactFactory.createProjectArtifact(groupId,
> > > > artifactId, "1.0-SNAPSHOT");
> > > >
> > > > try {
> > > >
> artifactResolver.resolve(
> > pomArtifact, null,
> > > > localRepository );
> > > >
> > > > } catch
> > (ArtifactResolutionException e) {
> > > > // TODO Auto-generated
> > catch block
> > > > e.printStackTrace();
> > > > } catch
> (ArtifactNotFoundException
> > e) {
> > > > // TODO Auto-generated
> > catch block
> > > > e.printStackTrace();
> > > > }
> > > >
> > > > The Above code gives me the exception.
> > > >
> > > > If I do this instead:
> > > >
> > > > Artifact pomArtifact =
> > > > artifactFactory.createProjectArtifact(groupId,
> > > > artifactId, "1.0");
> > > >
> > > >
> > > > It works.
> > > >
> > > > Ideas?
> > > >
> > > > THanks,
> > > > - Ole
> > > >
> > > >
> > > >
> > > >
> > __________________________________________________
> > > > Do You Yahoo!?
> > > > Tired of spam? Yahoo! Mail has the best spam
> > > > protection around
> > > > http://mail.yahoo.com
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > > > [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > >
> __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam? Yahoo! Mail has the best spam
> > protection around
> > > http://mail.yahoo.com
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > 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]
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]