geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcco...@apache.org
Subject svn commit: r944559 - in /geronimo/devtools/eclipse-plugin/trunk: ./ eclipse/ plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/
Date Sat, 15 May 2010 04:49:11 GMT
Author: mcconne
Date: Sat May 15 04:49:10 2010
New Revision: 944559

URL: http://svn.apache.org/viewvc?rev=944559&view=rev
Log:
GERONIMODEVTOOLS-615 Enable deployment of OSGi composite bundles and individual bundles

Modified:
    geronimo/devtools/eclipse-plugin/trunk/eclipse/build.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java
    geronimo/devtools/eclipse-plugin/trunk/pom.xml

Modified: geronimo/devtools/eclipse-plugin/trunk/eclipse/build.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/eclipse/build.xml?rev=944559&r1=944558&r2=944559&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/eclipse/build.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/eclipse/build.xml Sat May 15 04:49:10 2010
@@ -96,7 +96,7 @@
         <echo>## Unzipping: ${helios_jee_win32}                                   
            </echo>
         <echo>##                                                                  
            </echo>
         <echo>#################################################################################</echo>
-<!--    <delete dir="${LOCAL_M2_REPO}/eclipse" quiet="true"/> -->
+        <delete dir="${LOCAL_M2_REPO}/eclipse" quiet="true"/> 
         <mkdir dir="${LOCAL_M2_REPO}/eclipse"/>
         <unzip src="${LOCAL_M2_REPO}/eclipse-downloads/${helios_jee_win32}" 
                dest="${LOCAL_M2_REPO}/eclipse"
@@ -122,7 +122,7 @@
         <echo>## Unzipping: ${helios_jee_win64}                                   
            </echo>
         <echo>##                                                                  
            </echo>
         <echo>#################################################################################</echo>
-<!--    <delete dir="${LOCAL_M2_REPO}/eclipse" quiet="true"/> -->
+        <delete dir="${LOCAL_M2_REPO}/eclipse" quiet="true"/> 
         <mkdir dir="${LOCAL_M2_REPO}/eclipse"/>
         <unzip src="${LOCAL_M2_REPO}/eclipse-downloads/${helios_jee_win64}" 
                dest="${LOCAL_M2_REPO}/eclipse"
@@ -154,7 +154,7 @@
         <echo>## Unzipping: ${helios_jee_linux_gz}                                
            </echo>
         <echo>##                                                                  
            </echo>
         <echo>#################################################################################</echo>
-<!--    <delete dir="${LOCAL_M2_REPO}/eclipse" quiet="true"/> -->
+        <delete dir="${LOCAL_M2_REPO}/eclipse" quiet="true"/> 
         <mkdir  dir="${LOCAL_M2_REPO}/eclipse"/>
         <gunzip src="${LOCAL_M2_REPO}/eclipse-downloads/${helios_jee_linux_gz}"/>
         <untar  src="${LOCAL_M2_REPO}/eclipse-downloads/${helios_jee_linux}" 
@@ -181,7 +181,7 @@
         <echo>## Unzipping: ${helios_jee_linux-x86_64_gz}                         
            </echo>
         <echo>##                                                                  
            </echo>
         <echo>#################################################################################</echo>
-<!--    <delete dir="${LOCAL_M2_REPO}/eclipse" quiet="true"/> -->
+        <delete dir="${LOCAL_M2_REPO}/eclipse" quiet="true"/> 
         <mkdir  dir="${LOCAL_M2_REPO}/eclipse"/>
         <gunzip src="${LOCAL_M2_REPO}/eclipse-downloads/${helios_jee_linux-x86_64_gz}"/>
         <untar  src="${LOCAL_M2_REPO}/eclipse-downloads/${helios_jee_linux-x86_64}"
@@ -208,7 +208,7 @@
         <echo>## Unzipping: ${helios_jee_macos_gz}                                
            </echo>
         <echo>##                                                                  
            </echo>
         <echo>#################################################################################</echo>
-<!--    <delete dir="${LOCAL_M2_REPO}/eclipse" quiet="true"/> -->
+        <delete dir="${LOCAL_M2_REPO}/eclipse" quiet="true"/> 
         <mkdir  dir="${LOCAL_M2_REPO}/eclipse"/>
         <gunzip src="${LOCAL_M2_REPO}/eclipse-downloads/${helios_jee_macos_gz}"/>
         <untar  src="${LOCAL_M2_REPO}/eclipse-downloads/${helios_jee_macos}" 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java?rev=944559&r1=944558&r2=944559&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java
Sat May 15 04:49:10 2010
@@ -18,6 +18,7 @@ package org.apache.geronimo.st.v30.core;
 
 import com.ibm.etools.aries.internal.core.IAriesModuleConstants;
 import com.ibm.etools.aries.internal.core.datatransfer.exportmodel.ApplicationExportDataModelProvider;
+import com.ibm.etools.aries.internal.core.datatransfer.exportmodel.BundleExportDataModelProvider;
 
 
 import java.io.File;
@@ -144,6 +145,14 @@ public class DeploymentUtils {
             Trace.tracePoint("Exit ", "DeploymentUtils.getModuleExtension", ".eba");
             return ".eba";
         }
+        else if (GeronimoUtils.isCBAModule(module)) {
+            Trace.tracePoint("Exit ", "DeploymentUtils.getModuleExtension", ".cba");
+            return ".cba";
+        }
+        else if (GeronimoUtils.isBundleModule(module)) {
+            Trace.tracePoint("Exit ", "DeploymentUtils.getModuleExtension", ".jar");
+            return ".jar";
+        }
 
         Trace.tracePoint("Exit ", "DeploymentUtils.getModuleExtension", ".jar");
         return ".jar";
@@ -203,6 +212,10 @@ public class DeploymentUtils {
             return DataModelFactory.createDataModel(new AppClientComponentExportDataModelProvider());
         } else if (IAriesModuleConstants.OSGI_APP.equals(type)) {
             return DataModelFactory.createDataModel(new ApplicationExportDataModelProvider());
+        } else if (IAriesModuleConstants.OSGI_COMP_BUNDLE.equals(type)) {   
+            return DataModelFactory.createDataModel(new ApplicationExportDataModelProvider());
+        } else if (IAriesModuleConstants.OSGI_BUNDLE.equals(type)) {
+            return DataModelFactory.createDataModel(new BundleExportDataModelProvider());
         }
 
         Trace.tracePoint("Exit ", "DeploymentUtils.getExportDataModel", null);

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java?rev=944559&r1=944558&r2=944559&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java
Sat May 15 04:49:10 2010
@@ -18,6 +18,7 @@ package org.apache.geronimo.st.v30.core;
 
 import com.ibm.etools.aries.internal.core.IAriesModuleConstants;
 import com.ibm.etools.aries.internal.core.modules.IApplication;
+import com.ibm.etools.aries.internal.core.modules.IBundle;
 
 import java.io.IOException;
 import java.net.URL;
@@ -206,6 +207,14 @@ abstract public class GeronimoServerDele
                         return modules;
                     }
                 }
+                else if (IAriesModuleConstants.OSGI_COMP_BUNDLE.equals(moduleType.getId()))
{
+                    IApplication osgiApplication = (IApplication) module[0].loadAdapter(IApplication.class,
null);  
+                    IModule[] modules = osgiApplication.getModules();
+                    if (modules != null) {
+                        Trace.tracePoint("Exit ", "GeronimoServerDelegate.getChildModules",
modules);
+                        return modules;
+                    }
+                }
             }
         }
 
@@ -541,13 +550,23 @@ abstract public class GeronimoServerDele
             }
         }
 
-        IModule[] bundles = ServerUtil.getModules(IAriesModuleConstants.OSGI_APP);
-        for (int i = 0; i < bundles.length; i++) {
-            IApplication bundle = (IApplication) bundles[i].loadAdapter(IApplication.class,
null);
-            IModule[] childs = bundle.getModules();
+        IModule[] applicationBundles = ServerUtil.getModules(IAriesModuleConstants.OSGI_APP);
+        for (int i = 0; i < applicationBundles.length; i++) {
+            IApplication application = (IApplication) applicationBundles[i].loadAdapter(IApplication.class,
null);
+            IModule[] childs = application.getModules();
+            for (int j = 0; j < childs.length; j++) {
+                if (childs[j].equals(module))
+                    list.add(applicationBundles[i]);
+            }
+        }
+
+        IModule[] compositeBundles = ServerUtil.getModules(IAriesModuleConstants.OSGI_COMP_BUNDLE);
+        for (int i = 0; i < compositeBundles.length; i++) {
+            IApplication application  = (IApplication) compositeBundles[i].loadAdapter(IApplication.class,
null);
+            IModule[] childs = application.getModules();
             for (int j = 0; j < childs.length; j++) {
                 if (childs[j].equals(module))
-                    list.add(bundles[i]);
+                    list.add(compositeBundles[i]);
             }
         }
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java?rev=944559&r1=944558&r2=944559&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java
Sat May 15 04:49:10 2010
@@ -83,6 +83,14 @@ public class GeronimoUtils {
         return IAriesModuleConstants.OSGI_APP.equals(module.getModuleType().getId());
     }
     
+    public static boolean isCBAModule(IModule module) {
+        return IAriesModuleConstants.OSGI_COMP_BUNDLE.equals(module.getModuleType().getId());
+    }
+    
+    public static boolean isBundleModule(IModule module) {
+        return IAriesModuleConstants.OSGI_BUNDLE.equals(module.getModuleType().getId());
+    }
+    
     public static ModuleType getJSR88ModuleType(IModule module) {
         if (isWebModule(module)) {
             return ModuleType.WAR;

Modified: geronimo/devtools/eclipse-plugin/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/pom.xml?rev=944559&r1=944558&r2=944559&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/pom.xml Sat May 15 04:49:10 2010
@@ -249,22 +249,6 @@
                 <version>4.2.0</version>
             </dependency>
 
-            <!-- 
-             ###########################################################################################################
-             ##                                                                         
                             ##
-             ## TODO: As a temporary solution the Aries tooling has to be manually downloaded
to the plugins          ##
-             ##       directory of the Eclipse installation                             
                             ##
-             ##                                                                         
                             ##
-             ###########################################################################################################
-             -->
-            <dependency>
-                <groupId>com.ibm.etools</groupId>
-                <artifactId>com.ibm.etools.aries.core</artifactId>
-                <version>1.0.0.v20100506_2059</version>
-                <scope>system</scope>
-                <systemPath>C:/M2/eclipse/eclipse/plugins/com.ibm.etools.aries.core_1.0.0.v20100506_2059.jar</systemPath>
-            </dependency>
-
         </dependencies>
     </dependencyManagement>
                         



Mime
View raw message