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 143307 - Local deploy doesn't work - netbeans-deploy-plugin not found
Summary: Local deploy doesn't work - netbeans-deploy-plugin not found
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
: 143907 144134 144529 144978 146070 146096 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-08 15:18 UTC by lilianne_blaze
Modified: 2009-03-26 13:23 UTC (History)
0 users

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 lilianne_blaze 2008-08-08 15:18:25 UTC
Happens in at least 3 different 6.5 nightlies, both clean installs and upgrades, between
netbeans-trunk-nightly-200808021401-windows and netbeans-trunk-nightly-200808080201-windows.

After creating a Maven-based project with Web App archetype and trying to Run it, either in Tomcat or Glassfish, it
fails with the following error:

[ERROR]Maven encountered an error while loading a plugin for use in your build.
[ERROR]Plugin:
[ERROR]Group-Id: org.netbeans.plugins
[ERROR]Artifact-Id: netbeans-deploy-plugin
[ERROR]Version: 2.0
[ERROR]Referenced mojo: deploy
[ERROR]brought in via: null
[ERROR]While building project:
[ERROR]Group-Id: com.mycompany
[ERROR]Artifact-Id: mavenproject1
[ERROR]Version: 1.0-SNAPSHOT
[ERROR]From file: D:\Work\Java\My_Sandbox\mavenproject1\pom.xml
[ERROR]Error message:Failed to load plugin. Reason: Unable to build project for plugin
'org.netbeans.plugins:netbeans-deploy-plugin': POM 'org.netbeans.plugins:netbeans-deploy-plugin' not found in
repository: Unable to download the artifact from any repository
[ERROR]  org.netbeans.plugins:netbeans-deploy-plugin:pom:2.0
[ERROR]from the specified remote repositories:
[ERROR]  central (http://repo1.maven.org/maven2),
[ERROR]  unknown-jars-temp-repo (file:D:\Work\Java\My_Sandbox\mavenproject1/lib),
[ERROR]  jsf12 (http://download.java.net/maven/1),
[ERROR]  Java.net (http://download.java.net/maven/2)
[ERROR] for project org.netbeans.plugins:netbeans-deploy-plugin
[ERROR]Root error message:Unable to download the artifact from any repository
------------------------------------------------------------------------
For more information, run with the -e flag
------------------------------------------------------------------------
BUILD FAILED
------------------------------------------------------------------------
Total time: 1 second
Finished at: Fri Aug 08 16:12:34 CEST 2008
Final Memory: 48M/119M
------------------------------------------------------------------------
Comment 1 Milos Kleint 2008-08-08 15:29:29 UTC
that's an unfortunate side-effect of ongoing migration to netbeans.org sourcebase. The plugins are repackaged (as are
the netbeans modules) but cannot be synced to central repository as the sources are not yet in the netbeans.org
repository. (legal process in progress)

as a temporary workaround, you can add this repository to your settings.xml.
http://nb-mavenplugins.sourceforge.net/releases/

that's where the sources will be synced from to central.

->P1 needs to be fixed by 6.5 FCS
Comment 2 lilianne_blaze 2008-08-08 15:58:38 UTC
Yes, the workaround works. Thanks.

One thing though - I can't add the repository directly in Netbeans, I have to do it in m2/settings.xml, as Netbeans
complains there's no index (I tried to paste the url in both fields, doesn't work).
Comment 3 Milos Kleint 2008-08-08 17:29:38 UTC
yes, the repository browser list is completely irrelevant to what is being used during build. It's used just for
discovery  of artifact, but it's not taken from settings.xml
Comment 4 Milos Kleint 2008-08-13 11:13:15 UTC
i've reworked the execution code a bit. Now the netbeans-*-plugins are not required anymore, therefore the embedded
execution is not forced anywhere. The default mode of operation now is to use command line execution, if found on PATH
or preferably the one from Tools/Options dialog.

That change will solve a multitude of problems, like the need for embedded executions, the need to download netbeans
related plugins and should generally speed up run/debug execution.

Comment 5 Milos Kleint 2008-08-14 13:40:00 UTC
*** Issue 143907 has been marked as a duplicate of this issue. ***
Comment 6 Milos Kleint 2008-08-16 06:43:54 UTC
*** Issue 144134 has been marked as a duplicate of this issue. ***
Comment 7 Milos Kleint 2008-08-20 08:12:13 UTC
*** Issue 144529 has been marked as a duplicate of this issue. ***
Comment 8 Milos Kleint 2008-08-23 11:11:24 UTC
the updated binaries that don't require the maven plugins cannot be unfortunately uploaded to 6.5 beta update center
(due to a regression bug in plugin manager).
If you want to give it a test drive, please install nbm files from http://www.codehaus.org/~mkleint/maven1-SNAPSHOT.zip
(make sure all update centers are disabled when doing so - another bug in plugin manager)
Comment 9 lilianne_blaze 2008-08-25 13:45:10 UTC
Sort-of works.

I installed the latest nightly plus nbms from the zip above, then tried to Run a webapp project. It compiles and deploys
(on Tomcat, haven't tried GF yet), but then it displays:

A org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment$DeploymentException exception has occurred.
However, the system should continue working without further problems.
Click Show Details for the stack trace.

Show Details shows:

java.lang.NullPointerException
	at org.netbeans.modules.j2ee.deployment.impl.projects.DeploymentTargetImpl.getClientUrl(DeploymentTargetImpl.java:124)
	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:186)
Caused: Deployment error:
null

See the server log for details.
	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:190)
	at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:86)
	at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:62)
	at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:158)
[catch] at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)

The webapp is deployed correctly, but it doesn't get displayed in the browser automatically.
Comment 10 Milos Kleint 2008-08-25 14:01:14 UTC
*** Issue 144978 has been marked as a duplicate of this issue. ***
Comment 11 Milos Kleint 2008-08-27 06:52:43 UTC
I've put the wrong order of parameters there, fixed here:
http://hg.netbeans.org/main/rev/115665e34693
Comment 12 Quality Engineering 2008-08-28 06:25:43 UTC
Integrated into 'main-golden', available in build *200808280201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/115665e34693
User: Milos Kleint <mkleint@netbeans.org>
Log: #143307 correct order of parameters
Comment 13 lilianne_blaze 2008-08-28 13:45:12 UTC
Yes, it seems to work now (I only tried it once, no serious testing yet, I'll let you know if I encounter any problems
later).

One question though - now I have Maven support at version 4.0.2, and earlier it was 4.0.3 with basic install or 4.0.4
with the .zip you provided here? Why?
Comment 14 Milos Kleint 2008-08-28 13:57:49 UTC
I've released the 4.0.3 on AU, but had to rollback to the 4.0.2 due to a plugin manager bug. 4.0.3/4 from zip was the
version you had problems with. 4.0.2 works as it doesn't have the changed included (but requires the plugin from
non-central repo)

The latest fix will eventually appear on dev build's update center as 4.0.4 (as the plugin manager issue has been
resolved). The beta2 update center keeps the 4.0.2 version forever.

Hope that makes it clear.
Comment 15 Milos Kleint 2008-09-09 07:26:44 UTC
*** Issue 146070 has been marked as a duplicate of this issue. ***
Comment 16 Petr Hejl 2008-09-22 16:38:22 UTC
*** Issue 146096 has been marked as a duplicate of this issue. ***
Comment 17 nriley 2009-01-23 06:50:09 UTC
I'm getting this problem even with the 4.0.5 Maven plugin and NetBeans 6.5.  I tried going back to the 4.0.4 snapshot as linked in the comments, but I got 
the same error message.

NetBeans: Executing 'C:\Program Files (x86)\Maven\bin\mvn.bat -Ddspace.config=C:/Documents and Settings/njriley/DSpace/config/dspace.cfg package 
org.netbeans.plugins:netbeans-deploy-plugin:2.0:deploy'
NetBeans:      JAVA_HOME =C:\Program Files (x86)\Java\jdk1.6.0_10
Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/netbeans/plugins/netbeans-deploy-plugin/2.0/netbeans-deploy-plugin-2.0.pom
Downloading: http://repo1.maven.org/maven2/org/netbeans/plugins/netbeans-deploy-plugin/2.0/netbeans-deploy-plugin-2.0.pom
------------------------------------------------------------------------
[ERROR]BUILD ERROR
------------------------------------------------------------------------
Error building POM (may not be this project's POM).


Project ID: org.netbeans.plugins:netbeans-deploy-plugin

Reason: POM 'org.netbeans.plugins:netbeans-deploy-plugin' not found in repository: Unable to download the artifact from any repository

  org.netbeans.plugins:netbeans-deploy-plugin:pom:2.0

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  maven.dspace.org/snapshot (http://maven.dspace.org/snapshot)
 for project org.netbeans.plugins:netbeans-deploy-plugin


------------------------------------------------------------------------
For more information, run Maven with the -e switch
------------------------------------------------------------------------
Total time: < 1 second
Finished at: Fri Jan 23 00:47:08 CST 2009
Final Memory: 1M/4M
------------------------------------------------------------------------

Comment 18 nriley 2009-01-23 07:14:26 UTC
Nevermind, found the reference in nbactions.xml - removing and recreating the action with the newer plugin fixed the problem.
Comment 19 Jaroslav Pospisil 2009-03-26 13:23:02 UTC
v.