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 195440 - Build extensions not downloaded for project created from archetype
Summary: Build extensions not downloaded for project created from archetype
Status: RESOLVED DUPLICATE of bug 201462
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 195430 (view as bug list)
Depends on:
Blocks: 172502 189833
  Show dependency tree
 
Reported: 2011-02-14 09:06 UTC by viggonavarsete
Modified: 2011-09-02 20:56 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description viggonavarsete 2011-02-14 09:06:47 UTC
See script for NetCAT here to reproduce: http://wiki.netbeans.org/STS_70_Maven#Test_suite:_Maven_projects

* <misconfigued Maven project in NBModulePrj>

* Complaining about missing dependency: org.netbeans.api:org-netbeans-api-annotations-common:jar:RELEASE70-BETA

* Stacktrace:

2 problems were encountered while building the effective model for com.mycompany:NBModulePrj:1.0-SNAPSHOT

[ERROR] Unresolveable build extension: Plugin org.codehaus.mojo:nbm-maven-plugin:3.5 or one of its dependencies could not be resolved: The repository system is offline but the artifact org.codehaus.mojo:nbm-maven-plugin:jar:3.5 is not available in the local repository. @ 

[ERROR] Unknown packaging: nbm @ line 8, column 16

 for project com.mycompany:NBModulePrj:1.0-SNAPSHOT at /home/viggo/NetBeansProjects/NBModulePrj/pom.xml
Comment 1 viggonavarsete 2011-02-14 09:08:46 UTC
The same happens for Netbeans Platform Application archetype
Comment 2 Tomas Danek 2011-02-14 09:51:52 UTC
Hi Viggo, it seems to me like something is messed up in your local repo. For me it works fine in
Product Version: NetBeans IDE 7.0 Beta 2 (Build 201102140001)
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
 

cd /Users/tomas/NetBeansProjects; JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home "/Applications/NetBeans/NetBeans 7.0 Beta 2.app/Contents/Resources/NetBeans/java/maven/bin/mvn" -DarchetypeVersion=1.7 -Darchetype.interactive=false -DgroupId=com.mycompany -DarchetypeArtifactId=nbm-archetype -DarchetypeRepository=http://repo1.maven.org/maven2/ -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.codehaus.mojo.archetypes -DnetbeansVersion=RELEASE70-BETA -Dbasedir=/Users/tomas/NetBeansProjects -Dpackage=com.mycompany.mavenproject1 -DartifactId=mavenproject1 --batch-mode archetype:generate
Scanning for projects...
                                                                        
------------------------------------------------------------------------
Building Maven Stub Project (No POM) 1
------------------------------------------------------------------------

>>> maven-archetype-plugin:2.0:generate (default-cli) @ standalone-pom >>>

<<< maven-archetype-plugin:2.0:generate (default-cli) @ standalone-pom <<<

[archetype:generate]
Generating project in Batch mode
Archetype defined by properties
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 2.237s
Finished at: Mon Feb 14 10:37:54 CET 2011
Final Memory: 9M/81M
------------------------------------------------------------------------


and also this is successful when i try the same against some new local repo which i set in Options dialog.
Could you try it with latest beta2 build against fresh maven local repo( set up your maven local repo in option to e.g. /tmp/tmpM2Repo)?
Leaving this open, Jesse, please evaluate ASAP.
Comment 3 Tomas Danek 2011-02-14 10:25:19 UTC
definitely a bug, this can be really reproduced against fresh m2 repository
(please disregard my last note, i actually tried against other local
repository, which was not "new")
Comment 4 Tomas Danek 2011-02-14 10:26:45 UTC
*** Bug 195430 has been marked as a duplicate of this bug. ***
Comment 5 Jesse Glick 2011-02-14 20:30:21 UTC
Clicking Revalidate, or otherwise building the project, and if necessary reloading it, loads the NBM plugin into your local repo and makes the project fine. Not sure why the fix of bug #189833 is not operating here.

BTW the UI mentioned in the test spec is obsolete; someone from QE should update the spec.
Comment 6 Marian Mirilovic 2011-02-14 20:32:57 UTC
(In reply to comment #5)
> BTW the UI mentioned in the test spec is obsolete; someone from QE should
> update the spec.

Agreed, we plan to do that (with help from community).
Comment 7 Jesse Glick 2011-08-08 21:20:37 UTC
Two issues:

1. Creating a project from archetype does not force build extensions (plugins with <extensions>true</>) to be downloaded. Probably the New Project wizard for archetypes should check for problems of this kind after creation and initiate some kind of build.

2. Obtaining the plugin later does not always refresh the project; the fix for bug #175472 will correct this.
Comment 8 Jesse Glick 2011-08-11 20:27:46 UTC
(In reply to comment #7)
> check for problems of this kind after creation and initiate some kind of build

Or simply have an option (checked by default) in New Project wizard to run e.g. test-compile after archetype generation but before loading & opening the resulting project. This would also be useful for other purposes, such as including target/endorsed/javaee-endorsed-api-6.0.jar in the boot CP for EE 6 projects.
Comment 9 Jesse Glick 2011-09-02 20:56:15 UTC
Handled by fix of bug #201462, it seems.

*** This bug has been marked as a duplicate of bug 201462 ***