You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by bj...@apache.org on 2008/12/12 16:35:01 UTC
svn commit: r726047 - in /geronimo/devtools/eclipse-plugin/trunk/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.apache.geroni...
Author: bjreed
Date: Fri Dec 12 07:35:00 2008
New Revision: 726047
URL: http://svn.apache.org/viewvc?rev=726047&view=rev
Log:
GERONIMODEVTOOLS-547. Remove duplicate system models. Thanks to Tim McConnell for the help
Removed:
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/src/main/java/org/apache/geronimo/jee/plugin/
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/PluginConverter.java
Modified:
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/META-INF/MANIFEST.MF
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/META-INF/MANIFEST.MF
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/pom.xml
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerPluginManager.java
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/META-INF/MANIFEST.MF?rev=726047&r1=726046&r2=726047&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.jee.v21.jaxbmodel/META-INF/MANIFEST.MF Fri Dec 12 07:35:00 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/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF?rev=726047&r1=726046&r2=726047&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF Fri Dec 12 07:35:00 2008
@@ -24,6 +24,7 @@
org.eclipse.wst.web,
org.eclipse.jem.util,
org.apache.geronimo.runtime.common,
+ org.apache.geronimo.runtime.v22,
org.apache.geronimo.jee.v21.jaxbmodel,
org.eclipse.jst.j2ee.core,
org.eclipse.emf.ecore
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml?rev=726047&r1=726046&r2=726047&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml Fri Dec 12 07:35:00 2008
@@ -126,6 +126,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.jee.v21.jaxbmodel</artifactId>
<version>${version}</version>
</dependency>
Modified: geronimo/devtools/eclipse-plugin/trunk/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/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java?rev=726047&r1=726046&r2=726047&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java Fri Dec 12 07:35:00 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/trunk/plugins/org.apache.geronimo.st.v21.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/META-INF/MANIFEST.MF?rev=726047&r1=726046&r2=726047&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/META-INF/MANIFEST.MF Fri Dec 12 07:35:00 2008
@@ -10,7 +10,7 @@
org.eclipse.wst.server.core,
org.eclipse.debug.core,
org.eclipse.wst.common.project.facet.core,
- org.apache.geronimo.runtime.v21,
+ org.apache.geronimo.runtime.v22,
org.apache.geronimo.st.core,
org.eclipse.jst.common.frameworks,
org.eclipse.wst.common.modulecore,
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/pom.xml?rev=726047&r1=726046&r2=726047&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/pom.xml Fri Dec 12 07:35:00 2008
@@ -137,7 +137,7 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.devtools</groupId>
- <artifactId>org.apache.geronimo.runtime.v21</artifactId>
+ <artifactId>org.apache.geronimo.runtime.v22</artifactId>
<version>${version}</version>
</dependency>
<dependency>
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=726047&r1=726046&r2=726047&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 Fri Dec 12 07:35:00 2008
@@ -57,7 +57,6 @@
import org.apache.geronimo.st.v21.core.internal.Trace;
import org.apache.geronimo.system.jmx.KernelDelegate;
import org.apache.geronimo.system.plugin.SourceRepository;
-import org.apache.geronimo.system.plugin.SourceRepositoryFactory;
import org.apache.geronimo.system.plugin.model.ArtifactType;
import org.apache.geronimo.system.plugin.model.DependencyType;
import org.apache.geronimo.system.plugin.model.ObjectFactory;
@@ -78,17 +77,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 +137,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 +148,7 @@
}
}
}
-
+
try {
remoteDM.installPluginList("repository", relativeServerPath, selectedPlugins);
remoteDM.archive(relativeServerPath, "var/temp", new Artifact(group, artifact, (String)version, format));
@@ -192,14 +191,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 +379,7 @@
in.close();
} catch (Exception e) {}
}
- }
+ }
}
if (pluginList == null) {
ObjectFactory factory = new ObjectFactory();
@@ -390,7 +389,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 +447,7 @@
}
catch (Exception e) {
}
-
+
PluginType metadata = new PluginType();
PluginArtifactType instance = new PluginArtifactType();
metadata.getPluginArtifact().add(instance);
@@ -530,8 +529,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 +539,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 +562,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 +577,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 +599,7 @@
return fileName;
}
-
+
private ConfigurationManager getConfigurationManager () {
Trace.tracePoint("Entry", "GeronimoServerPluginManager.getConfigurationManager");
@@ -628,11 +627,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 +640,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 +665,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();
@@ -882,10 +881,11 @@
repoLocations = pluginsToInstall.getDefaultRepository();
}
for (String repoLocation : repoLocations) {
- SourceRepository repo = SourceRepositoryFactory.getSourceRepository(repoLocation);
- repos.add(repo);
+ //SourceRepository repo = SourceRepositoryFactory.getSourceRepository(repoLocation);
+ //repos.add(repo);
}
}
return repos;
}
+
}