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.
ServerInstance.start is called automatically without checking needsStartForConfigure() when the ServerInstance is asked for the list of available targets. This is visible when you click on the button in run profile customizer to select target and expand the node. The javadoc for StartServer.needsStartForConfigure() says: "Returns true if the admin server should be started before configure." it is not clear if "configure" includes getTargets but I assume it could I will attach a simple patch. If you like it let me know and I will also fix Tomcat not to require to be connected to return targets (that's easy).
Created attachment 12446 [details] diff
Configure here is server configuration. The change there is not enough be cause it will miss start server to get targets for others non-serverconfiguration purpose. As part of solution for not starting tomcat for admin configuration, I will be working on this now to adding another flag in StartServer: needsStartForAdminConfig default true. Tomcat need to return false. Let me take care of this startserver to get target lists too.
Since I am not sure needsStartForAdminConfig <=> needsStartForTargetList I am going to do 2 separate attributes.
I have checkin the StartServer new methods to minimize the needs to start server. My test now show that for Tomcat only execution trigger start tomcat server.
it really works, thanks!