Index: src/org/netbeans/modules/j2ee/weblogic9/Bundle.properties =================================================================== RCS file: /cvs/serverplugins/weblogic9/src/org/netbeans/modules/j2ee/weblogic9/Bundle.properties,v retrieving revision 1.9 diff -u -r1.9 Bundle.properties --- src/org/netbeans/modules/j2ee/weblogic9/Bundle.properties 12 Oct 2006 14:41:05 -0000 1.9 +++ src/org/netbeans/modules/j2ee/weblogic9/Bundle.properties 3 Apr 2007 14:14:24 -0000 @@ -17,8 +17,8 @@ # Microsystems, Inc. All Rights Reserved. # -TXT_displayName=BEA WebLogic Server 9 -TXT_productVersion=9 +TXT_displayName=BEA WebLogic Server +TXT_productVersion=9/10 ERR_illegalState=This operation is not possible on a disconnected deployment manager Index: src/org/netbeans/modules/j2ee/weblogic9/WLPluginProperties.java =================================================================== RCS file: /cvs/serverplugins/weblogic9/src/org/netbeans/modules/j2ee/weblogic9/WLPluginProperties.java,v retrieving revision 1.7 diff -u -r1.7 WLPluginProperties.java --- src/org/netbeans/modules/j2ee/weblogic9/WLPluginProperties.java 12 Oct 2006 14:41:05 -0000 1.7 +++ src/org/netbeans/modules/j2ee/weblogic9/WLPluginProperties.java 3 Apr 2007 14:14:24 -0000 @@ -247,7 +247,7 @@ String level = releaseNodeAttributes.getNamedItem("level").getNodeValue(); // NOI18N String installDir = releaseNodeAttributes.getNamedItem("InstallDir").getNodeValue(); // NOI18N String installDirCanonical = new File(installDir).getCanonicalPath(); - if (level != null && level.startsWith("9.") && installDirCanonical.equals(serverRoot.getCanonicalPath())) { + if (level != null && level.startsWith("9.") || level.startsWith("10.") && installDirCanonical.equals(serverRoot.getCanonicalPath())) { return true; } } Index: src/org/netbeans/modules/j2ee/weblogic9/config/WarDeploymentConfiguration.java =================================================================== RCS file: /cvs/serverplugins/weblogic9/src/org/netbeans/modules/j2ee/weblogic9/config/WarDeploymentConfiguration.java,v retrieving revision 1.6 diff -u -r1.6 WarDeploymentConfiguration.java --- src/org/netbeans/modules/j2ee/weblogic9/config/WarDeploymentConfiguration.java 29 Mar 2007 23:05:30 -0000 1.6 +++ src/org/netbeans/modules/j2ee/weblogic9/config/WarDeploymentConfiguration.java 3 Apr 2007 14:14:24 -0000 @@ -1,4 +1,4 @@ -/* + /* * The contents of this file are subject to the terms of the Common Development * and Distribution License (the License). You may not use this file except in * compliance with the License. Index: src/org/netbeans/modules/j2ee/weblogic9/j2ee/WLJ2eePlatformFactory.java =================================================================== RCS file: /cvs/serverplugins/weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/WLJ2eePlatformFactory.java,v retrieving revision 1.11 diff -u -r1.11 WLJ2eePlatformFactory.java --- src/org/netbeans/modules/j2ee/weblogic9/j2ee/WLJ2eePlatformFactory.java 29 Mar 2007 23:05:30 -0000 1.11 +++ src/org/netbeans/modules/j2ee/weblogic9/j2ee/WLJ2eePlatformFactory.java 3 Apr 2007 14:14:24 -0000 @@ -37,6 +37,7 @@ import org.netbeans.modules.j2ee.deployment.plugins.spi.J2eePlatformImpl; import org.netbeans.modules.j2ee.weblogic9.*; +import org.netbeans.modules.j2ee.weblogic9.util.Util; /** * A sub-class of the J2eePlatformFactory that is set up to return the @@ -64,6 +65,7 @@ } private static final Set SPEC_VERSIONS = new HashSet(); + static { SPEC_VERSIONS.add(J2eeModule.J2EE_14); } @@ -87,6 +89,12 @@ public J2eePlatformImplImpl(WLDeploymentManager dm) { this.dm = dm; + + // Check for WebLogic Server 10x to allow Java EE 5 Projects + String version = Util.getWeblogicDomainVersion(dm.getInstanceProperties().getProperty(WLPluginProperties.DOMAIN_ROOT_ATTR)); + + if (version != null && version.contains("10")) + SPEC_VERSIONS.add(J2eeModule.JAVA_EE_5); } public boolean isToolSupported(String toolName) { @@ -151,6 +159,7 @@ try { List list = new ArrayList(); list.add(fileToUrl(new File(getPlatformRoot(), "server/lib/weblogic.jar"))); // NOI18N + list.add(fileToUrl(new File(getPlatformRoot(), "server/lib/api.jar"))); // NOI18N library.setContent(J2eeLibraryTypeProvider. VOLUME_TYPE_CLASSPATH, list); Index: src/org/netbeans/modules/j2ee/weblogic9/resources/Bundle.properties =================================================================== RCS file: /cvs/serverplugins/weblogic9/src/org/netbeans/modules/j2ee/weblogic9/resources/Bundle.properties,v retrieving revision 1.5 diff -u -r1.5 Bundle.properties --- src/org/netbeans/modules/j2ee/weblogic9/resources/Bundle.properties 12 Oct 2006 14:41:06 -0000 1.5 +++ src/org/netbeans/modules/j2ee/weblogic9/resources/Bundle.properties 3 Apr 2007 14:14:24 -0000 @@ -17,7 +17,8 @@ # Microsystems, Inc. All Rights Reserved. # -OpenIDE-Module-Name=BEA WebLogic Server 9 +OpenIDE-Module-Name=BEA WebLogic Server OpenIDE-Module-Display-Category=Java EE -OpenIDE-Module-Short-Description=Plugin for BEA WebLogic Server 9 -OpenIDE-Module-Long-Description=The plugin enables J2EE development modules to configure, deploy, and debug J2EE components on BEA WebLogic Server 9. +OpenIDE-Module-Short-Description=Plugin for BEA WebLogic Server +OpenIDE-Module-Long-Description=\ + The plugin enables J2EE development modules to configure, deploy, and debug J2EE components on BEA WebLogic Server Index: src/org/netbeans/modules/j2ee/weblogic9/ui/wizard/Bundle.properties =================================================================== RCS file: /cvs/serverplugins/weblogic9/src/org/netbeans/modules/j2ee/weblogic9/ui/wizard/Bundle.properties,v retrieving revision 1.12 diff -u -r1.12 Bundle.properties --- src/org/netbeans/modules/j2ee/weblogic9/ui/wizard/Bundle.properties 12 Oct 2006 14:41:07 -0000 1.12 +++ src/org/netbeans/modules/j2ee/weblogic9/ui/wizard/Bundle.properties 3 Apr 2007 14:14:24 -0000 @@ -18,7 +18,7 @@ # ERR_INVALID_JDK=IDE must run on JDK 1.5. -ERR_INVALID_SERVER_VERSION=Please enter a valid BEA WebLogic Server 9 installation directory. +ERR_INVALID_SERVER_VERSION=Please enter a valid BEA WebLogic Server 9 or 10 installation directory. ERR_INVALID_SERVER_ROOT=The entered installation directory is not properly structured. DOMAIN_LIST_NOT_FOUND=Domain list file {0} was not found. LBL_SERVER_LOCATION=Server Location: Index: src/org/netbeans/modules/j2ee/weblogic9/util/Util.java =================================================================== RCS file: src/org/netbeans/modules/j2ee/weblogic9/util/Util.java diff -N src/org/netbeans/modules/j2ee/weblogic9/util/Util.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/netbeans/modules/j2ee/weblogic9/util/Util.java 3 Apr 2007 14:14:24 -0000 @@ -0,0 +1,68 @@ +/* + * The contents of this file are subject to the terms of the Common Development + * and Distribution License (the License). You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the License at http://www.netbeans.org/cddl.html + * or http://www.netbeans.org/cddl.txt. + * + * When distributing Covered Code, include this CDDL Header Notice in each file + * and include the License file at http://www.netbeans.org/cddl.txt. + * If applicable, add the following below the CDDL Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package org.netbeans.modules.j2ee.weblogic9.util; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import org.openide.ErrorManager; + +import org.openide.xml.XMLUtil; +import org.w3c.dom.Document; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +/** + * Helper class + * + * @author Michal Mocnak + */ +public class Util { + + private static final String CONFIG_XML = "config/config.xml"; + + private Util() {} + + public static String getWeblogicDomainVersion(String domainRoot) { + // Domain config file + File config = new File(domainRoot, CONFIG_XML); + + // Check if the file exists + if (!config.exists()) + return null; + + try { + InputSource source = new InputSource(new FileInputStream(config)); + Document d = XMLUtil.parse(source, false, false, null, null); + + // Retrieve domain version + return d.getElementsByTagName("domain-version").item(0).getTextContent(); + + } catch(FileNotFoundException e) { + ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); + } catch(IOException e) { + ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); + } catch(SAXException e) { + ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); + } + + return null; + } +} \ No newline at end of file