Author: snjeza
Date: 2010-08-30 15:44:52 -0400 (Mon, 30 Aug 2010)
New Revision: 24555
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeLocator.java
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java
Log:
https://jira.jboss.org/browse/JBIDE-6936 Runtime detection - invalid runtimes / servers
created
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeLocator.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeLocator.java 2010-08-30
18:28:12 UTC (rev 24554)
+++
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeLocator.java 2010-08-30
19:44:52 UTC (rev 24555)
@@ -82,6 +82,7 @@
droolsFound = true;
}
}
+ boolean jbpmFound = false;
if (!droolsFound) {
boolean isJBPM = isValidJbpmInstallation(root.getAbsolutePath());
if (isJBPM) {
@@ -92,10 +93,14 @@
version = JBPM4;
}
serverDefinitions.add(new ServerDefinition(root.getName(), version,
JBossRuntimeStartup.JBPM, root.getAbsoluteFile()));
+ jbpmFound = true;
}
}
+ if (!droolsFound && !jbpmFound) {
+ children = root.listFiles();
+ }
}
- children = root.listFiles();
+
}
} else {
children = File.listRoots();
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java 2010-08-30
18:28:12 UTC (rev 24554)
+++
trunk/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java 2010-08-30
19:44:52 UTC (rev 24555)
@@ -93,6 +93,8 @@
public static final String SEAM = "SEAM"; // NON-NLS-1$
public static final String DROOLS = "DROOLS"; // NON-NLS-1$
+
+ private static final String AS = "AS"; //$NON-NLS-1$
public static final String JBOSS_EAP_HOME = "../../../../jboss-eap/jboss-as";
// JBoss AS home directory (relative to plugin)- <RHDS_HOME>/jbossas.
//$NON-NLS-1$
@@ -312,12 +314,15 @@
// then process seam runtimes from bundled servers
for(ServerDefinition serverDefinition:serverDefinitions) {
String type = serverDefinition.getType();
- if (SOA_P.equals(type) || EAP.equals(type) || EPP.equals(type) || EWP.equals(type)) {
+ if (SOA_P.equals(type) || EAP.equals(type) || EPP.equals(type) || EWP.equals(type) )
{
for (String folder : SEAM_HOME_FOLDER_OPTIONS) {
File seamFile = new File(serverDefinition.getLocation(),folder); //$NON-NLS-1$
addSeam(map, serverDefinition, seamFile);
}
}
+ if (SEAM.equals(type)) {
+ addSeam(map, serverDefinition, serverDefinition.getLocation());
+ }
}
// Initialize Seam Runtime from JBoss EAP
@@ -459,7 +464,7 @@
int index = getJBossASVersion(asLocation);
createJBossServer(asLocation,index,name, runtimeName);
}
- } else {
+ } else if (AS.equals(type)){
String version = serverDefinition.getVersion();
int index = 2;
if ("3.2".equals(version)) { //$NON-NLS-1$