geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bjr...@apache.org
Subject svn commit: r726806 - in /geronimo/devtools/eclipse-plugin: branches/2.1.4/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/ branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/ branches/2.1.4/plugins/or...
Date Mon, 15 Dec 2008 21:22:24 GMT
Author: bjreed
Date: Mon Dec 15 13:22:23 2008
New Revision: 726806

URL: http://svn.apache.org/viewvc?rev=726806&view=rev
Log:
GERONIMODEVTOOLS. minor Server Plugin Manager improvements.  slight upgrade to error handling
and using more robust way of finding directories

Modified:
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerPluginManager.java
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/pom.xml
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerPluginManagerWizard.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerPluginManager.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/pom.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerPluginManagerWizard.java

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerPluginManager.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerPluginManager.java?rev=726806&r1=726805&r2=726806&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerPluginManager.java
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerPluginManager.java
Mon Dec 15 13:22:23 2008
@@ -575,7 +575,13 @@
     private String getArtifactLocation (Artifact artifact) {
         String ch = File.separator;
         String temp = server.getRuntime().getLocation().toOSString() + ch + "repository"
+ ch;
-        temp += artifact.getGroupId().replaceAll("[.]", ch) + ch + artifact.getArtifactId()
+ ch + artifact.getVersion() + ch;
+        String group = artifact.getGroupId();
+		int pos = group.indexOf(".");
+		while (pos > -1) {
+		    group = group.substring(0, pos) + ch + group.substring(pos + 1);
+		    pos = group.indexOf(".");
+        }
+        temp += group + ch + artifact.getArtifactId() + ch + artifact.getVersion() + ch;
         return temp;
     }
 
@@ -592,7 +598,13 @@
             fileName += "/";
         }
 
-        fileName += artifact.getGroupId().replaceAll("[.]", "/") + "/" + artifact.getArtifactId()
+ "/" + artifact.getVersion() + "/";
+        String group = artifact.getGroupId();
+        int pos = group.indexOf(".");
+        while (pos > -1) {
+            group = group.substring(0, pos) + File.separator + group.substring(pos + 1);
+            pos = group.indexOf(".");
+        }
+        fileName += group + "/" + artifact.getArtifactId() + "/" + artifact.getVersion()
+ "/";
         File temp = new File (fileName);
         if (!temp.exists()) {
             temp.mkdirs();

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF?rev=726806&r1=726805&r2=726806&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF
Mon Dec 15 13:22:23 2008
@@ -14,7 +14,8 @@
  org.eclipse.core.resources,
  org.eclipse.wst.common.project.facet.ui,
  org.apache.geronimo.jee.v21.jaxbmodel,
- org.apache.geronimo.runtime.common
+ org.apache.geronimo.runtime.common,
+ org.apache.geronimo.runtime.v21
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: Apache.org
 Export-Package: org.apache.geronimo.st.v21.ui,
@@ -23,4 +24,3 @@
  org.apache.geronimo.st.v21.ui.pages,
  org.apache.geronimo.st.v21.ui.sections,
  org.apache.geronimo.st.v21.ui.wizards
-Import-Package: org.apache.geronimo.system.plugin.model

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/pom.xml?rev=726806&r1=726805&r2=726806&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/pom.xml
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/pom.xml
Mon Dec 15 13:22:23 2008
@@ -117,6 +117,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.devtools</groupId>
+            <artifactId>org.apache.geronimo.runtime.v21</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.devtools</groupId>
             <artifactId>org.apache.geronimo.st.core</artifactId>
             <version>${version}</version>
         </dependency>

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerPluginManagerWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerPluginManagerWizard.java?rev=726806&r1=726805&r2=726806&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerPluginManagerWizard.java
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerPluginManagerWizard.java
Mon Dec 15 13:22:23 2008
@@ -118,12 +118,22 @@
                 }
                 break;
             case 1:
-                metadata = pluginManager.getPluginMetadata(createPluginCombo.getItem(createPluginCombo.getSelectionIndex()));
-                page2.loadMetadata (metadata);
+                try {
+                    metadata = pluginManager.getPluginMetadata(createPluginCombo.getItem(createPluginCombo.getSelectionIndex()));
+                    page2.loadMetadata (metadata);
+                }
+                catch (Exception e) {
+                    e.printStackTrace();
+                }
                 pageVisible++;
                 break;
             case 2:
-                page3.loadMetadata (metadata);
+                try {
+                    page3.loadMetadata (metadata);
+                }
+                catch (Exception e) {
+                    e.printStackTrace();
+                }
                 pageVisible++;
                 break;
             case 3:
@@ -154,7 +164,7 @@
                 break;
         }
     }
-    
+
     public class ServerPluginManagerWizardPage0 extends AbstractWizardPage {
 
         public ServerPluginManagerWizardPage0(String pageName) {
@@ -258,7 +268,7 @@
         Text name, downloadRepos, category, description, pluginURL, author;
         Text geronimoVersions, jvmVersions, dependencies, obsoletes;
         Label id;
-        
+
         public ServerPluginManagerWizardPage2(String pageName) {
             super(pageName);
         }
@@ -378,7 +388,7 @@
             }
             return buf.toString();
          }
-        
+
         private String artifactToString(ArtifactType artifact) {
             StringBuffer buffer = new StringBuffer();
 
@@ -402,7 +412,7 @@
             }
             return buffer.toString();
         }
-        
+
         private void setText (Text text, String value) {
             if (value != null) {
                 text.setText(value);
@@ -442,7 +452,7 @@
         protected Button addLicenseButton, editLicenseButton, removeLicenseButton;
         protected Button addPrereqButton, editPrereqButton, removePrereqButton;
         protected PluginType pluginType;
-        
+
         public ServerPluginManagerWizardPage3(String pageName) {
             super(pageName);
         }
@@ -570,7 +580,7 @@
             editPrereqButton.setEnabled(prereqTable.getSelectionCount() > 0);
             removePrereqButton.setEnabled(prereqTable.getSelectionCount() > 0);
         }
-        
+
         protected Composite createButtonComposite(Composite parent) {
             Composite buttonComp = new Composite(parent, SWT.NONE);
             GridLayout layout = new GridLayout();
@@ -626,14 +636,14 @@
             }
             return metadata;
         }
-        
+
         private String[] licenseToStringArray (LicenseType license) {
             String[] stringArray = new String[licenseTable.getColumnCount()];
             stringArray[0] = license.getValue();
             stringArray[1] = String.valueOf(license.isOsiApproved());
             return stringArray;
         }
-        
+
         private String[] prereqToStringArray (PrerequisiteType prereq) {
             String[] stringArray = new String[prereqTable.getColumnCount()];
             if (prereq.getId() != null) {
@@ -686,9 +696,9 @@
                         setPageComplete(false);
                     }
                 }
-                
+
             });
-            
+
             setPageComplete(false);
             setControl(composite);
         }
@@ -697,7 +707,7 @@
         public IWizardPage getPreviousPage() {
             return getPages()[0];
         }
-        
+
         public void populateTable (PluginListType pluginList) {
             String[] pluginValues;
             pluginLoadTable.removeAll();
@@ -710,7 +720,7 @@
                 tabItem.setText(pluginValues);
             }
         }
-        
+
         private String[] pluginToStringArray (PluginType plugin) {
             String[] stringArray = new String[pluginLoadTable.getColumnCount()];
             stringArray[0] = plugin.getName();
@@ -732,7 +742,7 @@
     }
 
     public boolean performFinish() {
-        // take each selected object in the pluginLoadTable and install and start 
+        // take each selected object in the pluginLoadTable and install and start
         List<PluginType> pluginList = new ArrayList<PluginType>();
         for (int i = 0; i < pluginLoadTable.getSelectionCount(); i++) {
             pluginList.add ((PluginType)pluginLoadTable.getItem(pluginLoadTable.getSelectionIndices()[i]).getData());

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerPluginManager.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerPluginManager.java?rev=726806&r1=726805&r2=726806&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerPluginManager.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerPluginManager.java
Mon Dec 15 13:22:23 2008
@@ -574,7 +574,13 @@
     private String getArtifactLocation (Artifact artifact) {
         String ch = File.separator;
         String temp = server.getRuntime().getLocation().toOSString() + ch + "repository"
+ ch;
-        temp += artifact.getGroupId().replaceAll("[.]", ch) + ch + artifact.getArtifactId()
+ ch + artifact.getVersion() + ch;
+        String group = artifact.getGroupId();
+        int pos = group.indexOf(".");
+        while (pos > -1) {
+            group = group.substring(0, pos) + ch + group.substring(pos + 1);
+            pos = group.indexOf(".");
+        }
+        temp += group + ch + artifact.getArtifactId() + ch + artifact.getVersion().toString()
+ ch;
         return temp;
     }
 
@@ -591,7 +597,13 @@
             fileName += "/";
         }
 
-        fileName += artifact.getGroupId().replaceAll("[.]", "/") + "/" + artifact.getArtifactId()
+ "/" + artifact.getVersion() + "/";
+        String group = artifact.getGroupId();
+        int pos = group.indexOf(".");
+        while (pos > -1) {
+            group = group.substring(0, pos) + File.separator + group.substring(pos + 1);
+            pos = group.indexOf(".");
+        }
+        fileName += group + "/" + artifact.getArtifactId() + "/" + artifact.getVersion()
+ "/";
         File temp = new File (fileName);
         if (!temp.exists()) {
             temp.mkdirs();

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF?rev=726806&r1=726805&r2=726806&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/META-INF/MANIFEST.MF
Mon Dec 15 13:22:23 2008
@@ -14,7 +14,8 @@
  org.eclipse.core.resources,
  org.eclipse.wst.common.project.facet.ui,
  org.apache.geronimo.jee.v21.jaxbmodel,
- org.apache.geronimo.runtime.common
+ org.apache.geronimo.runtime.common,
+ org.apache.geronimo.runtime.v22
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: Apache.org
 Export-Package: org.apache.geronimo.st.v21.ui,
@@ -23,4 +24,3 @@
  org.apache.geronimo.st.v21.ui.pages,
  org.apache.geronimo.st.v21.ui.sections,
  org.apache.geronimo.st.v21.ui.wizards
-Import-Package: org.apache.geronimo.system.plugin.model

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/pom.xml?rev=726806&r1=726805&r2=726806&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/pom.xml Mon
Dec 15 13:22:23 2008
@@ -117,6 +117,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.devtools</groupId>
+            <artifactId>org.apache.geronimo.runtime.v22</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.devtools</groupId>
             <artifactId>org.apache.geronimo.st.core</artifactId>
             <version>${version}</version>
         </dependency>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerPluginManagerWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerPluginManagerWizard.java?rev=726806&r1=726805&r2=726806&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerPluginManagerWizard.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerPluginManagerWizard.java
Mon Dec 15 13:22:23 2008
@@ -118,12 +118,22 @@
                 }
                 break;
             case 1:
-                metadata = pluginManager.getPluginMetadata(createPluginCombo.getItem(createPluginCombo.getSelectionIndex()));
-                page2.loadMetadata (metadata);
+                try {
+                    metadata = pluginManager.getPluginMetadata(createPluginCombo.getItem(createPluginCombo.getSelectionIndex()));
+                    page2.loadMetadata (metadata);
+                }
+                catch (Exception e) {
+                    e.printStackTrace();
+                }
                 pageVisible++;
                 break;
             case 2:
-                page3.loadMetadata (metadata);
+                try {
+                    page3.loadMetadata (metadata);
+                }
+                catch (Exception e) {
+                    e.printStackTrace();
+                }
                 pageVisible++;
                 break;
             case 3:



Mime
View raw message