### Eclipse Workspace Patch 1.0 #P org.jboss.tools.esb.project.ui Index: src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java =================================================================== --- src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java (revision 35011) +++ src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java (working copy) @@ -636,7 +636,7 @@ if(versionNumber >= 4.7){ cmVersions.add("1.2.0"); //$NON-NLS-1$ } - if(versionNumber >= 4.9){ + if(versionNumber >= 4.9 || versionNumber == 4.10){ cmVersions.add("1.3.0"); //$NON-NLS-1$ } int index = cmVersions.getItemCount() - 1; #P org.jboss.tools.esb.project.core Index: src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java =================================================================== --- src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java (revision 0) +++ src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java (revision 0) @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2011 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.esb.project.core.comparator; + +import java.util.Comparator; + +/** + * @author bfitzpat + * + */ +public class ESBRuntimeVersionComparator implements Comparator { + + public int compare(String arg0, String arg1) { + Integer[] versions1 = parse(arg0, '.'); + Integer[] versions2 = parse(arg1, '.'); + if (versions1 != null && versions2 != null) { + int compareMajor = versions1[0].compareTo(versions2[0]); + int compareMinor = versions1[1].compareTo(versions2[1]); + if (compareMajor == 0) { + return compareMinor; + } else { + return compareMajor; + } + } + return 0; + } + + private Integer[] parse ( String input, char separator) { + if (input == null) + return null; + int pos = input.indexOf(separator); + String out1 = input.substring(0, pos); + String out2 = input.substring(pos + 1, input.length()); + if (out1 != null && out2 != null) { + Integer intOut1 = Integer.parseInt(out1); + Integer intOut2 = Integer.parseInt(out2); + return new Integer[]{intOut1, intOut2}; + } + return null; + } + +} Index: src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java =================================================================== --- src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java (revision 0) +++ src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java (revision 0) @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2011 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.esb.core.runtime; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; +import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants; + +public class ESBRuntimeResolver_410 extends AbstractESBRuntimeResolver implements + IESBRuntimeResolver { + + private final static String JUDDI_CLIENT_JAR_31 = "juddi-client-3.1.0.jar"; + private final static String JUDDI_CLIENT_JAR_311 = "juddi-client-3.1.1.jar"; + + public boolean isValidESBRuntime(String location, String version, String configuration){ + List jarNames = new ArrayList(); + + for(File file : getAllRuntimeJars(location, configuration)){ + jarNames.add(file.getName()); + } + + return jarNames.contains(ROSETTA_JAR) && + (jarNames.contains(JUDDI_CLIENT_JAR_31) || jarNames.contains(JUDDI_CLIENT_JAR_311)); + } + + + public List getJarDirectories(String runtimeLocation, String configuration) { + List directories = super.getJarDirectories(runtimeLocation, configuration); + IPath rtHome = new Path(runtimeLocation); + IPath soapDeployPath = rtHome.append(SOAP_AS_LOCATION) + .append(IJBossRuntimeResourceConstants.SERVER).append(configuration) + .append(IJBossRuntimeResourceConstants.DEPLOYERS) + .append("esb.deployer").append("lib"); + + IPath deployPath = rtHome + .append(IJBossRuntimeResourceConstants.SERVER).append(configuration) + .append(IJBossRuntimeResourceConstants.DEPLOYERS) + .append("esb.deployer").append("lib"); + directories.add(soapDeployPath); + directories.add(deployPath); + + return directories; + } + + +} Index: src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_49.java =================================================================== --- src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_49.java (revision 35011) +++ src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_49.java (working copy) @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 Red Hat, Inc. + * Copyright (c) 2009, 2011 Red Hat, Inc. * Distributed under license by Red Hat, Inc. All rights reserved. * This program is made available under the terms of the * Eclipse Public License v1.0 which accompanies this distribution, @@ -23,6 +23,8 @@ private final static String CONFIG_MODEL_JAR_12 = "jbossesb-config-model-1.2.0.jar"; private final static String CONFIG_MODEL_JAR_13 = "jbossesb-config-model-1.3.0.jar"; + private final static String JUDDI_CLIENT_JAR_303 = "juddi-client-3.0.3.jar"; + private final static String JUDDI_CLIENT_JAR_304 = "juddi-client-3.0.4.jar"; public boolean isValidESBRuntime(String location, String version, String configuration){ @@ -34,7 +36,8 @@ return jarNames.contains(ROSETTA_JAR) && jarNames.contains(CONFIG_MODEL_JAR_12) - && jarNames.contains(CONFIG_MODEL_JAR_13); + && jarNames.contains(CONFIG_MODEL_JAR_13) + && (jarNames.contains(JUDDI_CLIENT_JAR_303) || jarNames.contains(JUDDI_CLIENT_JAR_304)); } Index: plugin.xml =================================================================== --- plugin.xml (revision 35011) +++ plugin.xml (working copy) @@ -9,6 +9,9 @@ + + + + + + + + + + + + + + + version="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10"> + version="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10"> + versions="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10"> @@ -317,6 +338,23 @@ id="org.jboss.ide.eclipse.as.runtime.60"> + + + + + + + + + +