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 186634 - Defects in the ant build when a war is deployed to TomCat outside the ide in a build manager
Summary: Defects in the ant build when a war is deployed to TomCat outside the ide in ...
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 6.x
Hardware: All Other
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 03:09 UTC by ablakey
Modified: 2012-11-05 15:32 UTC (History)
1 user (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 ablakey 2010-05-25 03:09:21 UTC
There are a couple of defects in the ant build, when a deployment is run outside the ide.

To deploy outside the ide the following properties are set:

user.properties.file
tomcat.home
catalina.home
catalina.base
tomcat.server
tomcat.port
tomcat.username
tomcat.password
tomcat.url

The ant-deploy.xml that is generated has the following issues:

1. The war file location is incorrect and needs to be prefixed by the full path name of its location. A good way is to use: <exec executable="pwd" outputproperty="pwd" /> and then set war="file:${pwd}/${deploy.ant.archive}" 
2. The deployment needs to be made rerunnable - the deploy fails if the war is already deployed - so undeploy needs to be run first.

Also - please add tasks to start/stop tomcat - google for them.

Finally - when you have all this working say in hudson - please remove the execution of nbjpdaappreloaded - which causes the build to fail - seems like this needs to be made conditional on netbeans.home? in a new, generated build target in build-impl.xml
Comment 1 David Konecny 2010-05-25 21:55:12 UTC
Martin,

could you please fix this:

> Finally - when you have all this working say in hudson - please remove the
> execution of nbjpdaappreloaded - which causes the build to fail - seems like
> this needs to be made conditional on netbeans.home? in a new, generated build
> target in build-impl.xml

it was introduced as fix for bug 120224. nbjpdaappreloaded should be run conditional only if target is run from within NetBeans. After that is fixed pass the issue please to serverplugins/tomcat to solve the rest. Thx.
Comment 2 Martin Entlicher 2012-04-23 09:25:53 UTC
The condition on netbeans.home was already added to targets -do-debug-fix and -do-debug-fix-test
Comment 3 Petr Hejl 2012-11-05 15:32:44 UTC
I think all issues has been fixed. 

The ant script is written to be executed from project directory.
The deployment must not undeploy existing application it could be a completely unrelated one.

For server start/stop please file an enhancement.