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.
Currently the j2ee projects use the nbdeploy Ant task, which cannot be run without the IDE. The Ant (headless) deployment support should allow projects to be deployed on servers in the headless mode - without the IDE.
Created attachment 29608 [details] API diff
Created attachment 29609 [details] javadoc
Please review the following API change.
Top-level targets (directly invoked) should never begin with '-'; that is reserved for purely internal targets the user should not be able to run directly. So -deploy-ant should be deploy-ant etc. In fact the "-ant" part is quite useless in an Ant script, so why not simply "deploy" and "undeploy". writeDeploymentScript's moduleType should be an enum?
The -deploy-ant and -undeploy-ant targets are not meant to be invoked directly by the user, they will be called from the build-impl.xml when running without IDE - when the netbeans.home property is not set, to be precise. I'am sorry I should have mentioned this in the description, now I see it is not obvious. I used the "-ant" suffix, since it is not that unlikely that there will already be a target called "-deploy" or "-undeploy" in the build script of some project that would like to use this API and the other reason was to differentiate it from the netbeans "standard" way of deployment - the nbdeploy task. The writeDeploymentScript method uses the module type constants which are already defined in the org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule and which are widely used. I didn't want to introduce new constants when we already have them, even though the current ones are not type safe. Do you think it would be worthy?
Re. targets - makes sense now that you explain it. Re. enum - just an idea, but if you already have the constants you can't change it now I guess.
ok, thanks
Stepane, I reviewed the API and I do not see any problem. Thanks.
Tf there are no farther comments or objections I will integrate this api change during the weekend or on Monday.
F. Checking in apichanges.xml; /cvs/j2eeserver/apichanges.xml,v <-- apichanges.xml new revision: 1.16.6.3.2.4; previous revision: 1.16.6.3.2.3 done Checking in src/org/netbeans/modules/j2ee/deployment/devmodules/api/AntDeploymentHelper.java; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/api/Attic/AntDeploymentHelper.java,v <-- AntDeploymentHelper.java new revision: 1.1.4.1; previous revision: 1.1 done Checking in src/org/netbeans/modules/j2ee/deployment/impl/ServerInstance.java; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ServerInstance.java,v <-- ServerInstance.java new revision: 1.61.2.4.2.3; previous revision: 1.61.2.4.2.2 done Checking in src/org/netbeans/modules/j2ee/deployment/impl/resources/default-ant-deploy.xml; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/resources/Attic/default-ant-deploy.xml,v <-- default-ant-deploy.xml new revision: 1.1.4.1; previous revision: 1.1 done Checking in src/org/netbeans/modules/j2ee/deployment/plugins/api/AntDeploymentProvider.java; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/api/Attic/AntDeploymentProvider.java,v <-- AntDeploymentProvider.java new revision: 1.1.4.1; previous revision: 1.1 done Checking in src/org/netbeans/modules/j2ee/deployment/plugins/api/OptionalDeploymentManagerFactory.java; /cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/api/OptionalDeploymentManagerFactory.java,v <-- OptionalDeploymentManagerFactory.java new revision: 1.4.34.2; previous revision: 1.4.34.1 done