Author: rob.stryker(a)jboss.com
Date: 2007-11-21 13:18:48 -0500 (Wed, 21 Nov 2007)
New Revision: 5021
Modified:
trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
Log:
JBIDE-1343 - Core Fix, adding default deploy locations to first run.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2007-11-21
18:13:32 UTC (rev 5020)
+++
trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2007-11-21
18:18:48 UTC (rev 5021)
@@ -47,6 +47,7 @@
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.ServerUtil;
import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
+import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
/**
* @author eskimo
@@ -85,6 +86,12 @@
*/
public void earlyStartup() {
+ /*
+ * If there are any problems with EAP not functioning the same as
+ * servers created from scratch, THIS is the method to go to.
+ *
+ * Compare this method with JBossServerWizardFragment#performFinish()
+ */
try {
JstFirstRunPlugin.getDefault().getPreferenceStore().setDefault(FIRST_START_PREFERENCE_NAME,
true);
@@ -150,6 +157,18 @@
server.setHost(JBOSS_AS_HOST);
server.setName(JBOSS_AS_NAME);
+ // JBossServer.DEPLOY_DIRECTORY
+ String deployVal = runtime.getLocation().append(
"server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("deploy").toOSString();
+ ((ServerWorkingCopy)server).setAttribute("org.jboss.ide.eclipse.as.core.server.deployDirectory",
deployVal);
+
+ // IDeployableServer.TEMP_DEPLOY_DIRECTORY
+ String deployTmpFolderVal = runtime.getLocation().append(
"server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("tmp").append("jbosstoolsTemp").toOSString();
+ ((ServerWorkingCopy)server).setAttribute("org.jboss.ide.eclipse.as.core.server.tempDeployDirectory",
deployTmpFolderVal);
+
+ // If we'd need to set up a username / pw for JMX, do it here.
+// ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_USERNAME, authUser);
+// ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_PASSWORD, authPass);
+
server.save(false, progressMonitor);
}
Show replies by date