geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bjr...@apache.org
Subject svn commit: r726056 - in /geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins: org.apache.geronimo.jee.v21.jaxbmodel/META-INF/ org.apache.geronimo.jee.v21.jaxbmodel/src/main/java/org/apache/geronimo/jee/plugin/ org.apache.geronimo.st.core/ org.apac...
Date Fri, 12 Dec 2008 15:45:49 GMT
Author: bjreed
Date: Fri Dec 12 07:45:48 2008
New Revision: 726056

URL: http://svn.apache.org/viewvc?rev=726056&view=rev
Log:
GERONIMODEVTOOLS-547. Remove duplicate system models.  Thanks to Tim McConnell for the help

Removed:
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/main/java/org/apache/geronimo/jee/plugin/
    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/PluginConverter.java
Modified:
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.jee.v21.jaxbmodel/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/pom.xml
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java
    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

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.jee.v21.jaxbmodel/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.jee.v21.jaxbmodel/META-INF/MANIFEST.MF?rev=726056&r1=726055&r2=726056&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.jee.v21.jaxbmodel/META-INF/MANIFEST.MF
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.jee.v21.jaxbmodel/META-INF/MANIFEST.MF
Fri Dec 12 07:45:48 2008
@@ -16,7 +16,6 @@
  org.apache.geronimo.jee.naming,
  org.apache.geronimo.jee.openejb,
  org.apache.geronimo.jee.persistence,
- org.apache.geronimo.jee.plugin,
  org.apache.geronimo.jee.security,
  org.apache.geronimo.jee.web
 Import-Package: junit.framework;version="3.8.2"

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF?rev=726056&r1=726055&r2=726056&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
Fri Dec 12 07:45:48 2008
@@ -24,6 +24,7 @@
  org.eclipse.wst.web,
  org.eclipse.jem.util,
  org.apache.geronimo.runtime.common,
+ org.apache.geronimo.runtime.v21,
  org.apache.geronimo.jee.v21.jaxbmodel,
  org.eclipse.jst.j2ee.core,
  org.eclipse.emf.ecore

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/pom.xml?rev=726056&r1=726055&r2=726056&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/pom.xml
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/pom.xml
Fri Dec 12 07:45:48 2008
@@ -124,6 +124,11 @@
             <artifactId>org.apache.geronimo.runtime.common</artifactId>
             <version>${version}</version>
         </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.jee.v21.jaxbmodel</artifactId>

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java?rev=726056&r1=726055&r2=726056&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java
Fri Dec 12 07:45:48 2008
@@ -76,8 +76,7 @@
                     "org.apache.geronimo.jee.applicationclient:" +
                     "org.apache.geronimo.jee.deployment:" +
                     "org.apache.geronimo.jee.naming:" +
-                    "org.apache.geronimo.jee.security:" +
-                    "org.apache.geronimo.jee.plugin", Activator.class.getClassLoader() );
+                    "org.apache.geronimo.jee.security:", Activator.class.getClassLoader()
);
         } catch (JAXBException e) {
             Trace.tracePoint("JAXBException", "JAXBContext.newInstance");
             e.printStackTrace();
@@ -88,7 +87,7 @@
     private static JAXBContext newJAXBPluginContext() {
         try {
             return JAXBContext.newInstance( 
-                    "org.apache.geronimo.jee.plugin", Activator.class.getClassLoader() );
+                    "org.apache.geronimo.system.plugin.model", Activator.class.getClassLoader()
);
         } catch (JAXBException e) {
             Trace.tracePoint("JAXBException", "JAXBContext.newInstance");
             e.printStackTrace();

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=726056&r1=726055&r2=726056&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
Fri Dec 12 07:45:48 2008
@@ -78,17 +78,17 @@
     private PluginListType data;
     private List<String> pluginList;
     private Kernel kernel;
-    
+
     public GeronimoServerPluginManager () {
         kernel = null;
         Trace.tracePoint("Constructor", "GeronimoServerPluginManager");
     }
-    
+
     public boolean serverChanged (Object aServer, String serverPrefix) {
         Trace.tracePoint("Entry", "GeronimoServerPluginManager.serverChanged", aServer, serverPrefix);
         server = (IServer)aServer;
 
-        boolean enabled = server != null && 
+        boolean enabled = server != null &&
                 server.getServerType().getId().startsWith(serverPrefix) &&
                 server.getServerState() == IServer.STATE_STARTED;
 
@@ -138,7 +138,7 @@
         PluginListType selectedPlugins = new PluginListType();
         String name;
         boolean found;
-        
+
         for (int i = 0; i < selected.length; i++) {
             name = pluginList.get(selected[i]);
             found = false;
@@ -149,7 +149,7 @@
                 }
             }
         }
-        
+
         try {
             remoteDM.installPluginList("repository", relativeServerPath, selectedPlugins);
             remoteDM.archive(relativeServerPath, "var/temp", new Artifact(group, artifact,
(String)version, format));
@@ -192,14 +192,14 @@
         }
         return metadata;
     }
-    
+
     // mimics org.apache.geronimo.system.plugin.PluginInstallerGBean.updatePluginMetadata
     public void savePluginXML (String configId, PluginType metadata) {
         Trace.tracePoint("Entry", "GeronimoServerPluginManager.savePluginXML", configId,
metadata);
 
         Artifact artifact = Artifact.create(configId);
         File dir = new File (getArtifactLocation(artifact));
-        
+
         if (!dir.isDirectory()) { // must be a packed (JAR-formatted) plugin
             try {
                 File temp = new File(dir.getParentFile(), dir.getName() + ".temp");
@@ -380,7 +380,7 @@
                         in.close();
                     } catch (Exception e) {}
                 }
-            }   
+            }
         }
         if (pluginList == null) {
             ObjectFactory factory = new ObjectFactory();
@@ -390,7 +390,7 @@
         Trace.tracePoint("Exit", "GeronimoServerPluginManager.readPluginList", pluginList);
         return pluginList;
     }
-    
+
     // mimics org.apache.geronimo.system.plugin.GeronimoSourceRepository.extractPluginMetadata
     private PluginType extractPluginMetadata (File dir) {
         Trace.tracePoint("Entry", "GeronimoServerPluginManager.extractPluginMetadata", dir);
@@ -448,7 +448,7 @@
         }
         catch (Exception e) {
         }
-        
+
         PluginType metadata = new PluginType();
         PluginArtifactType instance = new PluginArtifactType();
         metadata.getPluginArtifact().add(instance);
@@ -530,8 +530,7 @@
     public PluginListType loadPluginList (InputStream in) {
         try {
             JAXBElement pluginListElement = JAXBUtils.unmarshalPlugin(in);
-            org.apache.geronimo.jee.plugin.PluginListType pl = (org.apache.geronimo.jee.plugin.PluginListType)pluginListElement.getValue();
-            return PluginConverter.jeeToModelPluginListType(pl);
+            return (PluginListType)pluginListElement.getValue();
         }
         catch (Throwable e) {
             e.printStackTrace();
@@ -541,20 +540,20 @@
 
     private void writePluginList (PluginListType pluginList, OutputStream out) {
         try {
-            JAXBElement element = PluginConverter.pluginListTypeToJAXB(PluginConverter.modelToJeePluginListType
(pluginList));
+            ObjectFactory jeeFactory = new ObjectFactory();
+            JAXBElement element = jeeFactory.createGeronimoPluginList(pluginList);
             JAXBUtils.marshalPlugin(element, out);
         }
         catch (Throwable e) {
             e.printStackTrace();
         }
     }
-    
+
     //mimic org.apache.geronimo.system.plugin.PluginXmlUtil.loadPluginMetadata(in);
     private PluginType loadPluginMetadata (InputStream in) {
         try {
             JAXBElement pluginElement = JAXBUtils.unmarshalPlugin(in);
-            org.apache.geronimo.jee.plugin.PluginType pt = (org.apache.geronimo.jee.plugin.PluginType)pluginElement.getValue();
-            return PluginConverter.jeeToModelPluginType(pt);
+            return (PluginType)pluginElement.getValue();
         }
         catch (Throwable e) {
             e.printStackTrace();
@@ -564,7 +563,8 @@
 
     private void writePluginMetadata (PluginType metadata, OutputStream out) {
         try {
-            JAXBElement element = PluginConverter.pluginTypeToJAXB(PluginConverter.modelToJeePluginType
(metadata));
+            ObjectFactory jeeFactory = new ObjectFactory();
+            JAXBElement element = jeeFactory.createGeronimoPlugin(metadata);
             JAXBUtils.marshalPlugin(element, out);
         }
         catch (Throwable e) {
@@ -578,7 +578,7 @@
         temp += artifact.getGroupId().replaceAll("[.]", ch) + ch + artifact.getArtifactId()
+ ch + artifact.getVersion() + ch;
         return temp;
     }
-    
+
     private String addFilename (String path, Artifact artifact) {
         if (!path.endsWith("/") && !path.endsWith("\\")) {
             path += "/";
@@ -600,7 +600,7 @@
 
         return fileName;
     }
-    
+
     private ConfigurationManager getConfigurationManager () {
         Trace.tracePoint("Entry", "GeronimoServerPluginManager.getConfigurationManager");
 
@@ -628,11 +628,11 @@
         Trace.tracePoint("Exit", "GeronimoServerPluginManager.getConfigurationManager");
         return null;
     }
-    
+
     public ArtifactType toArtifactType(String configId) {
         return toArtifactType (Artifact.create(configId));
     }
-    
+
     public ArtifactType toArtifactType(Artifact id) {
         ArtifactType artifact = new ArtifactType();
         artifact.setGroupId(id.getGroupId());
@@ -641,11 +641,11 @@
         artifact.setType(id.getType());
         return artifact;
     }
-    
+
     public Artifact toArtifact(ArtifactType id) {
         return new Artifact (id.getGroupId(), id.getArtifactId(), id.getVersion(), id.getType());
     }
-    
+
     public void addGeronimoDependencies(ConfigurationData data, List<DependencyType>
deps, boolean includeVersion) {
         processDependencyList(data.getEnvironment().getDependencies(), deps, includeVersion);
         Map<String, ConfigurationData> children = data.getChildConfigurations();
@@ -666,7 +666,7 @@
     public DependencyType toDependencyType(String configId) {
         return toDependencyType(new Dependency(Artifact.create(configId), ImportType.ALL),
true);
     }
-    
+
     public DependencyType toDependencyType(Dependency dep, boolean includeVersion) {
         Artifact id = dep.getArtifact();
         DependencyType dependency = new DependencyType();
@@ -888,4 +888,5 @@
         }
         return repos;
     }
+
 }



Mime
View raw message