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.
Summary: | no way to set the default server externally (e.g. from installer) | ||
---|---|---|---|
Product: | serverplugins | Reporter: | Pavel Buzek <pbuzek> |
Component: | Infrastructure | Assignee: | Nam Nguyen <nnguyen> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 3.x | ||
Hardware: | PC | ||
OS: | Windows ME/2000 | ||
Issue Type: | TASK | Exception Reporter: |
Description
Pavel Buzek
2003-12-10 06:23:10 UTC
I plan to have the default instance defined at this location in <NB installation dir>/system/services/J2EE/DefaultInstance.xml. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE server-string PUBLIC "-//org_netbeans_modules_j2ee//DTD ServerString 1.0//EN" "nbres:/org/netbeans/modules/j2ee/deployment/impl/server-string.dtd"> <server-string plugin="J2EESDK" url="deployer:Sun:S1AS::localhost:4848"> <target name="localhost:4848"/> </server-string> There will be one default-server.xml per plugin. In addition, we will have an entry in install.properties indicating user choice during installation: j2eeserver.default=system/services/J2EE/<Server-Plugin Name> This way add after-installation flexibility, adminitrator can also change the default instance definition, e.g. admin portnumber, by editing the file. Each plugin need to check into CVS the ServerString xml file and make sure ant default build step put a copy of it into <netbeans>/system/services/J2EE/<user-friendly-filename> The <user-friendly-filename> could be conveniently used by the installer to show on chooser UI. The j2eeserver, on first registry access will try to read property 'j2eeserver.default' from the installation/system/installer.properties for the relative path to user choice. If the file exist and consistent, read in to registetry. Else, just read from the layer file. If no default specified, the default server is determined by first one registered. Implemented as proposed, except that the default instance file format will be java properties file format for easier handle by installer, in case future installer need to persist input from users. The recommended locations to put the default instance files is: j2eeserver.default=system/J2EE/InstalledServers/<Server-Plugin Name> Tested on installation having both tomcat and s1as plugins (with s1as plugin picked as default without any intervention). Deposit a file in netbeans/system/J2EE/InstalledServers/Tomcat5 and have this line in netbeans/system/install.properties: j2eeserver.default=system/J2EE/InstalledServers/Tomcat5 will make Tomcat5 as preferred default instance over S1AS. |