On Fri, 3 Mar 2006, Emmanuel Venisse wrote:

Looking at the source, the only way this can go wrong
is if the 'parent path' has no tokens, i.e. is an empty
string, or has the value "http://"; or "file:///". The parent path
in question here is the site url.

This, in combination with '..' in the child path (which is strange,
since the artifactId is used there, and that should not contain '..')

Maybe if the <url> was not specified in the parent (or ancestor),
it now defaults to an empty string?

What would be needed hereis a check for too many '..'
(i.e. parent = "/tmp/", child="../../test" -> /../test/, or
 parent = "/", child = "../test" in the current case).

Either we ignore the '..' in this case, or thow an exception
(but that would require changes to the method signature).

Proposed fix: ignore for now, instead of an NPE?

(btw, the code is rather complex. A simple 'new File( parent, child
).getAbsolutePath().replace('\\','/') seems simpler to me.. :)

-- Kenney


> Do you have a sample project that reproduce the problem?
>
> Emmanuel
>
> Fabrizio Giustina a �crit :
> > mh, I got a NPE from maven-project using this build (multiproject
> > build, flat structure, any goal that requires dependency resolution).
> > Looks like a problem with the changes for MNG-2006 , worths a check
> >
> > fabrizio
> >
> >
> > [ERROR] FATAL ERROR
> > [INFO] 
> > ----------------------------------------------------------------------------
> > [INFO] null
> > [INFO] 
> > ----------------------------------------------------------------------------
> > [INFO] Trace
> > java.lang.NullPointerException
> >         at 
> > org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.appendPath(DefaultModelInheritanceAssembler.java:544)
> >         at 
> > org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleDistributionInheritence(DefaultModelInheritanceAssembler.java:433)
> >         at 
> > org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:110)
> >         at 
> > org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.copyModel(DefaultModelInheritanceAssembler.java:52)
> >         at 
> > org.apache.maven.project.ModelUtils.cloneModel(ModelUtils.java:435)
> >         at 
> > org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:667)
> >         at 
> > org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:225)
> >         at 
> > org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenMetadataSource.java:102)
> >         at 
> > org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:275)
> >         at 
> > org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:67)
> >         at 
> > org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:223)
> >         at 
> > org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:211)
> >         at 
> > org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:182)
> >         at 
> > org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1117)
> >         at 
> > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:366)
> >         at 
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> >         at 
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> >         at 
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> >         at 
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> >         at 
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> >
> >
> >
> > On 3/2/06, Fabrizio Giustina <[EMAIL PROTECTED]> wrote:
> >
> >>big +1 this time
> >>
> >>fabrizio
> >>
> >>On 3/2/06, John Casey <[EMAIL PROTECTED]> wrote:
> >>
> >>>Hello everyone,
> >>>
> >>>If you've been tracking the thread calling for the release of Maven
> >>>2.0.3, you'll know that several issues came up which have delayed any
> >>>decision on the release. The full discussion can be found here:
> >>>
> >>>http://www.nabble.com/-vote-Release-Maven-2.0.3-t1166489.html#a3063584
> >>
> >
> > ---------------------------------------------------------------------
> > 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]
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to