This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 210796 - Broken project/"RuntimeException occurred in Apache Maven embedder while loading the project. "
Summary: Broken project/"RuntimeException occurred in Apache Maven embedder while load...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.2
Hardware: PC Linux
: P2 normal (vote)
Assignee: Milos Kleint
URL:
Keywords: REGRESSION
Depends on:
Blocks: 201585
  Show dependency tree
 
Reported: 2012-04-06 07:50 UTC by Jan Lahoda
Modified: 2012-04-12 09:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The NPE as shown in the Show and Resolve Problems dialog. (2.69 KB, text/plain)
2012-04-06 07:50 UTC, Jan Lahoda
Details
IDE log. (109.46 KB, text/x-log)
2012-04-06 07:51 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2012-04-06 07:50:27 UTC
Created attachment 117924 [details]
The NPE as shown in the Show and Resolve Problems dialog.

While trying to reproduce #210725, I have:
1. cloned the hudson's git:
git clone git://git.eclipse.org/gitroot/hudson/org.eclipse.hudson.core.git
2. opened the root project, ran the priming build. It failed after a while (and after downloading tons of libraries) with something like:
---------------------------
cd /usr/local/home/lahvac/src/nb/org.eclipse.hudson.core; JAVA_HOME=/usr/lib/jvm/java-6-openjdk /usr/local/home/lahvac/src/nb/outgoing/nbbuild/netbeans/java/maven/bin/mvn install
Scanning for projects...
The POM for org.eclipse.hudson.tools:maven-hpi-plugin:jar:3.0.0-SNAPSHOT is missing, no dependency information available
The build could not read 1 project -> [Help 1]
  
  The project org.eclipse.hudson.plugins:hudson-plugin-parent:3.0.0-SNAPSHOT (/usr/local/home/lahvac/src/nb/org.eclipse.hudson.core/hudson-plugin-parent/pom.xml) has 1 error
    Unresolveable build extension: Plugin org.eclipse.hudson.tools:maven-hpi-plugin:3.0.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.eclipse.hudson.tools:maven-hpi-plugin:jar:3.0.0-SNAPSHOT -> [Help 2]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
-------------
3. opened hudson-core module, tried to (prime) build it, etc. Failed, as well, so tried to build the parent pom again, with the above result again.
4. tried to open hudson-plugin-parent, so that I could manually prime-build it, but all I can see in its Show and Resolve Problems is the attached exception and request to report a bug.
Comment 1 Jan Lahoda 2012-04-06 07:51:13 UTC
Created attachment 117925 [details]
IDE log.
Comment 2 Milos Kleint 2012-04-06 08:00:15 UTC
the project is using an extensions plugin in -SNAPSHOT version that is apparently not available in local repository.

either checkout  and build the plugin (if current sources match the version) or hunt for the repository that contains that plugin's artifacts.. that would include searching the project's website and/or mailing lists..

have you tried later to build with maven on cmd line? what was the result there?

I will investigate the exception thrown, is most likely a bug in maven or our embedding
Comment 3 Jan Lahoda 2012-04-06 08:14:09 UTC
I have figured that I would need to find the correct repository with the plugin - but without much luck so far. May not be really necessary for me to build it, anyway.

From command line:
org.eclipse.hudson.core$ ~/netbeans/maven-2/bin/mvn install
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   Hudson Parent
[INFO]   Hudson
[INFO]   Hudson :: Test Utilities
[INFO]   Hudson :: Common Utilities
[INFO]   Hudson :: Remoting Layer
[INFO]   Hudson :: CLI
[INFO]   Hudson :: Core
[INFO]   Hudson :: Inject (JSR-330 Strategy)
[INFO]   Hudson :: Plugin Utilities
[INFO]   Hudson :: Service
[INFO]   Hudson :: jetty-war-executable
[INFO]   Hudson :: War
[INFO]   Hudson :: Test Framework
[INFO]   Hudson :: Plugin Parent POM
[INFO] snapshot org.eclipse.hudson.tools:maven-hpi-plugin:3.0.0-SNAPSHOT: checking for updates from sonatype-nexus-snapshots
Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/eclipse/hudson/tools/maven-hpi-plugin/3.0.0-SNAPSHOT/maven-hpi-plugin-3.0.0-SNAPSHOT.pom
[INFO] Unable to find resource 'org.eclipse.hudson.tools:maven-hpi-plugin:pom:3.0.0-SNAPSHOT' in repository sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.eclipse.hudson.tools:maven-hpi-plugin

Reason: POM 'org.eclipse.hudson.tools:maven-hpi-plugin' not found in repository: Unable to download the artifact from any repository

  org.eclipse.hudson.tools:maven-hpi-plugin:pom:3.0.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots),                                                                                                                                            
  sonatype-nexus-releases (https://oss.sonatype.org/content/repositories/releases/)                                                                                                                                              
                                                                                                                                                                                                                                 
 for project org.eclipse.hudson.tools:maven-hpi-plugin                                                                                                                                                                           
                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                 
[INFO] ------------------------------------------------------------------------                                                                                                                                                  
[INFO] For more information, run Maven with the -e switch                                                                                                                                                                        
[INFO] ------------------------------------------------------------------------                                                                                                                                                  
[INFO] Total time: 9 seconds                                                                                                                                                                                                     
[INFO] Finished at: Fri Apr 06 09:53:15 CEST 2012                                                                                                                                                                                
[INFO] Final Memory: 29M/488M                                                                                                                                                                                                    
[INFO] ------------------------------------------------------------------------
Comment 4 Jesse Glick 2012-04-09 20:54:26 UTC
Stack trace indicates bug in NbWorkspaceReader, which is sometimes returning null from findVersions against contract.

As to the project in question, AFAIK Hudson is simply not buildable from the Eclipse repo yet, or at least not without special tricks; if you want sources which are not broken, stick with https://github.com/hudson/hudson.git for now.
Comment 5 Milos Kleint 2012-04-10 06:34:11 UTC
(In reply to comment #4)
> Stack trace indicates bug in NbWorkspaceReader, which is sometimes returning
> null from findVersions against contract.
> 


https://hg.netbeans.org/core-main/rev/02f1b39d4d88

wrongly copy pasted code..
Comment 6 Quality Engineering 2012-04-11 09:56:34 UTC
Integrated into 'main-golden', will be available in build *201204110400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/02f1b39d4d88
User: Milos Kleint <mkleint@netbeans.org>
Log: #210796 never return null from findVersions
Comment 7 Quality Engineering 2012-04-12 09:58:46 UTC
Integrated into 'main-golden', will be available in build *201204120400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/02f1b39d4d88
User: Milos Kleint <mkleint@netbeans.org>
Log: #210796 never return null from findVersions