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 209939 - Deployment error: No archive for deployment while deploying a Maven Project
Summary: Deployment error: No archive for deployment while deploying a Maven Project
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Janicek
Depends on:
Reported: 2012-03-22 14:53 UTC by tapehead
Modified: 2013-07-23 08:37 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description tapehead 2012-03-22 14:53:26 UTC
Product Version = NetBeans IDE 7.1 (Build 201112071828)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0
Runtime = Java HotSpot(TM) 64-Bit Server VM 21.0-b17

I am getting the following error deploying to Tomcat...

NetBeans: Deploying on Apache Tomcat
    profile mode: false
    debug mode: true
    force redeploy: true
Checking data source definitions for missing JDBC drivers...
Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
Deployment error: No archive for deployment
See the server log for details.
	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(
	at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(
	at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(
Caused by: java.lang.IllegalArgumentException: No archive for deployment
	at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(
	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(
	... 4 more

I can get around the problem by changing the following line in my POM..




Why the build number matters I don't know.  I have the build.number added as a property in the nbactions.xml ....


The archive is built correctly and does exist in my target directory.

I have tried both Tomcat and 7.022.0 with the same results.
Comment 1 tapehead 2012-03-22 15:15:26 UTC
To reproduce this... Create a Maven web application. 

1.  Pick all the defaults.
2.  Open the POM.
3.  Add the following to the POM build section...
4.  Right-click on the project -> open properties -> Actions -> Select Debug Project via Deploy
5. Add  build.number=99999 to Set Properties.
6. Debug the project.
Comment 2 Petr Hejl 2012-03-26 12:40:48 UTC
BaseEEModuleImpl.getArchive() returns the wrong archive. I guess build number is not valuated.
Comment 3 Martin Janicek 2012-04-11 12:36:47 UTC
Reproducible. The problem is that you have the build.number located in nbactions.xml instead of having it in pom.xml ..because of that finalName looks in pom model like this: "mavenproject1-1.0-SNAPSHOT-r${build.number}"
You can easily correct it by moving build.number to pom.xml properties.

I'm not sure yet if the behavior is correct or if we should try to use properties from nbactions.xml as well.
Comment 4 adriaaaaaan 2012-07-09 09:58:36 UTC
That doesn't appear to be the case this is my nbactions.xml

<?xml version="1.0" encoding="UTF-8"?>

yet i get the same error, it deploys fine using 7.1.2 so this is a regression
Comment 5 Jiri Skrivanek 2012-07-12 12:32:59 UTC
For me it doesn't work even in NetBeans 7.1.2 thus it is not a regression. Because easy workaround is described in comment 3 I would recommend to fix it in next release.
Comment 6 Martin Janicek 2013-07-22 13:52:06 UTC
Milosi what do you think it's a correct solution here? Is it correct that user can write/paste properties directly in Actions customizer?
Comment 7 Milos Kleint 2013-07-22 15:50:04 UTC
(In reply to comment #6)
> Milosi what do you think it's a correct solution here? Is it correct that user
> can write/paste properties directly in Actions customizer?

there's 2 things here:
1. what gets passed to the maven's jvm. For that adding props to nbactions.xml is correct
2. what gets read from the effective pom in IDE's jvm. That's *not* influenced by nbactions.xml but only by pom.xml content and also configurations (which enable profiles and set props)

if you are dealing with RunConfig instances (eg. in PrerequisitesChecker instances) then you should not use the MavenProject from Project but from RunConfig. That one will have the props from execution injected. Not sure if that's the case or if it's desirable to setup the project that way.
Comment 8 Martin Janicek 2013-07-23 08:37:50 UTC
After off-line discussion with Milos, I'm closing the issue as WONTFIX. It's not possible to simply evaluate properties from nbactions.xml and they should be located either in pom.xml or in nb-configuration.xml.