geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlaskow...@apache.org
Subject svn commit: r552225 - in /geronimo/sandbox/geronimo-netbeans-plugin: ./ src/main/java/org/apache/geronimo/netbeans/ src/main/java/org/apache/geronimo/netbeans/ide/ src/main/java/org/apache/geronimo/netbeans/ide/ui/ src/main/java/org/apache/geronimo/net...
Date Sat, 30 Jun 2007 23:27:32 GMT
Author: jlaskowski
Date: Sat Jun 30 16:27:30 2007
New Revision: 552225

URL: http://svn.apache.org/viewvc?view=rev&rev=552225
Log:
More improvements - nothing really important from end user perspective (still warming up)

Added:
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoTarget.java
  (with props)
Modified:
    geronimo/sandbox/geronimo-netbeans-plugin/   (props changed)
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentFactory.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoJ2eePlatformFactory.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoOptionalDeploymentManagerFactory.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/AddServerLocationPanel.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoInstantiatingIterator.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoPluginProperties.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoPluginUtils.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/nodes/GeronimoManagerNode.java
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/Bundle.properties
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/nodes/Bundle.properties
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/resources/layer.xml
    geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/resources/nbdep.xml

Propchange: geronimo/sandbox/geronimo-netbeans-plugin/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Jun 30 16:27:30 2007
@@ -1 +1,4 @@
-.classpath
+.classpath
+.settings
+nbproject
+.project

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentFactory.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentFactory.java?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentFactory.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentFactory.java
Sat Jun 30 16:27:30 2007
@@ -1,3 +1,19 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
 package org.apache.geronimo.netbeans;
 
 import java.io.File;
@@ -51,13 +67,13 @@
 
     final static Logger logger = Logger.getLogger(GeronimoDeploymentFactory.class.toString());
 
-    public static final String URI_PREFIX = "deployer:geronimo:"; // NOI18N
+    public static final String URI_PREFIX = "deployer:geronimo:";
 
-    private static final String DISCONNECTED_URI = "deployer:geronimo:http://localhost:8080&";
// NOI18N
+    private static final String DISCONNECTED_URI = "deployer:geronimo::localhost:8080";
 
     private static final String DEPLOYMENT_FACTORY_CLASS_NAME = "org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl";
 
-    private static final String DEPLOY_JSR88_JAR_PATH = "/repository/org/apache/geronimo/modules/geronimo-deploy-jsr88/2.0-M6/geronimo-deploy-jsr88-2.0-M6.jar";
+    private static final String DEPLOY_JSR88_PARTIAL_JAR_PATH = "/repository/org/apache/geronimo/modules/geronimo-deploy-jsr88/";
 
     private static final String DEPLOYER_JAR_PATH = "/bin/deployer.jar";
 
@@ -69,11 +85,14 @@
         if (instance == null) {
             instance = new GeronimoDeploymentFactory();
             DeploymentFactoryManager.getInstance().registerDeploymentFactory(instance);
-            registerDefaultServerInstance();
         }
         return instance;
     }
 
+    public boolean handlesURI(String uri) {
+        return (uri != null) ? uri.startsWith(URI_PREFIX) : false;
+    }
+
     /**
      * Map of a server installation directory to a deployment factory
      */
@@ -104,14 +123,30 @@
         try {
             List<URL> urlList = new ArrayList<URL>();
 
-            File[] libs = new File(serverRoot + "/lib").listFiles();
-            for (File lib : libs) {
-                urlList.add(lib.toURI().toURL());
+            {
+                File[] libs = new File(serverRoot + "/lib").listFiles();
+                for (File lib : libs) {
+                    urlList.add(lib.toURI().toURL());
+                }
             }
             urlList.add(new File(serverRoot + DEPLOYER_JAR_PATH).toURI().toURL());
             urlList.add(new File(serverRoot + SERVER_JAR_PATH).toURI().toURL());
-            urlList.add(new File(serverRoot + DEPLOY_JSR88_JAR_PATH).toURI().toURL());
-
+            // FIXME: Fix the mess with jar versioning
+            {
+                File[] libs = new File(serverRoot + DEPLOY_JSR88_PARTIAL_JAR_PATH).listFiles();
+                String version = "2.0-M6"; // the latest official version
+                for (File lib : libs) {
+                    URL jsr88DirUrl = lib.toURI().toURL();
+                    urlList.add(jsr88DirUrl);
+                    String[] pathParts = jsr88DirUrl.toString().split("/");
+                    version = pathParts[pathParts.length - 1]; // 2.0-SNAPSHOT
+                }
+                File deployJsr88Jar = new File(serverRoot + DEPLOY_JSR88_PARTIAL_JAR_PATH
+ version + File.separator
+                        + "geronimo-deploy-jsr88-" + version + ".jar");
+                if (deployJsr88Jar.exists()) {
+                    urlList.add(deployJsr88Jar.toURI().toURL());
+                }
+            }
             URLClassLoader loader = new GeronimoClassLoader(urlList.toArray(new URL[] {}),
                     GeronimoDeploymentFactory.class.getClassLoader());
             return loader;
@@ -149,16 +184,14 @@
         return factory;
     }
 
-    public boolean handlesURI(String uri) {
-        if (uri != null && uri.startsWith(URI_PREFIX)) {
-            return true;
-        }
-
-        return false;
-    }
-
     /**
      * Return a connected DeploymentManager instance.
+     * 
+     * @param uri
+     * @param username
+     * @param password
+     * @return
+     * @throws DeploymentManagerCreationException
      */
     public DeploymentManager getDeploymentManager(String uri, String username, String password)
             throws DeploymentManagerCreationException {
@@ -223,28 +256,11 @@
     }
 
     public String getDisplayName() {
-        return NbBundle.getMessage(GeronimoDeploymentFactory.class, "SERVER_NAME"); // NOI18N
+        return NbBundle.getMessage(GeronimoDeploymentFactory.class, "LBL_DisplayName"); //
NOI18N
     }
 
     private static final String INSTALL_ROOT_PROP_NAME = "org.apache.geronimo.netbeans.installRoot";
 
-    private static void registerDefaultServerInstance() {
-        try {
-            FileObject serverInstanceDir = getServerInstanceDir();
-            String serverLocation = getDefaultInstallLocation();
-            // TODO: setRemovability(serverInstanceDir);
-            if (GeronimoPluginUtils.isGoodServerLocation(new File(serverLocation))) {
-                if (!isAlreadyRegistered(serverInstanceDir)) {
-                    String host = "localhost"; // NOI18N
-                    String port = GeronimoPluginUtils.getHTTPConnectorPort(serverLocation);
// NOI18N
-                    register(serverInstanceDir, serverLocation, host, port);
-                }
-            }
-        } catch (IOException ioe) {
-            Logger.getLogger("global").log(Level.INFO, null, ioe.getMessage());
-        }
-    }
-
     private static String getDefaultInstallLocation() {
         String installRoot = System.getProperty(INSTALL_ROOT_PROP_NAME);
         if (installRoot != null && new File(installRoot).exists()) {
@@ -261,7 +277,7 @@
             throws IOException {
         String displayName = generateDisplayName(serverInstanceDir);
 
-        String url = URI_PREFIX + host + ":" + port + "#default&" + serverLocation; //
NOI18N
+        String url = URI_PREFIX + ":" + host + ":" + port + "#default&" + serverLocation;
// NOI18N
 
         String name = FileUtil.findFreeFileName(serverInstanceDir, "instance", null); //
NOI18N
         FileObject instanceFO = serverInstanceDir.createData(name);

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoDeploymentManager.java
Sat Jun 30 16:27:30 2007
@@ -257,15 +257,9 @@
     }
 
     public Target[] getTargets() throws IllegalStateException {
-        return new Target[] { new Target() {
-            public String getName() {
-                return "Testowa instancja Jacka";
-            }
-
-            public String getDescription() {
-                return "Opis Jacka";
-            }
-        } };
+        return new Target[] { 
+            new GeronimoTarget(realUri, "GeronimoDeploymentManager.getTargets() - getDisplayName")
+        };
         // return dm.getTargets();
     }
 

Added: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoTarget.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoTarget.java?view=auto&rev=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoTarget.java
(added)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoTarget.java
Sat Jun 30 16:27:30 2007
@@ -0,0 +1,27 @@
+package org.apache.geronimo.netbeans;
+
+import javax.enterprise.deploy.spi.Target;
+
+public class GeronimoTarget implements Target {
+
+    private final String name;
+    private final String desc;
+    
+    public GeronimoTarget(String name, String desc) {
+        this.name = name;
+        this.desc = desc;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getDescription() {
+        return desc;
+    }
+    
+    public String toString() {
+        return desc;
+    }
+
+}

Propchange: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoTarget.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoTarget.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoTarget.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/GeronimoTarget.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoJ2eePlatformFactory.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoJ2eePlatformFactory.java?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoJ2eePlatformFactory.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoJ2eePlatformFactory.java
Sat Jun 30 16:27:30 2007
@@ -236,7 +236,6 @@
         // -------------------------------------------------
 
         private void initLibraries() {
-            // create library
             LibraryImplementation lib = new J2eeLibraryTypeProvider().createLibrary();
             lib.setName(NbBundle.getMessage(GeronimoJ2eePlatformFactory.class, "LIBRARY_TITLE"));
             lib.setContent(J2eeLibraryTypeProvider.VOLUME_TYPE_CLASSPATH, properties.getClasses());

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoOptionalDeploymentManagerFactory.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoOptionalDeploymentManagerFactory.java?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoOptionalDeploymentManagerFactory.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/GeronimoOptionalDeploymentManagerFactory.java
Sat Jun 30 16:27:30 2007
@@ -11,13 +11,12 @@
 import org.openide.WizardDescriptor.InstantiatingIterator;
 
 /**
- * An entry point to the plugin's optional functionality, such as server
- * start/stop, incremental deployment, custom wizard for instance addition and
- * the ability to locate the servlet for a jsp page.
+ * An entry point to the plugin's optional functionality, such as server start/stop, incremental
deployment, custom
+ * wizard for instance addition and the ability to locate the servlet for a jsp page.
+ * 
+ * Factory for optional deployment functionality that a plugin can provide. Plugins need
to register an instance of this
+ * class in module layer in folder J2EE/DeploymentPlugins/{plugin_name}.
  * 
- * Factory for optional deployment functionality that a plugin can provide. 
- * Plugins need to register an instance of this class in module layer in folder J2EE/DeploymentPlugins/{plugin_name}.
- *
  * @version $Rev$ $Date$
  */
 public class GeronimoOptionalDeploymentManagerFactory extends OptionalDeploymentManagerFactory
{

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/AddServerLocationPanel.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/AddServerLocationPanel.java?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/AddServerLocationPanel.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/AddServerLocationPanel.java
Sat Jun 30 16:27:30 2007
@@ -58,10 +58,8 @@
                     "MSG_InvalidServerLocation")); // NOI18N
             return false;
         }
-
         wizard.putProperty(PROP_ERROR_MESSAGE, null);
-        GeronimoPluginProperties.getInstance().setInstallLocation(
-                ((AddServerLocationVisualPanel) getComponent()).getInstallLocation());
+        GeronimoPluginProperties.getInstance().setInstallLocation(locationStr);
         GeronimoPluginProperties.getInstance().saveProperties();
         instantiatingIterator.setInstallLocation(locationStr);
         return true;

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoInstantiatingIterator.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoInstantiatingIterator.java?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoInstantiatingIterator.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoInstantiatingIterator.java
Sat Jun 30 16:27:30 2007
@@ -39,7 +39,7 @@
     private transient WizardDescriptor.Panel[] panels = null;
 
     // private InstallPanel panel;
-    private transient Set listeners = new HashSet(1);
+    private transient Set<ChangeListener> listeners = new HashSet<ChangeListener>(1);
 
     public void removeChangeListener(ChangeListener l) {
         synchronized (listeners) {
@@ -86,7 +86,6 @@
     }
 
     public Set instantiate() throws IOException {
-        logger.info("instantiate()");
         Set result = new HashSet();
 
         String displayName = (String) wizard.getProperty(AddServerInstanceWizard.PROP_DISPLAY_NAME);
@@ -124,7 +123,6 @@
     }
 
     protected String[] createSteps() {
-        logger.info("createSteps");
         if (!skipServerLocationStep) {
             return new String[] { NbBundle.getMessage(GeronimoInstantiatingIterator.class,
"STEP_ServerLocation"), // NOI18N
                     NbBundle.getMessage(GeronimoInstantiatingIterator.class, "STEP_Properties")
}; // NOI18N

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoPluginProperties.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoPluginProperties.java?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoPluginProperties.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoPluginProperties.java
Sat Jun 30 16:27:30 2007
@@ -18,16 +18,17 @@
     // serverplugins/weblogic9/src/org/netbeans/modules/j2ee/weblogic9/WLPluginProperties.java
     private static final boolean verboseRegistration = System.getProperty("netbeans.geronimo.registration")
!= null;
 
-    public static final String PROPERTY_DISPLAY_NAME = "displayName";// NOI18N
-    public static final String PROPERTY_SERVER = "server";// NOI18N
-    public static final String PROPERTY_DEPLOY_DIR = "deploy-dir";// NOI18N
-    public static final String PROPERTY_SERVER_DIR = "server-dir";// NOI18N
-    public static final String PROPERTY_HOST = "host";// NOI18N
-    public static final String PROPERTY_PORT = "port";// NOI18N
+    public static final String PROPERTY_DISPLAY_NAME = "displayName";
+    public static final String PROPERTY_SERVER = "server";
+    // FIXME: Use it so other version-dependent lib paths are correct
+    public static final String PROPERTY_VERSION = "version";
+    public static final String PROPERTY_DEPLOY_DIR = "deploy-dir";
+    public static final String PROPERTY_SERVER_DIR = "server-dir";
+    public static final String PROPERTY_HOST = "host";
+    public static final String PROPERTY_PORT = "port";
 
     private static GeronimoPluginProperties pluginProperties = null;
     private String installLocation;
-    private String domainLocation;
 
     public static GeronimoPluginProperties getInstance() {
         if (pluginProperties == null) {
@@ -137,17 +138,5 @@
 
     public String getInstallLocation() {
         return this.installLocation;
-    }
-
-    public void setDomainLocation(String domainLocation) {
-        if (domainLocation.endsWith("/") || domainLocation.endsWith("\\")) {
-            domainLocation = domainLocation.substring(0, domainLocation.length() - 1);
-        }
-
-        this.domainLocation = domainLocation;
-    }
-
-    public String getDomainLocation() {
-        return domainLocation;
     }
 }

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoPluginUtils.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoPluginUtils.java?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoPluginUtils.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/ide/ui/GeronimoPluginUtils.java
Sat Jun 30 16:27:30 2007
@@ -39,10 +39,11 @@
         serverRequirements.add("var");
         serverRequirements.add("bin/deployer.jar");
         serverRequirements.add("bin/server.jar");
-        serverRequirements.add("lib/geronimo-kernel-2.0-M6.jar");
-        // used in GeronimoDeploymentFactory
-        serverRequirements
-                .add("repository/org/apache/geronimo/modules/geronimo-deploy-jsr88/2.0-M6/geronimo-deploy-jsr88-2.0-M6.jar");
+        // TODO: Make sure that the version number is verified to ensure the plugin works
with the Geronimo 2.0 version
+        // serverRequirements.add("lib/geronimo-kernel-*.jar");
+        // // used in GeronimoDeploymentFactory
+        // serverRequirements
+        // .add("repository/org/apache/geronimo/modules/geronimo-deploy-jsr88/*/geronimo-deploy-jsr88-*.jar");
     }
 
     private static boolean isGoodServerLocation(File candidate, List<String> requirements)
{
@@ -57,7 +58,7 @@
         return isGoodServerLocation(candidate, serverRequirements);
     }
 
-    private static boolean hasRequiredChildren(File candidate, List<String> requiredChildren)
{
+    private static boolean hasRequiredChildren(File candidate, final List<String> requiredChildren)
{
         if (null == candidate)
             return false;
         String[] children = candidate.list();
@@ -65,9 +66,9 @@
             return false;
         if (null == requiredChildren)
             return true;
-        Iterator iter = requiredChildren.iterator();
+        Iterator<String> iter = requiredChildren.iterator();
         while (iter.hasNext()) {
-            String next = (String) iter.next();
+            String next = iter.next();
             File test = new File(candidate.getPath() + File.separator + next);
             if (!test.exists())
                 return false;

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/nodes/GeronimoManagerNode.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/nodes/GeronimoManagerNode.java?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/nodes/GeronimoManagerNode.java
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/java/org/apache/geronimo/netbeans/nodes/GeronimoManagerNode.java
Sat Jun 30 16:27:30 2007
@@ -3,6 +3,7 @@
 import java.awt.Component;
 import java.awt.Image;
 import java.beans.BeanInfo;
+import java.text.MessageFormat;
 
 import org.apache.geronimo.netbeans.GeronimoDeploymentManager;
 import org.apache.geronimo.netbeans.customizer.Customizer;
@@ -69,9 +70,6 @@
 
         Node.Property property = null;
 
-        // DISPLAY NAME
-
-        // DISPLAY NAME
         property = new PropertySupport.ReadWrite(NbBundle.getMessage(GeronimoManagerNode.class,
"LBL_DISPLAY_NAME"), // NOI18N
                 String.class, NbBundle.getMessage(GeronimoManagerNode.class, "LBL_DISPLAY_NAME"),
// NOI18N
                 NbBundle.getMessage(GeronimoManagerNode.class, "HINT_DISPLAY_NAME") // NOI18N
@@ -87,9 +85,6 @@
 
         properties.put(property);
 
-        // servewr name
-
-        // servewr name
         property = new PropertySupport.ReadOnly(NbBundle.getMessage(GeronimoManagerNode.class,
"LBL_SERVER_NAME"), // NOI18N
                 String.class, NbBundle.getMessage(GeronimoManagerNode.class, "LBL_SERVER_NAME"),
// NOI18N
                 NbBundle.getMessage(GeronimoManagerNode.class, "HINT_SERVER_NAME") // NOI18N
@@ -157,7 +152,10 @@
         InstanceProperties ip = InstanceProperties.getInstanceProperties(getDeploymentManager().getUrl());
         String host = ip.getProperty(GeronimoPluginProperties.PROPERTY_HOST);
         String port = ip.getProperty(GeronimoPluginProperties.PROPERTY_PORT);
-        return HTTP_HEADER + host + ":" + port + "/"; // NOI18N
+        String url = "http://" + host + ":" + port;
+        String installDir = ip.getProperty(GeronimoPluginProperties.PROPERTY_SERVER_DIR);
+        Object[] args = { installDir, url };
+        return MessageFormat.format(NbBundle.getMessage(GeronimoManagerNode.class, "HINT_node"),
args);
     }
 
     public GeronimoDeploymentManager getDeploymentManager() {

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/Bundle.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/Bundle.properties?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/Bundle.properties
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/Bundle.properties
Sat Jun 30 16:27:30 2007
@@ -1,4 +1,4 @@
-SERVER_NAME=Apache Geronimo 2.0
+LBL_DisplayName=Apache Geronimo 2.0
 LBL_FactoryVersion=Deployment Factory for Apache Geronimo 2.0 Plugin 
 
 MSG_DEPLOYING=Deploying {0}

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/nodes/Bundle.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/nodes/Bundle.properties?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/nodes/Bundle.properties
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/nodes/Bundle.properties
Sat Jun 30 16:27:30 2007
@@ -1,7 +1,7 @@
 LBL_DISPLAY_NAME=Display Name
 
 HINT_DISPLAY_NAME=Display name by which this server represents in IDE
-
+HINT_node=Node representing Apache Geronimo v2 installed in {0} ({1})
 
 LBL_SERVER_NAME=Server Name
 

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/resources/layer.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/resources/layer.xml?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/resources/layer.xml
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/resources/layer.xml
Sat Jun 30 16:27:30 2007
@@ -1,42 +1,64 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
 <!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd">
 
 <filesystem>
-    <folder name="J2EE">
-        <folder name="DeploymentPlugins">
-            <folder name="Apache Geronimo">
-                <file name="Descriptor" url="nbdep.xml"/>
-                <file name="Factory.instance">
-                    <attr name="instanceCreate" methodvalue="org.apache.geronimo.netbeans.GeronimoDeploymentFactory.create"/>
-                    <attr name="instanceClass" stringvalue="org.apache.geronimo.netbeans.GeronimoDeploymentFactory"/>
-                    <attr name="instanceOf" stringvalue="javax.enterprise.deploy.spi.factories.DeploymentFactory"/>
-                </file>
-                <file name="RegistryNodeFactory.instance">
-                    <attr name="instanceCreate" newvalue="org.apache.geronimo.netbeans.nodes.GeronimoRegistryNodeFactory"/>
-                    <attr name="instanceClass" stringvalue="org.apache.geronimo.netbeans.nodes.GeronimoRegistryNodeFactory"/>
-                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.RegistryNodeFactory"/>
-                </file>
-                <file name="J2eePlatformFactory.instance">
-                    <attr name="instanceCreate" newvalue="org.apache.geronimo.netbeans.ide.GeronimoJ2eePlatformFactory"/>
-                    <attr name="instanceClass" stringvalue="org.apache.geronimo.netbeans.ide.GeronimoJ2eePlatformFactory"/>
-                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.J2eePlatformFactory"/>
-                </file>
-                <file name="OptionalFactory.instance">
-                    <attr name="instanceCreate" newvalue="org.apache.geronimo.netbeans.ide.GeronimoOptionalDeploymentManagerFactory"/>
-                    <attr name="instanceClass" stringvalue="org.apache.geronimo.netbeans.ide.GeronimoOptionalDeploymentManagerFactory"/>
-                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
-                </file>
-                <file name="ConfigurationSupportImpl.instance">
-                    <attr name="instanceClass" stringvalue="org.apache.geronimo.netbeans.config.ConfigurationSupportImpl"/>
-                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.ConfigurationSupport"/>
-                </file>
-                <folder name="DeploymentFileNames">
-                    <folder name="WAR">
-                        <file name="WEB-INF\geronimo-web.xml"/>                   
     
-                    </folder>
-                </folder>
-                
-            </folder>
+  <folder name="J2EE">
+    <folder name="DeploymentPlugins">
+      <folder name="Apache Geronimo">
+        <file name="Descriptor" url="nbdep.xml" />
+        <file name="Factory.instance">
+          <attr name="instanceCreate" methodvalue="org.apache.geronimo.netbeans.GeronimoDeploymentFactory.create"
/>
+          <attr name="instanceClass" stringvalue="org.apache.geronimo.netbeans.GeronimoDeploymentFactory"
/>
+          <attr name="instanceOf" stringvalue="javax.enterprise.deploy.spi.factories.DeploymentFactory"
/>
+        </file>
+        <file name="RegistryNodeFactory.instance">
+          <attr name="instanceCreate" newvalue="org.apache.geronimo.netbeans.nodes.GeronimoRegistryNodeFactory"
/>
+          <attr name="instanceClass" stringvalue="org.apache.geronimo.netbeans.nodes.GeronimoRegistryNodeFactory"
/>
+          <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.RegistryNodeFactory"
/>
+        </file>
+        <file name="J2eePlatformFactory.instance">
+          <attr name="instanceCreate" newvalue="org.apache.geronimo.netbeans.ide.GeronimoJ2eePlatformFactory"
/>
+          <attr name="instanceClass" stringvalue="org.apache.geronimo.netbeans.ide.GeronimoJ2eePlatformFactory"
/>
+          <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.J2eePlatformFactory"
/>
+        </file>
+        <file name="OptionalFactory.instance">
+          <attr name="instanceCreate"
+            newvalue="org.apache.geronimo.netbeans.ide.GeronimoOptionalDeploymentManagerFactory"
/>
+          <attr name="instanceClass"
+            stringvalue="org.apache.geronimo.netbeans.ide.GeronimoOptionalDeploymentManagerFactory"
/>
+          <attr name="instanceOf"
+            stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"
/>
+        </file>
+        <file name="ConfigurationSupportImpl.instance">
+          <attr name="instanceClass" stringvalue="org.apache.geronimo.netbeans.config.ConfigurationSupportImpl"
/>
+          <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.ConfigurationSupport"
/>
+        </file>
+        <folder name="DeploymentFileNames">
+          <folder name="WAR">
+            <file name="WEB-INF\geronimo-web.xml" />
+          </folder>
         </folder>
+
+      </folder>
     </folder>
+  </folder>
 </filesystem>

Modified: geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/resources/nbdep.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/resources/nbdep.xml?view=diff&rev=552225&r1=552224&r2=552225
==============================================================================
--- geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/resources/nbdep.xml
(original)
+++ geronimo/sandbox/geronimo-netbeans-plugin/src/main/resources/org/apache/geronimo/netbeans/resources/nbdep.xml
Sat Jun 30 16:27:30 2007
@@ -1,8 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
 <netbeans-deployment>
-    <disconnected-string>geronimo-deployer:http://localhost:8080&amp;</disconnected-string>

+  <disconnected-string>deployer:geronimo:localhost:8080</disconnected-string>
 
-    <web-context-root>
-        <xpath>/</xpath>
-        <prop-name>contextRoot</prop-name>
-    </web-context-root>
+  <web-context-root>
+    <xpath>/</xpath>
+    <prop-name>contextRoot</prop-name>
+  </web-context-root>
 </netbeans-deployment>



Mime
View raw message