Community
Participate
Working Groups
When trying to build a branch of Linux Tools with <tycho-version>0.11.0</tycho-version>, I got an NPE like this: org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: java.lang.NullPointerException at org.sonatype.tycho.p2.impl.publisher.P2GeneratorImpl.getPublisherActions(P2GeneratorImpl.java:127) at org.sonatype.tycho.p2.impl.publisher.AbstractMetadataGenerator.generateMetadata(AbstractMetadataGenerator.java:53) at org.sonatype.tycho.p2.impl.publisher.DefaultDependencyMetadataGenerator.generateMetadata(DefaultDependencyMetadataGenerator.java:36) at org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.setupProjects(P2TargetPlatformResolver.java:111) at org.codehaus.tycho.resolver.DefaultTychoDependencyResolver.setupProject(DefaultTychoDependencyResolver.java:72) at org.codehaus.tycho.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:87) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) ... 11 more I'll attach the full mvn -X log file.
I just tried mv ~/.m2{,.bak} and a fresh 'mvn -fae clean install' and it failed again.
Created attachment 193273 [details] output of mvn -X -fae clean install
I was using maven 3.0.2 but I just tried with 3.0.3 and the same error occurs.
I've had this happen on hudson.eclipse.org now, too: https://hudson.eclipse.org/hudson/job/cbi-linuxtools-Helios/415/console
Steps to reproduce: <ensure the mvn on your PATH resolves to a maven 3.0.2 or 3.0.3 download> git clone git://git.eclipse.org/gitroot/linuxtools/org.eclipse.linuxtools.git linuxtools cd linuxtools mvn -fae clean install
Oops, scratch comment #5. Steps to reproduce: <ensure the mvn on your PATH resolves to a maven 3.0.2 or 3.0.3 download> git clone git://git.eclipse.org/gitroot/linuxtools/org.eclipse.linuxtools.git linuxtools cd linuxtools git checkout -b stable-0.7 origin/stable-0.7 mvn -fae clean install
admittedly the NPE is far from appropriate error handling here. But the root cuase here is that modules http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/tree/profiling/org.eclipse.linuxtools.profiling-feature?h=stable-0.7 and http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/tree/profiling/org.eclipse.linuxtools.profiling.test-feature?h=stable-0.7 have a pom.xml with packaging type eclipse-feature, but there is no feature.xml in the module directory. By commenting out these two modules in the reactor I can get past the NPEs. The bottom line is we need to validate for existence of feature.xml in modules of packaging type eclipse-feature and create an appropriate error message if feature.xml is missing.
Created attachment 193362 [details] patch patch which validates feature.xml early. TODO apply to master after we branched 0.12.x
Thanks, Jan. Sorry for it being an oversight on my part and I look forward to better error messages.
fixed with commit faf0ef2