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 195180

Summary: Cannot create Maven OSGi bundle
Product: projects Reporter: Tomas Danek <musilt2>
Component: Maven OSGi bundlesAssignee: Jesse Glick <jglick>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P2    
Version: 7.0   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

Description Tomas Danek 2011-02-08 15:13:58 UTC
Product Version: NetBeans IDE 7.0 Beta 2 (Build 201102052128)
Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03-307
System: Mac OS X version 10.6.6 running on x86_64; MacRoman; en_US (nb)
Userdir: /Users/tomas/.netbeans/7.0beta2
--------------
- creating of maven osgi bundle project fails, proxy settings are correct in settings.xml

BUILD FAILURE
------------------------------------------------------------------------
Total time: 1:58.930s
Finished at: Tue Feb 08 16:10:10 CET 2011
Final Memory: 11M/81M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-5:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.codehaus.mojo.archetypes:osgi-archetype:1.2-20110201.180438-1) -> [Help 1]

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/MojoFailureException
Comment 1 Jesse Glick 2011-02-08 15:40:54 UTC
Working for me when I delete ~/.m2/repository/org/codehaus/mojo/archetypes and disable all mirror settings in ~/.m2/settings.xml. Perhaps you have some kind of stale cache information or bad mirror settings?

For the moment maven.osgi is using a snapshot version of the archetype, until the two recently fixed bugs are verified; then as per bug #195150 I will release the archetype and switch to that. Your local Maven config might be preventing you from using the Codehaus snapshot repository for some reason.

I also notice that you are using the 2.0-alpha-5 version of the archetype plugin, which is definitely wrong as 2.0 has been released for months now; 'mvn archetype:help' should show

[INFO] --- maven-archetype-plugin:2.0:help (default-cli) @ standalone-pom ---

2.0-alpha-5 had a number of bugs now fixed: http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11095&version=14604

Maven ought to automatically use the latest released version of a plugin when no version is specified on the command line: http://maven.apache.org/guides/introduction/introduction-to-plugin-resolution.html but try runing 'mvn -U archetype:help' to see if that changes anything.