You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2009/11/25 00:16:16 UTC
svn commit: r883920 [1/2] - in /geronimo/server/trunk: ./
framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/
framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/
framework/modules/...
Author: djencks
Date: Tue Nov 24 23:16:13 2009
New Revision: 883920
URL: http://svn.apache.org/viewvc?rev=883920&view=rev
Log:
GERONIMO-4911 Put osgi manifest info in environment, generate manifest in the deployer not in car-maven-plugin. Reduce use of jee-specs, try to eliminate spring car. Don't try to build plugingroups or assemblies until they actually build
Added:
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Manifest.java (contents, props changed)
- copied, changed from r882817, geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Manifest.java
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ManifestException.java (contents, props changed)
- copied, changed from r882817, geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ManifestException.java
Removed:
geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Manifest.java
geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ManifestException.java
geronimo/server/trunk/framework/modules/geronimo-system/src/test/java/org/apache/geronimo/system/logging/log4j/MockLogger.java
Modified:
geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java
geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java
geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.java
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java
geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/xsd/geronimo-module-1.2.xsd
geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java
geronimo/server/trunk/framework/modules/geronimo-system/src/test/java/org/apache/geronimo/system/configuration/InPlaceConfigurationUtilTest.java
geronimo/server/trunk/plugins/activemq/activemq-broker/src/main/history/dependencies.xml
geronimo/server/trunk/plugins/activemq/activemq-portlets/pom.xml
geronimo/server/trunk/plugins/activemq/geronimo-activemq/pom.xml
geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/MasterConfigurationStore.java
geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/MasterConfigurationStoreTest.java
geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/pom.xml
geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml
geronimo/server/trunk/plugins/cxf/cxf/pom.xml
geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/pom.xml
geronimo/server/trunk/plugins/jasper/geronimo-jasper/pom.xml
geronimo/server/trunk/plugins/jasper/jasper/src/main/history/dependencies.xml
geronimo/server/trunk/plugins/jasper/pom.xml
geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/pom.xml
geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/pom.xml
geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/WebAppContextWrapper.java
geronimo/server/trunk/plugins/openejb/openejb-portlets/pom.xml
geronimo/server/trunk/plugins/pluto/pluto-support/pom.xml
geronimo/server/trunk/plugins/pom.xml
geronimo/server/trunk/plugins/system-database/sysdb-portlets/pom.xml
geronimo/server/trunk/plugins/welcome/welcome-jetty/pom.xml
geronimo/server/trunk/plugins/welcome/welcome-jetty/src/main/history/dependencies.xml
geronimo/server/trunk/plugins/welcome/welcome-tomcat/pom.xml
geronimo/server/trunk/plugins/welcome/welcome-tomcat/src/main/history/dependencies.xml
geronimo/server/trunk/pom.xml
geronimo/server/trunk/testsuite/corba-testsuite/corba-mytime/corba-mytime-ear/pom.xml
Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java Tue Nov 24 23:16:13 2009
@@ -233,66 +233,67 @@
};
archiver.getArchiver().addDirectory(baseDirectory, "META-INF/", includes, new String[0]);
- File configFile = new File(new File(getArtifactInRepositoryDir(), "META-INF"), "imports.txt");
+ File manifestFile = new File(new File(getArtifactInRepositoryDir(), "META-INF"), "MANIFEST.MF");
+ if (manifestFile.exists()) {
+ archiver.getArchiver().setManifest(manifestFile);
+ } else {
+ File configFile = new File(new File(getArtifactInRepositoryDir(), "META-INF"), "imports.txt");
- if (configFile.exists()) {
- StringBuilder imports = new StringBuilder("org.apache.geronimo.kernel.osgi,");
- if (boot) {
- archive.addManifestEntry(Constants.BUNDLE_ACTIVATOR, BootActivator.class.getName());
- imports.append("org.apache.geronimo.system.osgi,");
- } else {
- archive.addManifestEntry(Constants.BUNDLE_ACTIVATOR, ConfigurationActivator.class.getName());
- }
- archive.addManifestEntry(Constants.BUNDLE_NAME, project.getName());
- archive.addManifestEntry(Constants.BUNDLE_VENDOR, project.getOrganization().getName());
- ArtifactVersion version = project.getArtifact().getSelectedVersion();
- String versionString = "" + version.getMajorVersion() + "." + version.getMinorVersion() + "." + version.getIncrementalVersion();
- if (version.getQualifier() != null) {
- versionString += "." + version.getQualifier();
- }
- archive.addManifestEntry(Constants.BUNDLE_VERSION, versionString);
- archive.addManifestEntry(Constants.BUNDLE_MANIFESTVERSION, "2");
- archive.addManifestEntry(Constants.BUNDLE_DESCRIPTION, project.getDescription());
- // NB, no constant for this one
- archive.addManifestEntry("Bundle-License", ((License)project.getLicenses().get(0)).getUrl());
- archive.addManifestEntry(Constants.BUNDLE_DOCURL, project.getUrl());
- archive.addManifestEntry(Constants.BUNDLE_SYMBOLICNAME, project.getGroupId() + "." + project.getArtifactId());
- Reader in = new FileReader(configFile);
- char[] buf = new char[1024];
- try {
- int i;
- while ((i = in.read(buf)) > 0) {
- imports.append(buf, 0, i);
+ if (configFile.exists()) {
+ StringBuilder imports = new StringBuilder("org.apache.geronimo.kernel.osgi,");
+ if (boot) {
+ archive.addManifestEntry(Constants.BUNDLE_ACTIVATOR, BootActivator.class.getName());
+ imports.append("org.apache.geronimo.system.osgi,");
+ } else {
+ archive.addManifestEntry(Constants.BUNDLE_ACTIVATOR, ConfigurationActivator.class.getName());
}
- } finally {
- in.close();
- }
-
- // do we have any additional processing directives?
- if (instructions != null) {
- String explicitImports = (String)instructions.get(Constants.IMPORT_PACKAGE);
- // if there is an Import-Package instructions, then add these imports to the
- // list
- if (explicitImports != null) {
- // if specified on multiple lines, remove the line-ends.
- explicitImports = explicitImports.replaceAll( "[\r\n]", "" );
- imports.append(',');
- imports.append(explicitImports);
+ archive.addManifestEntry(Constants.BUNDLE_NAME, project.getName());
+ archive.addManifestEntry(Constants.BUNDLE_VENDOR, project.getOrganization().getName());
+ ArtifactVersion version = project.getArtifact().getSelectedVersion();
+ String versionString = "" + version.getMajorVersion() + "." + version.getMinorVersion() + "." + version.getIncrementalVersion();
+ if (version.getQualifier() != null) {
+ versionString += "." + version.getQualifier();
+ }
+ archive.addManifestEntry(Constants.BUNDLE_VERSION, versionString);
+ archive.addManifestEntry(Constants.BUNDLE_MANIFESTVERSION, "2");
+ archive.addManifestEntry(Constants.BUNDLE_DESCRIPTION, project.getDescription());
+ // NB, no constant for this one
+ archive.addManifestEntry("Bundle-License", ((License) project.getLicenses().get(0)).getUrl());
+ archive.addManifestEntry(Constants.BUNDLE_DOCURL, project.getUrl());
+ archive.addManifestEntry(Constants.BUNDLE_SYMBOLICNAME, project.getGroupId() + "." + project.getArtifactId());
+ Reader in = new FileReader(configFile);
+ char[] buf = new char[1024];
+ try {
+ int i;
+ while ((i = in.read(buf)) > 0) {
+ imports.append(buf, 0, i);
+ }
+ } finally {
+ in.close();
}
- String requiredBundles = (String)instructions.get(Constants.REQUIRE_BUNDLE);
- if (requiredBundles != null) {
- requiredBundles = requiredBundles.replaceAll( "[\r\n]", "" );
- archive.addManifestEntry(Constants.REQUIRE_BUNDLE, requiredBundles);
+ // do we have any additional processing directives?
+ if (instructions != null) {
+ String explicitImports = (String) instructions.get(Constants.IMPORT_PACKAGE);
+ // if there is an Import-Package instructions, then add these imports to the
+ // list
+ if (explicitImports != null) {
+ // if specified on multiple lines, remove the line-ends.
+ explicitImports = explicitImports.replaceAll("[\r\n]", "");
+ imports.append(',');
+ imports.append(explicitImports);
+ }
+
+ String requiredBundles = (String) instructions.get(Constants.REQUIRE_BUNDLE);
+ if (requiredBundles != null) {
+ requiredBundles = requiredBundles.replaceAll("[\r\n]", "");
+ archive.addManifestEntry(Constants.REQUIRE_BUNDLE, requiredBundles);
+ }
}
- }
- String classpath = getBundleClassPath();
- if (classpath != null) {
- archive.addManifestEntry(Constants.BUNDLE_CLASSPATH, classpath);
+ archive.addManifestEntry(Constants.IMPORT_PACKAGE, imports.toString());
+ archive.addManifestEntry(Constants.DYNAMICIMPORT_PACKAGE, "*");
}
- archive.addManifestEntry(Constants.IMPORT_PACKAGE, imports.toString());
- archive.addManifestEntry(Constants.DYNAMICIMPORT_PACKAGE, "*");
}
archiver.createArchive(project, archive);
Modified: geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java (original)
+++ geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PlanProcessorMojo.java Tue Nov 24 23:16:13 2009
@@ -33,6 +33,7 @@
import org.apache.geronimo.kernel.repository.Artifact;
import org.apache.geronimo.kernel.repository.Environment;
import org.apache.geronimo.system.plugin.model.DependencyType;
+import org.apache.geronimo.system.osgi.BootActivator;
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
@@ -106,6 +107,12 @@
*/
protected File filteredPlanFile;
+ /**
+ * whether this is a boot bundle (starts kernel, and the config) or a normal plugin bundle.
+ * @parameter
+ */
+ private boolean boot;
+
public void execute() throws MojoExecutionException, MojoFailureException {
if (!sourceFile.exists()) {
@@ -171,6 +178,9 @@
Environment newEnvironment = new Environment();
newEnvironment.setConfigId(configId);
newEnvironment.setDependencies(dependencies);
+ if (boot) {
+ newEnvironment.setBundleActivator(BootActivator.class.getName());
+ }
EnvironmentBuilder.mergeEnvironments(oldEnvironment, newEnvironment);
EnvironmentType environmentType = EnvironmentBuilder.buildEnvironmentType(oldEnvironment);
Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java Tue Nov 24 23:16:13 2009
@@ -242,15 +242,6 @@
Artifact configID = getConfigID(module, idBuilder, plan, builder);
- // create the manifest
- Manifest manifest = createManifest(mainClass,
- mainGBean,
- mainMethod,
- manifestConfigurations,
- classPath,
- endorsedDirs,
- extensionDirs);
-
ConfigurationStore store = getConfigurationStore(targetConfigurationStore);
// It's our responsibility to close this context, once we're done with it...
@@ -260,6 +251,15 @@
context.addFile(PLAN_LOCATION, planFile);
}
// install the configuration
+ // create the manifest
+ Manifest manifest = createManifest(mainClass,
+ mainGBean,
+ mainMethod,
+ manifestConfigurations,
+ classPath,
+ endorsedDirs,
+ extensionDirs);
+
return install(targetFile, install, manifest, store, context);
} catch (Throwable e) {
//TODO not clear all errors will result in total cleanup
@@ -341,7 +341,7 @@
} catch (DeploymentException e) {
Configuration configuration = context.getConfiguration();
if (configuration != null) {
- ConfigurationData dumbConfigurationData = new ConfigurationData(null, null, null, null,
+ ConfigurationData dumbConfigurationData = new ConfigurationData(null, null, null,
configuration.getEnvironment(), context.getBaseDir(), null, context.getNaming());
configurationDatas.add(dumbConfigurationData);
}
Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeploymentContext.java Tue Nov 24 23:16:13 2009
@@ -50,19 +50,21 @@
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GReferenceInfo;
import org.apache.geronimo.gbean.ReferencePatterns;
+import org.apache.geronimo.gbean.GAttributeInfo;
import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
import org.apache.geronimo.kernel.GBeanNotFoundException;
import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.osgi.ConfigurationActivator;
import org.apache.geronimo.kernel.config.Configuration;
import org.apache.geronimo.kernel.config.ConfigurationData;
import org.apache.geronimo.kernel.config.ConfigurationManager;
import org.apache.geronimo.kernel.config.ConfigurationModuleType;
import org.apache.geronimo.kernel.config.NoSuchConfigException;
-import org.apache.geronimo.kernel.config.ConfigurationResolver;
+import org.apache.geronimo.kernel.config.Manifest;
+import org.apache.geronimo.kernel.config.ManifestException;
import org.apache.geronimo.kernel.repository.Artifact;
import org.apache.geronimo.kernel.repository.Environment;
import org.apache.geronimo.kernel.repository.Repository;
-import org.apache.geronimo.kernel.repository.ClassLoadingRules;
import org.apache.geronimo.kernel.repository.Dependency;
import org.apache.geronimo.system.plugin.model.PluginType;
import org.apache.geronimo.system.plugin.model.PluginArtifactType;
@@ -126,6 +128,8 @@
//this is the temporary bundle we set up for this deployment
private Bundle bundle;
private Configuration configuration;
+ //TODO OSGI set this
+ private boolean boot;
public DeploymentContext(File baseDir, File inPlaceConfigurationDir, Environment environment, AbstractName moduleName, ConfigurationModuleType moduleType, Naming naming, ConfigurationManager configurationManager, Collection<Repository> repositories, BundleContext bundleContext) throws DeploymentException {
@@ -177,7 +181,7 @@
private Configuration createTempConfiguration() throws DeploymentException {
LinkedHashSet<Artifact> resolvedParentIds = null;
try {
- ConfigurationData configurationData = new ConfigurationData(moduleType, classPath, null, childConfigurationDatas, environment, baseDir, inPlaceConfigurationDir, naming);
+ ConfigurationData configurationData = new ConfigurationData(moduleType, null, childConfigurationDatas, environment, baseDir, inPlaceConfigurationDir, naming);
// ConfigurationResolver configurationResolver = configurationManager.newConfigurationResolver(configurationData);
// List<URL> urls = new ArrayList<URL>();
// for (String path: classPath) {
@@ -237,11 +241,15 @@
private void createTempManifest() throws DeploymentException, IOException {
Manifest manifest = new Manifest();
- manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_MANIFESTVERSION, "2"));
- manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_SYMBOLICNAME, getBundleSymbolicName()));
- manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_VERSION, "0.0.0.0"));
- manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_CLASSPATH, getBundleClassPath()));
- manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.DYNAMICIMPORT_PACKAGE, "*"));
+ try {
+ manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_MANIFESTVERSION, "2"));
+ manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_SYMBOLICNAME, getBundleSymbolicName()));
+ manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_VERSION, "0.0.0.0"));
+ manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_CLASSPATH, getBundleClassPath()));
+ manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.DYNAMICIMPORT_PACKAGE, "*"));
+ } catch (ManifestException e) {
+ throw new DeploymentException(e);
+ }
File metaInf = new File(baseDir, "META-INF");
metaInf.mkdirs();
FileWriter fw = new FileWriter(new File(metaInf, "MANIFEST.MF"));
@@ -786,14 +794,21 @@
List<GBeanData> gbeans = new ArrayList<GBeanData>(configuration.getGBeans().values());
Collections.sort(gbeans, new GBeanData.PriorityComparator());
+ // TODO OSGI figure out exports
+ environment.addImportPackages(getImports(gbeans));
+ environment.addToBundleClassPath(classPath);
+ //TODO OSGI leave out if we use a extender mechanism
+ if (environment.getBundleActivator() == null) {
+ environment.setBundleActivator(ConfigurationActivator.class.getName());
+ }
ConfigurationData configurationData = new ConfigurationData(configuration.getModuleType(),
- classPath,
gbeans,
childConfigurationDatas,
configuration.getEnvironment(),
baseDir,
inPlaceConfigurationDir,
- naming);
+ naming
+ );
for (ConfigurationData ownedConfiguration : additionalDeployment) {
configurationData.addOwnedConfigurations(ownedConfiguration.getId());
@@ -802,6 +817,37 @@
return configurationData;
}
+ public static LinkedHashSet<String> getImports(List<GBeanData> gbeans) {
+ LinkedHashSet<String> imports = new LinkedHashSet<String>();
+ for (GBeanData data: gbeans) {
+ GBeanInfo info = data.getGBeanInfo();
+ addImport(imports, info.getClassName());
+ for (GAttributeInfo attInfo: info.getAttributes()) {
+ addImport(imports, attInfo.getType());
+ }
+ for (GReferenceInfo refInfo: info.getReferences()) {
+ addImport(imports, refInfo.getReferenceType());
+ }
+ }
+ return imports;
+ }
+
+ private static void addImport(LinkedHashSet<String> imports, String className) {
+ int pos = className.lastIndexOf('.');
+ if (pos < 0 ) return;
+ int count = 0;
+ while (className.charAt(count) == '[') {
+ count++;
+ }
+ if (className.charAt(count) == 'L') {
+ count++;
+ }
+ className = className.substring(count, pos);
+ if (className.startsWith("java.")) return;
+ imports.add(className);
+ }
+
+
public void addAdditionalDeployment(ConfigurationData configurationData) {
additionalDeployment.add(configurationData);
}
Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.java?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.java Tue Nov 24 23:16:13 2009
@@ -19,7 +19,6 @@
import java.io.File;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
@@ -59,7 +58,7 @@
/**
* List of URIs in this configuration's classpath. These are for the classes directly included in the configuration
*/
- private final LinkedHashSet<String> classPath = new LinkedHashSet<String>();
+// private final LinkedHashSet<String> classPath = new LinkedHashSet<String>();
/**
* The gbeans contained in this configuration
@@ -100,9 +99,9 @@
* The configuration store from which this configuration was loaded, or null if it was not loaded from a configuration store.
*/
private transient ConfigurationStore configurationStore;
-
+
/**
- * A transformer to transform the GBeans of this configuration.
+ * A transformer to transform the GBeans of this configuration.
*/
private transient ConfigurationDataTransformer configurationDataTransformer;
@@ -129,27 +128,31 @@
}
public ConfigurationData(Environment environment, Naming naming) {
- this(null, null, null, null, environment, null, null, naming);
+ this(null, null, null, environment, null, null, naming);
}
- public ConfigurationData(ConfigurationModuleType moduleType, LinkedHashSet<String> classPath, List<GBeanData> gbeans, Map<String, ConfigurationData> childConfigurations, Environment environment, File configurationDir, File inPlaceConfigurationDir, Naming naming) {
+ public ConfigurationData(ConfigurationModuleType moduleType,
+ List<GBeanData> gbeans,
+ Map<String, ConfigurationData> childConfigurations,
+ Environment environment,
+ File configurationDir,
+ File inPlaceConfigurationDir,
+ Naming naming
+ ) {
if (naming == null) throw new NullPointerException("naming is null");
+ if (environment == null) throw new NullPointerException("environment is null");
+ if (environment.getConfigId() == null) throw new NullPointerException("environment.configId is null");
this.naming = naming;
if (moduleType != null) {
this.moduleType = moduleType;
} else {
this.moduleType = ConfigurationModuleType.CAR;
}
- if (classPath != null) {
- this.classPath.addAll(classPath);
- }
gbeanState = ConfigurationUtil.newGBeanState(gbeans);
if (childConfigurations != null) {
this.childConfigurations.putAll(childConfigurations);
}
- if (environment == null) throw new NullPointerException("environment is null");
- if (environment.getConfigId() == null) throw new NullPointerException("environment.configId is null");
this.environment = environment;
this.configurationDir = configurationDir;
this.inPlaceConfigurationDir = inPlaceConfigurationDir;
@@ -172,8 +175,8 @@
return moduleType;
}
- public List<String> getClassPath() {
- return Collections.unmodifiableList(new ArrayList<String>(classPath));
+ public Manifest getManifest() throws ManifestException {
+ return environment.getManifest();
}
public List<GBeanData> getGBeans(Bundle bundle) throws InvalidConfigException {
@@ -197,7 +200,7 @@
if (gbeanInfo == null) throw new NullPointerException("gbeanInfo is null");
return gbeanState.addGBean(name, gbeanInfo, naming, environment);
}
-
+
public GBeanData addGBean(String name, Class gbeanClass) {
if (name == null) throw new NullPointerException("name is null");
if (gbeanClass == null) throw new NullPointerException("gbeanInfo is null");
@@ -223,6 +226,7 @@
* Gets a map of module name to ConfigurationData for nested
* configurations (as in, a WAR within an EAR, not dependencies between
* totally separate configurations).
+ *
* @return map of child configuration name to ConfigurationData for that child
*/
public Map<String, ConfigurationData> getChildConfigurations() {
@@ -291,7 +295,7 @@
if (configurationStore == null) throw new NullPointerException("configurationStore is null");
this.configurationStore = configurationStore;
}
-
+
public ConfigurationDataTransformer getConfigurationDataTransformer() {
return configurationDataTransformer;
}
Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java Tue Nov 24 23:16:13 2009
@@ -406,6 +406,8 @@
// If the GBean has a configurationBaseUrl attribute, set it
// todo Even though this is not used by the classloader, web apps and persistence units still need this. WHY???
+ //this doesn't work in osgi
+ /*
GAttributeInfo attribute = gbeanData.getGBeanInfo().getAttribute("configurationBaseUrl");
if (attribute != null && attribute.getType().equals("java.net.URL")) {
try {
@@ -419,7 +421,7 @@
throw new InvalidConfigException("Unable to set attribute named " + "configurationBaseUrl" + " in gbean " + gbeanData.getAbstractName(), e);
}
}
-
+ */
// add a dependency from the gbean to the configuration
gbeanData.addDependency(configurationName);
}
Copied: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Manifest.java (from r882817, geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Manifest.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Manifest.java?p2=geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Manifest.java&p1=geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Manifest.java&r1=882817&r2=883920&rev=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Manifest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Manifest.java Tue Nov 24 23:16:13 2009
@@ -16,7 +16,7 @@
*
*/
-package org.apache.geronimo.deployment;
+package org.apache.geronimo.kernel.config;
import java.io.BufferedReader;
import java.io.IOException;
@@ -26,11 +26,12 @@
import java.io.Reader;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.apache.geronimo.common.DeploymentException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Collection;
/**
* From ant
@@ -50,7 +51,10 @@
*
* @since Ant 1.4
*/
-public class Manifest {
+public class Manifest implements Serializable {
+
+ private static final long serialVersionUID = -5817029148927697002L;
+
/** The standard manifest version header */
public static final String ATTRIBUTE_MANIFEST_VERSION
= "Manifest-Version";
@@ -93,7 +97,21 @@
* An attribute for the manifest.
* Those attributes that are not nested into a section will be added to the "Main" section.
*/
- public static class Attribute {
+ public static class Attribute implements Serializable {
+ private static final long serialVersionUID = 4262047715108012993L;
+
+ public enum Separator {
+ SPACE(" "), COMMA(",");
+ private final String separator;
+
+ Separator(String separator) {
+ this.separator = separator;
+ }
+
+ String getSeparator() {
+ return separator;
+ }
+ }
/**
* Maximum length of the name to have the value starting on the same
@@ -112,11 +130,13 @@
*/
private static final int MAX_NAME_LENGTH = 70;
+ private final Separator separator;
+
/** The attribute's name */
private String name = null;
/** The attribute's value */
- private Vector values = new Vector();
+ private List<String> values = new ArrayList<String>();
/**
* For multivalued attributes, this is the index of the attribute
@@ -127,6 +147,11 @@
/**
* Construct an empty attribute */
public Attribute() {
+ separator = Separator.SPACE;
+ }
+
+ public Attribute(Separator separator) {
+ this.separator = separator;
}
/**
@@ -137,6 +162,7 @@
* @throws ManifestException if the line is not valid
*/
public Attribute(String line) throws ManifestException {
+ separator = Separator.SPACE;
parse(line);
}
@@ -147,10 +173,26 @@
* @param value the Attribute's value
*/
public Attribute(String name, String value) {
+ separator = Separator.SPACE;
+ this.name = name;
+ setValue(value);
+ }
+
+ public Attribute(Separator separator, String name, String value) {
+ this.separator = separator;
this.name = name;
setValue(value);
}
+ public Attribute(Separator separator, String name, Collection<String> values) {
+ this.separator = separator;
+ this.name = name;
+ if (values != null) {
+ this.values.addAll(values);
+ currentIndex = this.values.size() - 1;
+ }
+ }
+
/**
* @see java.lang.Object#hashCode
* @return a hashcode based on the key and values.
@@ -247,10 +289,10 @@
*/
public void setValue(String value) {
if (currentIndex >= values.size()) {
- values.addElement(value);
+ values.add(value);
currentIndex = values.size() - 1;
} else {
- values.setElementAt(value, currentIndex);
+ values.set(currentIndex, value);
}
}
@@ -264,12 +306,11 @@
return null;
}
- String fullValue = "";
- for (Enumeration e = getValues(); e.hasMoreElements();) {
- String value = (String) e.nextElement();
- fullValue += value + " ";
+ StringBuilder fullValue = new StringBuilder();
+ for (String value: values) {
+ fullValue.append(value).append(separator.getSeparator());
}
- return fullValue.trim();
+ return fullValue.substring(0, fullValue.length() - 1);
}
/**
@@ -287,8 +328,8 @@
*
* @return an enumeration of the attributes values
*/
- public Enumeration getValues() {
- return values.elements();
+ public List<String> getValues() {
+ return Collections.unmodifiableList(values);
}
/**
@@ -301,7 +342,7 @@
* @param line the continuation line.
*/
public void addContinuation(String line) {
- String currentValue = (String) values.elementAt(currentIndex);
+ String currentValue = values.get(currentIndex);
setValue(currentValue + line.substring(1));
}
@@ -313,9 +354,10 @@
* @throws IOException if the attribute value cannot be written
*/
public void write(PrintWriter writer) throws IOException {
- for (Enumeration e = getValues(); e.hasMoreElements();) {
- writeValue(writer, (String) e.nextElement());
- }
+ writeValue(writer, getValue());
+// for (String value: values) {
+// writeValue(writer, value);
+// }
}
/**
@@ -328,7 +370,7 @@
*/
private void writeValue(PrintWriter writer, String value)
throws IOException {
- String line = null;
+ String line;
int nameLength = name.getBytes(JAR_ENCODING).length;
if (nameLength > MAX_NAME_VALUE_LENGTH) {
if (nameLength > MAX_NAME_LENGTH) {
@@ -368,9 +410,10 @@
* A section consists of a set of attribute values,
* separated from other sections by a blank line.
*/
- public static class Section {
+ public static class Section implements Serializable {
+ private static final long serialVersionUID = -5947453150897530506L;
/** Warnings for this section */
- private Vector warnings = new Vector();
+ private List<String> warnings = new ArrayList<String>();
/**
* The section's name if any. The main section in a
@@ -379,10 +422,7 @@
private String name = null;
/** The section's attributes.*/
- private Hashtable attributes = new Hashtable();
-
- /** Index used to retain the attribute ordering */
- private Vector attributeIndex = new Vector();
+ private LinkedHashMap<String, Attribute> attributes = new LinkedHashMap<String, Attribute>();
/**
* The name of the section; optional -default is the main section.
@@ -415,7 +455,7 @@
* @throws IOException if the section cannot be read from the reader.
*/
public String read(BufferedReader reader)
- throws ManifestException, IOException, DeploymentException {
+ throws ManifestException, IOException {
Attribute attribute = null;
while (true) {
String line = reader.readLine();
@@ -464,19 +504,15 @@
+ "with different names");
}
- Enumeration e = section.getAttributeKeys();
Attribute classpathAttribute = null;
- while (e.hasMoreElements()) {
- String attributeName = (String) e.nextElement();
+ for (String attributeName: section.getAttributeKeys()) {
Attribute attribute = section.getAttribute(attributeName);
if (attributeName.equalsIgnoreCase(ATTRIBUTE_CLASSPATH)) {
if (classpathAttribute == null) {
classpathAttribute = new Attribute();
classpathAttribute.setName(ATTRIBUTE_CLASSPATH);
}
- Enumeration cpe = attribute.getValues();
- while (cpe.hasMoreElements()) {
- String value = (String) cpe.nextElement();
+ for (String value: attribute.getValues()) {
classpathAttribute.addValue(value);
}
} else {
@@ -491,10 +527,7 @@
}
// add in the warnings
- Enumeration warnEnum = section.warnings.elements();
- while (warnEnum.hasMoreElements()) {
- warnings.addElement(warnEnum.nextElement());
- }
+ warnings.addAll(section.warnings);
}
/**
@@ -509,10 +542,8 @@
Attribute nameAttr = new Attribute(ATTRIBUTE_NAME, name);
nameAttr.write(writer);
}
- Enumeration e = getAttributeKeys();
- while (e.hasMoreElements()) {
- String key = (String) e.nextElement();
- Attribute attribute = getAttribute(key);
+ for (String attributeName: getAttributeKeys()) {
+ Attribute attribute = getAttribute(attributeName);
attribute.write(writer);
}
writer.print(EOL);
@@ -527,7 +558,7 @@
* instances.
*/
public Attribute getAttribute(String attributeName) {
- return (Attribute) attributes.get(attributeName.toLowerCase());
+ return attributes.get(attributeName.toLowerCase());
}
/**
@@ -536,8 +567,8 @@
* @return an Enumeration of Strings, each string being the lower case
* key of an attribute of the section.
*/
- public Enumeration getAttributeKeys() {
- return attributeIndex.elements();
+ public List<String> getAttributeKeys() {
+ return new ArrayList<String>(attributes.keySet());
}
/**
@@ -564,7 +595,6 @@
public void removeAttribute(String attributeName) {
String key = attributeName.toLowerCase();
attributes.remove(key);
- attributeIndex.removeElement(key);
}
/**
@@ -575,10 +605,10 @@
* @exception ManifestException if the attribute is not valid.
*/
public void addConfiguredAttribute(Attribute attribute)
- throws ManifestException, DeploymentException {
+ throws ManifestException {
String check = addAttributeAndCheck(attribute);
if (check != null) {
- throw new DeploymentException("Specify the section name using "
+ throw new ManifestException("Specify the section name using "
+ "the \"name\" attribute of the <section> element rather "
+ "than using a \"Name\" manifest attribute");
}
@@ -596,12 +626,12 @@
* exists in this section.
*/
public String addAttributeAndCheck(Attribute attribute)
- throws ManifestException, DeploymentException {
+ throws ManifestException {
if (attribute.getName() == null || attribute.getValue() == null) {
- throw new DeploymentException("Attributes must have name and value");
+ throw new ManifestException("Attributes must have name and value");
}
if (attribute.getKey().equalsIgnoreCase(ATTRIBUTE_NAME)) {
- warnings.addElement("\"" + ATTRIBUTE_NAME + "\" attributes "
+ warnings.add("\"" + ATTRIBUTE_NAME + "\" attributes "
+ "should not occur in the main section and must be the "
+ "first element in all other sections: \""
+ attribute.getName() + ": " + attribute.getValue() + "\"");
@@ -609,25 +639,22 @@
}
if (attribute.getKey().startsWith(ATTRIBUTE_FROM.toLowerCase())) {
- warnings.addElement(ERROR_FROM_FORBIDDEN
+ warnings.add(ERROR_FROM_FORBIDDEN
+ attribute.getName() + ": " + attribute.getValue() + "\"");
} else {
// classpath attributes go into a vector
String attributeKey = attribute.getKey();
if (attributeKey.equalsIgnoreCase(ATTRIBUTE_CLASSPATH)) {
- Attribute classpathAttribute =
- (Attribute) attributes.get(attributeKey);
+ Attribute classpathAttribute = attributes.get(attributeKey);
if (classpathAttribute == null) {
storeAttribute(attribute);
} else {
- warnings.addElement("Multiple Class-Path attributes "
+ warnings.add("Multiple Class-Path attributes "
+ "are supported but violate the Jar "
+ "specification and may not be correctly "
+ "processed in all environments");
- Enumeration e = attribute.getValues();
- while (e.hasMoreElements()) {
- String value = (String) e.nextElement();
+ for (String value: attribute.getValues()) {
classpathAttribute.addValue(value);
}
}
@@ -651,10 +678,8 @@
public Object clone() {
Section cloned = new Section();
cloned.setName(name);
- Enumeration e = getAttributeKeys();
- while (e.hasMoreElements()) {
- String key = (String) e.nextElement();
- Attribute attribute = getAttribute(key);
+ for (String attributeName: getAttributeKeys()) {
+ Attribute attribute = getAttribute(attributeName);
cloned.storeAttribute(new Attribute(attribute.getName(),
attribute.getValue()));
}
@@ -672,9 +697,6 @@
}
String attributeKey = attribute.getKey();
attributes.put(attributeKey, attribute);
- if (!attributeIndex.contains(attributeKey)) {
- attributeIndex.addElement(attributeKey);
- }
}
/**
@@ -682,8 +704,8 @@
*
* @return an Enumeration of warning strings.
*/
- public Enumeration getWarnings() {
- return warnings.elements();
+ public List<String> getWarnings() {
+ return warnings;
}
/**
@@ -722,26 +744,23 @@
private Section mainSection = new Section();
/** The named sections of this manifest */
- private Hashtable sections = new Hashtable();
-
- /** Index of sections - used to retain order of sections in manifest */
- private Vector sectionIndex = new Vector();
+ private LinkedHashMap<String, Section> sections = new LinkedHashMap<String, Section>();
/**
* Construct a manifest from Ant's default manifest file.
*
* @return the default manifest.
- * @exception DeploymentException if there is a problem loading the
+ * @exception ManifestException if there is a problem loading the
* default manifest
*/
- public static Manifest getDefaultManifest() throws DeploymentException {
+ public static Manifest getDefaultManifest() throws ManifestException {
InputStream in = null;
InputStreamReader insr = null;
try {
String defManifest = "/org/apache/tools/ant/defaultManifest.mf";
in = Manifest.class.getResourceAsStream(defManifest);
if (in == null) {
- throw new DeploymentException("Could not find default manifest: "
+ throw new ManifestException("Could not find default manifest: "
+ defManifest);
}
try {
@@ -756,10 +775,8 @@
insr = new InputStreamReader(in);
return new Manifest(insr);
}
- } catch (ManifestException e) {
- throw new DeploymentException("Default manifest is invalid !!", e);
} catch (IOException e) {
- throw new DeploymentException("Unable to read default manifest", e);
+ throw new ManifestException("Unable to read default manifest", e);
} finally {
close(insr);
close(in);
@@ -800,7 +817,7 @@
* to the JAR spec
* @throws IOException if the manifest cannot be read from the reader.
*/
- public Manifest(Reader r) throws ManifestException, IOException, DeploymentException {
+ public Manifest(Reader r) throws ManifestException, IOException {
BufferedReader reader = new BufferedReader(r);
// This should be the manifest version
String nextSectionName = mainSection.read(reader);
@@ -811,7 +828,7 @@
mainSection.removeAttribute(ATTRIBUTE_MANIFEST_VERSION);
}
- String line = null;
+ String line;
while ((line = reader.readLine()) != null) {
if (line.length() == 0) {
continue;
@@ -849,15 +866,12 @@
* @exception ManifestException if the secti0on is not valid.
*/
public void addConfiguredSection(Section section)
- throws ManifestException, DeploymentException {
+ throws ManifestException {
String sectionName = section.getName();
if (sectionName == null) {
- throw new DeploymentException("Sections must have a name");
+ throw new ManifestException("Sections must have a name");
}
sections.put(sectionName, section);
- if (!sectionIndex.contains(sectionName)) {
- sectionIndex.addElement(sectionName);
- }
}
/**
@@ -868,9 +882,9 @@
* @exception ManifestException if the attribute is not valid.
*/
public void addConfiguredAttribute(Attribute attribute)
- throws ManifestException, DeploymentException {
+ throws ManifestException {
if (attribute.getKey() == null || attribute.getValue() == null) {
- throw new DeploymentException("Attributes must have name and value");
+ throw new ManifestException("Attributes must have name and value");
}
if (attribute.getKey().equalsIgnoreCase(ATTRIBUTE_MANIFEST_VERSION)) {
manifestVersion = attribute.getValue();
@@ -887,7 +901,7 @@
* @throws ManifestException if there is a problem merging the
* manifest according to the Manifest spec.
*/
- public void merge(Manifest other) throws ManifestException, DeploymentException {
+ public void merge(Manifest other) throws ManifestException {
merge(other, false);
}
@@ -902,7 +916,7 @@
* manifest according to the Manifest spec.
*/
public void merge(Manifest other, boolean overwriteMain)
- throws ManifestException, DeploymentException {
+ throws ManifestException {
if (other != null) {
if (overwriteMain) {
mainSection = (Section) other.mainSection.clone();
@@ -914,16 +928,11 @@
manifestVersion = other.manifestVersion;
}
- Enumeration e = other.getSectionNames();
- while (e.hasMoreElements()) {
- String sectionName = (String) e.nextElement();
- Section ourSection = (Section) sections.get(sectionName);
- Section otherSection
- = (Section) other.sections.get(sectionName);
+ for (Section otherSection: other.sections.values()) {
+ String sectionName = otherSection.getName();
+ Section ourSection = sections.get(sectionName);
if (ourSection == null) {
- if (otherSection != null) {
- addConfiguredSection((Section) otherSection.clone());
- }
+ addConfiguredSection((Section) otherSection.clone());
} else {
ourSection.merge(otherSection);
}
@@ -938,7 +947,7 @@
*
* @throws IOException if the manifest cannot be written
*/
- public void write(PrintWriter writer) throws IOException, DeploymentException {
+ public void write(PrintWriter writer) throws IOException {
writer.print(ATTRIBUTE_MANIFEST_VERSION + ": " + manifestVersion + EOL);
String signatureVersion
= mainSection.getAttributeValue(ATTRIBUTE_SIGNATURE_VERSION);
@@ -960,10 +969,7 @@
}
}
- Enumeration e = sectionIndex.elements();
- while (e.hasMoreElements()) {
- String sectionName = (String) e.nextElement();
- Section section = getSection(sectionName);
+ for (Section section: sections.values()) {
section.write(writer);
}
}
@@ -980,8 +986,6 @@
write(new PrintWriter(sw));
} catch (IOException e) {
return null;
- } catch (DeploymentException e) {
- return null;
}
return sw.toString();
}
@@ -991,25 +995,14 @@
*
* @return an enumeration of warning strings
*/
- public Enumeration getWarnings() {
- Vector warnings = new Vector();
-
- Enumeration warnEnum = mainSection.getWarnings();
- while (warnEnum.hasMoreElements()) {
- warnings.addElement(warnEnum.nextElement());
- }
+ public List<String> getWarnings() {
+ List<String> warnings = new ArrayList<String>(mainSection.getWarnings());
// create a vector and add in the warnings for all the sections
- Enumeration e = sections.elements();
- while (e.hasMoreElements()) {
- Section section = (Section) e.nextElement();
- Enumeration e2 = section.getWarnings();
- while (e2.hasMoreElements()) {
- warnings.addElement(e2.nextElement());
- }
+ for (Section section: sections.values()) {
+ warnings.addAll(section.getWarnings());
}
-
- return warnings.elements();
+ return warnings;
}
/**
@@ -1084,7 +1077,7 @@
* does not exist in the manifest
*/
public Section getSection(String name) {
- return (Section) sections.get(name);
+ return sections.get(name);
}
/**
@@ -1092,7 +1085,7 @@
*
* @return an Enumeration of section names
*/
- public Enumeration getSectionNames() {
- return sectionIndex.elements();
+ public List<String> getSectionNames() {
+ return new ArrayList<String>(sections.keySet());
}
}
Propchange: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Manifest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/Manifest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Copied: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ManifestException.java (from r882817, geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ManifestException.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ManifestException.java?p2=geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ManifestException.java&p1=geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ManifestException.java&r1=882817&r2=883920&rev=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ManifestException.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ManifestException.java Tue Nov 24 23:16:13 2009
@@ -15,9 +15,8 @@
* limitations under the License.
*
*/
-package org.apache.geronimo.deployment;
+package org.apache.geronimo.kernel.config;
-import org.apache.geronimo.common.DeploymentException;
/**
*
@@ -26,7 +25,7 @@
*
* @since Ant 1.4
*/
-public class ManifestException extends DeploymentException {
+public class ManifestException extends InvalidConfigException {
private static final long serialVersionUID = 7685634200457515207L;
@@ -37,4 +36,12 @@
public ManifestException(String msg) {
super(msg);
}
+
+ public ManifestException(Throwable cause) {
+ super(cause);
+ }
+
+ public ManifestException(String message, Throwable cause) {
+ super(message, cause);
+ }
}
Propchange: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ManifestException.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ManifestException.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java Tue Nov 24 23:16:13 2009
@@ -21,10 +21,13 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
-import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
+import org.apache.geronimo.kernel.config.Manifest;
+import org.apache.geronimo.kernel.config.ManifestException;
+import org.osgi.framework.Constants;
+
/**
* holds the data from the EnvironmentType xml while it is being resolved, transitively closed, etc.
*
@@ -34,7 +37,11 @@
private static final long serialVersionUID = 7075760873629376317L;
private Artifact configId;
- private final LinkedHashSet dependencies = new LinkedHashSet();
+ private final LinkedHashSet<Dependency> dependencies = new LinkedHashSet<Dependency>();
+ private final LinkedHashSet<String> bundleClassPath = new LinkedHashSet<String>();
+ private final LinkedHashSet<String> imports = new LinkedHashSet<String>();
+ private final LinkedHashSet<String> exports = new LinkedHashSet<String>();
+ private String bundleActivator;
private final ClassLoadingRules classLoadingRules;
private boolean suppressDefaultEnvironment;
@@ -51,6 +58,10 @@
public Environment(Environment environment) {
configId = environment.getConfigId();
dependencies.addAll(environment.dependencies);
+ bundleClassPath.addAll(environment.bundleClassPath);
+ imports.addAll(environment.imports);
+ exports.addAll(environment.exports);
+ bundleActivator = environment.bundleActivator;
suppressDefaultEnvironment = environment.isSuppressDefaultEnvironment();
classLoadingRules = environment.classLoadingRules;
}
@@ -67,6 +78,7 @@
* Gets a List (with elements of type Dependency) of the configuration and
* JAR dependencies of this configuration.
*
+ * @return immutable copy of the current dependencies
* @see Dependency
*/
public List<Dependency> getDependencies() {
@@ -81,15 +93,11 @@
this.dependencies.add(dependency);
}
- public void addDependencies(Collection dependencies) {
- for (Iterator iterator = dependencies.iterator(); iterator.hasNext();) {
- // make sure they are all dependency objects... generics would be sooooo nice
- Dependency dependency = (Dependency) iterator.next();
- addDependency(dependency);
- }
+ public void addDependencies(Collection<Dependency> dependencies) {
+ this.dependencies.addAll(dependencies);
}
- public void setDependencies(Collection dependencies) {
+ public void setDependencies(Collection<Dependency> dependencies) {
this.dependencies.clear();
addDependencies(dependencies);
}
@@ -106,4 +114,78 @@
this.suppressDefaultEnvironment = suppressDefaultEnvironment;
}
+ public void addToBundleClassPath(Collection<String> bundleClassPath) {
+ this.bundleClassPath.addAll(bundleClassPath);
+ }
+
+ public void addToBundleClassPath(String bundleClassPath) {
+ this.bundleClassPath.add(bundleClassPath);
+ }
+
+ public List<String> getBundleClassPath() {
+ return Collections.unmodifiableList(new ArrayList<String>(bundleClassPath));
+ }
+
+ public void addImportPackages(Collection<String> imports) {
+ this.imports.addAll(imports);
+ }
+
+ public void addImportPackage(String imports) {
+ this.imports.add(imports);
+ }
+
+ public List<String> getImportPackages() {
+ return Collections.unmodifiableList(new ArrayList<String>(imports));
+ }
+
+ public void addExportPackages(Collection<String> exports) {
+ this.exports.addAll(exports);
+ }
+
+ public void addExportPackage(String exports) {
+ this.exports.add(exports);
+ }
+
+ public List<String> getExportPackages() {
+ return Collections.unmodifiableList(new ArrayList<String>(exports));
+ }
+
+ public String getBundleActivator() {
+ return bundleActivator;
+ }
+
+ public void setBundleActivator(String bundleActivator) {
+ this.bundleActivator = bundleActivator;
+ }
+
+ public Manifest getManifest() throws ManifestException {
+ Manifest manifest = new Manifest();
+ manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_MANIFESTVERSION, "2"));
+ manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_SYMBOLICNAME, configId.getGroupId() + "." + configId.getArtifactId()));
+ String versionString = "" + configId.getVersion().getMajorVersion() + "." + configId.getVersion().getMinorVersion() + "." + configId.getVersion().getIncrementalVersion();
+ if (configId.getVersion().getQualifier() != null) {
+ versionString += "." + configId.getVersion().getQualifier();
+ }
+ manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_VERSION, versionString));
+
+ if (bundleActivator != null) {
+ manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_ACTIVATOR, bundleActivator));
+// imports.add("org.apache.geronimo.system.osgi");
+ }
+
+ if (!imports.isEmpty()) {
+ manifest.addConfiguredAttribute(new Manifest.Attribute(Manifest.Attribute.Separator.COMMA, Constants.IMPORT_PACKAGE, imports));
+ }
+ if (!exports.isEmpty()) {
+ manifest.addConfiguredAttribute(new Manifest.Attribute(Manifest.Attribute.Separator.COMMA, Constants.EXPORT_PACKAGE, exports));
+ }
+ manifest.addConfiguredAttribute(new Manifest.Attribute(Manifest.Attribute.Separator.COMMA, Constants.DYNAMICIMPORT_PACKAGE, "*"));
+
+ if (!bundleClassPath.isEmpty()) {
+ Manifest.Attribute bundleClassPath = new Manifest.Attribute(Manifest.Attribute.Separator.COMMA, Constants.BUNDLE_CLASSPATH, this.bundleClassPath);
+ manifest.addConfiguredAttribute(bundleClassPath);
+ }
+ return manifest;
+ }
+
}
Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java Tue Nov 24 23:16:13 2009
@@ -66,6 +66,17 @@
LinkedHashSet dependencies = toDependencies(dependencyArray);
environment.setDependencies(dependencies);
}
+ if (environmentType.isSetBundleActivator()) {
+ environment.setBundleActivator(trim(environmentType.getBundleActivator()));
+ }
+ for (String importPackage: environmentType.getImportPackageArray()) {
+ environment.addImportPackage(trim(importPackage));
+ }
+ for (String exportPackage: environmentType.getExportPackageArray()) {
+ environment.addExportPackage(trim(exportPackage));
+ }
+
+
environment.setSuppressDefaultEnvironment(environmentType.isSetSuppressDefaultEnvironment());
ClassLoadingRulesUtil.configureRules(environment.getClassLoadingRules(), environmentType);
@@ -81,6 +92,13 @@
environment.setConfigId(additionalEnvironment.getConfigId());
}
environment.addDependencies(additionalEnvironment.getDependencies());
+ environment.addToBundleClassPath(additionalEnvironment.getBundleClassPath());
+ environment.addImportPackages(additionalEnvironment.getImportPackages());
+ environment.addExportPackages(additionalEnvironment.getExportPackages());
+ if (environment.getBundleActivator() == null && additionalEnvironment.getBundleActivator() != null) {
+ environment.setBundleActivator(additionalEnvironment.getBundleActivator());
+ }
+
environment.setSuppressDefaultEnvironment(environment.isSuppressDefaultEnvironment() || additionalEnvironment.isSuppressDefaultEnvironment());
ClassLoadingRules classLoadingRules = environment.getClassLoadingRules();
@@ -104,11 +122,24 @@
environmentType.setModuleId(configId);
}
- List dependencies = toDependencyTypes(environment.getDependencies());
- DependencyType[] dependencyTypes = (DependencyType[]) dependencies.toArray(new DependencyType[dependencies.size()]);
+ List<DependencyType> dependencies = toDependencyTypes(environment.getDependencies());
+ DependencyType[] dependencyTypes = dependencies.toArray(new DependencyType[dependencies.size()]);
DependenciesType dependenciesType = environmentType.addNewDependencies();
dependenciesType.setDependencyArray(dependencyTypes);
+ if (environment.getBundleActivator() != null) {
+ environmentType.setBundleActivator(environment.getBundleActivator());
+ }
+ for (String bundleClassPath: environment.getBundleClassPath()) {
+ environmentType.addBundleClassPath(bundleClassPath);
+ }
+ for (String importPackage: environment.getImportPackages()) {
+ environmentType.addImportPackage(importPackage);
+ }
+ for (String exportPackage: environment.getExportPackages()) {
+ environmentType.addExportPackage(exportPackage);
+ }
+
ClassLoadingRules classLoadingRules = environment.getClassLoadingRules();
if (classLoadingRules.isInverseClassLoading()) {
environmentType.addNewInverseClassloading();
@@ -137,11 +168,11 @@
return classFilter;
}
- private static List toDependencyTypes(Collection artifacts) {
- List dependencies = new ArrayList();
+ private static List<DependencyType> toDependencyTypes(Collection artifacts) {
+ List<DependencyType> dependencies = new ArrayList<DependencyType>();
for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
Dependency dependency = (Dependency) iterator.next();
- ArtifactType artifactType = toDependencyType(dependency);
+ DependencyType artifactType = toDependencyType(dependency);
dependencies.add(artifactType);
}
return dependencies;
@@ -205,8 +236,8 @@
return artifacts;
}
- private static LinkedHashSet toDependencies(DependencyType[] dependencyArray) {
- LinkedHashSet dependencies = new LinkedHashSet();
+ private static LinkedHashSet<Dependency> toDependencies(DependencyType[] dependencyArray) {
+ LinkedHashSet<Dependency> dependencies = new LinkedHashSet<Dependency>();
for (int i = 0; i < dependencyArray.length; i++) {
DependencyType artifactType = dependencyArray[i];
Dependency dependency = toDependency(artifactType);
Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/xsd/geronimo-module-1.2.xsd
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/xsd/geronimo-module-1.2.xsd?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/xsd/geronimo-module-1.2.xsd (original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/xsd/geronimo-module-1.2.xsd Tue Nov 24 23:16:13 2009
@@ -160,6 +160,11 @@
</xs:documentation>
</xs:annotation>
</xs:element>
+ <xs:element name="bundle-activator" type="xs:string" minOccurs="0"/>
+ <xs:element name="bundle-classPath" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="import-package" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="export-package" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+
<xs:element name="hidden-classes" type="sys:classFilterType"
minOccurs="0">
<xs:annotation>
Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java Tue Nov 24 23:16:13 2009
@@ -41,6 +41,7 @@
import org.apache.geronimo.kernel.config.ConfigurationData;
import org.apache.geronimo.kernel.config.ConfigurationUtil;
import org.apache.geronimo.kernel.config.InvalidConfigException;
+import org.apache.geronimo.kernel.config.ManifestException;
import org.apache.geronimo.gbean.GBeanData;
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GAttributeInfo;
@@ -53,11 +54,11 @@
private static final String META_INF = "META-INF";
private static final String CONFIG_SER = "config.ser";
private static final String CONFIG_INFO = "config.info";
- //hopefully temporary hack
- private static final String IMPORT_PACKAGES = "imports.txt";
+
+ private static final String MANIFEST_MF = "MANIFEST.MF";
+ private static final String META_INF_MANIFEST = META_INF + "/" + MANIFEST_MF;
private static final String META_INF_STARTUP_JAR = META_INF + "/startup-jar";
private static final String META_INF_CONFIG_SER = META_INF + "/" + CONFIG_SER;
- private static final String META_INF_IMPORT_PACKAGES = META_INF + "/" + IMPORT_PACKAGES;
private static final String META_INF_CONFIG_SER_SHA1 = META_INF_CONFIG_SER + ".sha1";
private static final String META_INF_CONFIG_INFO = META_INF + "/" + CONFIG_INFO;
@@ -123,18 +124,16 @@
}
public static void writeConfiguration(ConfigurationData configurationData, JarOutputStream out) throws IOException {
- out.putNextEntry(new ZipEntry(META_INF_IMPORT_PACKAGES));
+ out.putNextEntry(new ZipEntry(META_INF_MANIFEST));
try {
- OutputStreamWriter writer = new OutputStreamWriter(out);
- List<GBeanData> gbeans = configurationData.getGbeanState().getGBeans(null);
- String imports = getImportString(gbeans);
- writer.append(imports);
- } catch (InvalidConfigException e) {
- throw (IOException)new IOException("Could not get gbean datas").initCause(e);
+ PrintWriter writer = new PrintWriter(new OutputStreamWriter(out));
+ configurationData.getManifest().write(writer);
+ writer.flush();
+ } catch (ManifestException e) {
+ throw new IOException("Could not write manifest", e);
} finally {
out.closeEntry();
}
-
// save the persisted form in the source directory
out.putNextEntry(new ZipEntry(META_INF_CONFIG_SER));
ConfigurationStoreUtil.ChecksumOutputStream sumOut = null;
@@ -173,18 +172,16 @@
PrintWriter writer = null;
+ writer = new PrintWriter(new FileWriter(new File(metaInf, MANIFEST_MF)));
try {
- writer = new PrintWriter(new FileWriter(new File(metaInf, IMPORT_PACKAGES)));
- List<GBeanData> gbeans = configurationData.getGbeanState().getGBeans(null);
- String imports = getImportString(gbeans);
- writer.append(imports);
- } catch (InvalidConfigException e) {
- throw (IOException)new IOException("Could not get gbean datas").initCause(e);
+ configurationData.getManifest().write(writer);
+ writer.flush();
+ } catch (ManifestException e) {
+ throw new IOException("Could not write manifest", e);
} finally {
- flush(writer);
- close(writer);
+ writer.close();
}
-
+
File configSer = new File(metaInf, CONFIG_SER);
OutputStream out = new FileOutputStream(configSer);
@@ -209,48 +206,6 @@
}
- public static String getImportString(List<GBeanData> gbeans) {
- LinkedHashSet<String> imports = getImports(gbeans);
- StringBuilder builder = new StringBuilder();
- for (String importPackage: imports) {
- if (builder.length() > 0) {
- builder.append(",");
- }
- builder.append(importPackage);
- }
- return builder.toString();
- }
-
- public static LinkedHashSet<String> getImports(List<GBeanData> gbeans) {
- LinkedHashSet<String> imports = new LinkedHashSet<String>();
- for (GBeanData data: gbeans) {
- GBeanInfo info = data.getGBeanInfo();
- addImport(imports, info.getClassName());
- for (GAttributeInfo attInfo: info.getAttributes()) {
- addImport(imports, attInfo.getType());
- }
- for (GReferenceInfo refInfo: info.getReferences()) {
- addImport(imports, refInfo.getReferenceType());
- }
- }
- return imports;
- }
-
- private static void addImport(LinkedHashSet<String> imports, String className) {
- int pos = className.lastIndexOf('.');
- if (pos < 0 ) return;
- int count = 0;
- while (className.charAt(count) == '[') {
- count++;
- }
- if (className.charAt(count) == 'L') {
- count++;
- }
- className = className.substring(count, pos);
- if (className.startsWith("java.")) return;
- imports.add(className);
- }
-
private static Collection listRecursiveFiles(File file) {
LinkedList list = new LinkedList();
listRecursiveFiles(file, list);
Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/test/java/org/apache/geronimo/system/configuration/InPlaceConfigurationUtilTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/test/java/org/apache/geronimo/system/configuration/InPlaceConfigurationUtilTest.java?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/test/java/org/apache/geronimo/system/configuration/InPlaceConfigurationUtilTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/test/java/org/apache/geronimo/system/configuration/InPlaceConfigurationUtilTest.java Tue Nov 24 23:16:13 2009
@@ -40,8 +40,7 @@
public void testWriteReadInPlaceLocation() throws Exception {
ConfigurationData configurationData = new ConfigurationData(null,
- null,
- Collections.EMPTY_LIST,
+ Collections.EMPTY_LIST,
Collections.EMPTY_MAP,
new Environment(new Artifact("groupId", "artifactId", "version", "type")),
configDir,
@@ -63,7 +62,6 @@
assertFalse(inPlaceConfUtil.isInPlaceConfiguration(configDir));
ConfigurationData configurationData = new ConfigurationData(null,
- null,
Collections.EMPTY_LIST,
Collections.EMPTY_MAP,
new Environment(new Artifact("groupId", "artifactId", "version", "type")),
Modified: geronimo/server/trunk/plugins/activemq/activemq-broker/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-broker/src/main/history/dependencies.xml?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-broker/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/activemq/activemq-broker/src/main/history/dependencies.xml Tue Nov 24 23:16:13 2009
@@ -38,11 +38,6 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.configs</groupId>
- <artifactId>spring</artifactId>
- <type>car</type>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.configs</groupId>
<artifactId>system-database</artifactId>
<type>car</type>
</dependency>
@@ -57,8 +52,33 @@
<type>jar</type>
</dependency>
<dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jms_1.1_spec</artifactId>
+ <type>jar</type>
+ </dependency>
+ <dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-spring</artifactId>
<type>jar</type>
</dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <type>jar</type>
+ </dependency>
</plugin-artifact>
Modified: geronimo/server/trunk/plugins/activemq/activemq-portlets/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/pom.xml?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/pom.xml (original)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/pom.xml Tue Nov 24 23:16:13 2009
@@ -25,10 +25,18 @@
<dependencies>
<!-- for jspc maven plugin -->
<dependency>
- <groupId>org.apache.geronimo.framework</groupId>
- <artifactId>jee-specs</artifactId>
- <version>${version}</version>
- <type>car</type>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-servlet_3.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jsp_2.1_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
<scope>provided</scope>
</dependency>
Modified: geronimo/server/trunk/plugins/activemq/geronimo-activemq/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/geronimo-activemq/pom.xml?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq/geronimo-activemq/pom.xml (original)
+++ geronimo/server/trunk/plugins/activemq/geronimo-activemq/pom.xml Tue Nov 24 23:16:13 2009
@@ -73,12 +73,24 @@
<artifactId>activeio-core</artifactId>
</dependency>
- <!-- Use our Spring plugin instead of individual jars -->
<dependency>
- <groupId>org.apache.geronimo.configs</groupId>
- <artifactId>spring</artifactId>
- <version>${version}</version>
- <type>car</type>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
</dependency>
<dependency>
Modified: geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/MasterConfigurationStore.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/MasterConfigurationStore.java?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/MasterConfigurationStore.java (original)
+++ geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/MasterConfigurationStore.java Tue Nov 24 23:16:13 2009
@@ -242,7 +242,6 @@
File configurationDir = delegate.createNewConfigurationDir(configId);
return new ConfigurationData(ConfigurationModuleType.CAR,
- new LinkedHashSet(),
gbeans,
Collections.EMPTY_MAP,
environment,
Modified: geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/MasterConfigurationStoreTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/MasterConfigurationStoreTest.java?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/MasterConfigurationStoreTest.java (original)
+++ geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/MasterConfigurationStoreTest.java Tue Nov 24 23:16:13 2009
@@ -324,7 +324,6 @@
public void testInstallOK() throws Exception {
final ConfigurationData configurationData = new ConfigurationData(ConfigurationModuleType.CAR,
- new LinkedHashSet(),
new ArrayList(),
Collections.EMPTY_MAP,
new Environment(configId),
Modified: geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/pom.xml?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/pom.xml (original)
+++ geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/pom.xml Tue Nov 24 23:16:13 2009
@@ -46,11 +46,8 @@
<!--<version>${version}</version>-->
<!--</dependency>-->
<dependency>
- <groupId>org.apache.geronimo.framework</groupId>
- <artifactId>jee-specs</artifactId>
- <version>${version}</version>
- <type>car</type>
- <scope>provided</scope>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-j2ee-connector_1.6_spec</artifactId>
</dependency>
<dependency>
Modified: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml?rev=883920&r1=883919&r2=883920&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml (original)
+++ geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml Tue Nov 24 23:16:13 2009
@@ -46,10 +46,23 @@
</dependency>
<dependency>
- <groupId>org.apache.geronimo.configs</groupId>
- <artifactId>spring</artifactId>
- <version>${version}</version>
- <type>car</type>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
</dependency>
<dependency>