Community
Participate
Working Groups
I'm building a very simple Eclipse plugin with Tycho 0.10. The build is done through Hudson on a Ubuntu 10.10 machine. At some point, Tycho fails with NPE: mavenExecutionResult exceptions not empty org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168) ... Caused by: java.lang.NullPointerException at org.codehaus.tycho.osgitools.EquinoxResolver.assertResolved(EquinoxResolver.java:248) at org.codehaus.tycho.osgitools.EquinoxResolver.newResolvedState(EquinoxResolver.java:58) at org.codehaus.tycho.osgitools.OsgiBundleProject.getResolverState(OsgiBundleProject.java:194) at org.codehaus.tycho.osgitools.OsgiBundleProject.resolve(OsgiBundleProject.java:142) at org.codehaus.tycho.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:80) at org.codehaus.tycho.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:94) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) ... 19 more I've looked at the source and the problem relates that when Maven projects are added to the Tycho TargetPlatform, there are normalized (DefaultTargetPlatform.normalizeArtifact()), which essentially gets the canonical path of the artifact. Later in the process, EquinoxResolver.newResolvedState(MavenProject, TargetPlatform) tries to find the corresponding BundleDescription using the absolute path of the project. If the project is inside symbolic linked folder (you need to execute the maven build via the symbolic link), then getAbsolutePath() will return different value from getCanonicalPath(), which causes the BundleDescription to be not found, which later causes NPE. I'll try to workaround the symbolic link, but debugging this problem was hard.
originally reported as https://issues.sonatype.org/browse/TYCHO-575 this issue also has a proposed patch attached
@Igor: I assume you are only assignee, because you used to be the default assignee - and not because you are working on it. Reassigning to inbox.
*** Bug 348343 has been marked as a duplicate of this bug. ***
fixed with e4f4fd7