You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ri...@apache.org on 2009/11/02 17:16:23 UTC
svn commit: r831940 - in /geronimo/server/trunk:
framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/
framework/configs/geronimo-gbean-deployer/
framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/...
Author: rickmcguire
Date: Mon Nov 2 16:16:22 2009
New Revision: 831940
URL: http://svn.apache.org/viewvc?rev=831940&view=rev
Log:
some fixes for xbeans problems
Modified:
geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java
geronimo/server/trunk/framework/configs/geronimo-gbean-deployer/pom.xml
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicKernel.java
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
geronimo/server/trunk/framework/modules/geronimo-service-builder/pom.xml
geronimo/server/trunk/plugins/connector-1_6/connector-deployer-1_6/pom.xml
geronimo/server/trunk/plugins/connector-1_6/geronimo-connector-builder-1_6/pom.xml
geronimo/server/trunk/plugins/system-database/system-database/pom.xml
geronimo/server/trunk/plugins/system-database/system-database/src/main/history/dependencies.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=831940&r1=831939&r2=831940&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 Mon Nov 2 16:16:22 2009
@@ -22,18 +22,18 @@
import java.io.File;
import java.io.FileReader;
import java.io.Reader;
+import java.util.Map;
+import org.apache.geronimo.kernel.osgi.ConfigurationActivator;
+import org.apache.geronimo.system.osgi.BootActivator;
import org.apache.maven.archiver.MavenArchiveConfiguration;
import org.apache.maven.archiver.MavenArchiver;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.versioning.ArtifactVersion;
+import org.apache.maven.model.License;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.model.License;
-import org.apache.geronimo.kernel.osgi.ConfigurationActivator;
-import org.apache.geronimo.system.osgi.BootActivator;
import org.codehaus.plexus.archiver.jar.JarArchiver;
-
import org.osgi.framework.Constants;
/**
@@ -150,6 +150,13 @@
*/
private boolean boot;
+ /**
+ * Additional instructions that will get processed to adjust the manifest header. Currently,
+ * only the Import-Package instruction is recognized.
+ * @parameter
+ */
+ private Map instructions;
+
//
// Mojo
//
@@ -255,6 +262,26 @@
} 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);
+ }
+
+ String requiredBundles = (String)instructions.get(Constants.REQUIRE_BUNDLE);
+ if (requiredBundles != null) {
+ requiredBundles = requiredBundles.replaceAll( "[\r\n]", "" );
+ archive.addManifestEntry(Constants.REQUIRE_BUNDLE, requiredBundles);
+ }
+ }
+
archive.addManifestEntry(Constants.IMPORT_PACKAGE, imports.toString());
archive.addManifestEntry(Constants.DYNAMICIMPORT_PACKAGE, "*");
}
Modified: geronimo/server/trunk/framework/configs/geronimo-gbean-deployer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/geronimo-gbean-deployer/pom.xml?rev=831940&r1=831939&r2=831940&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/geronimo-gbean-deployer/pom.xml (original)
+++ geronimo/server/trunk/framework/configs/geronimo-gbean-deployer/pom.xml Mon Nov 2 16:16:22 2009
@@ -21,7 +21,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
-
+
<parent>
<groupId>org.apache.geronimo.framework</groupId>
<artifactId>configs</artifactId>
@@ -35,25 +35,25 @@
<description>
The GBean Deployer
</description>
-
+
<dependencies>
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.xmlbeans</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.apache.geronimo.framework</groupId>
<artifactId>geronimo-deployment</artifactId>
<version>${version}</version>
</dependency>
-
+
<dependency>
<groupId>org.apache.geronimo.framework</groupId>
<artifactId>geronimo-service-builder</artifactId>
<version>${version}</version>
</dependency>
-
+
<dependency>
<groupId>org.apache.geronimo.framework</groupId>
<artifactId>plugin</artifactId>
@@ -114,6 +114,11 @@
<import>classes</import>
</dependency>
</dependencies>
+ <instructions>
+ <!--packages containing "impl" or "internal" are excluded by default -->
+ <Import-Package>org.apache.xmlbeans.impl.schema;version="2.4",org.apache.geronimo.deployment.xbeans.impl,org.apache.geronimo.deployment.javabean.xbeans.impl</Import-Package>
+ <!--<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>-->
+ </instructions>
<instance>
<plugin-artifact>
<config-xml-content>
Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicKernel.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicKernel.java?rev=831940&r1=831939&r2=831940&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicKernel.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicKernel.java Mon Nov 2 16:16:22 2009
@@ -65,7 +65,7 @@
* installed Configurations (providing a local filesystem based classpath) and
* used hold the persistent state of each Configuration. This allows
* Configurations to restart in the event of system failure.
- *
+ *
* TODO: Describe the order of method invocation (e.g. if loadGbean may be before boot)
*
* @version $Rev:386276 $ $Date$
@@ -73,13 +73,13 @@
public class BasicKernel implements Kernel
{
private static final Logger log = LoggerFactory.getLogger(BasicKernel.class);
-
+
/**
* Helper objects for invoke and getAttribute
*/
private static final String[] NO_TYPES = new String[0];
private static final Object[] NO_ARGS = new Object[0];
-
+
/**
* Name of this kernel
*/
@@ -359,7 +359,7 @@
LifecycleBroadcaster lifecycleBroadcaster = lifecycleMonitor.createLifecycleBroadcaster(abstractName, interfaces);
GBeanInstance gbeanInstance = new GBeanInstance(gbeanData, this, dependencyManager, lifecycleBroadcaster, bundleContext);
registry.register(gbeanInstance);
- lifecycleBroadcaster.fireLoadedEvent();
+ lifecycleBroadcaster.fireLoadedEvent();
}
public void startGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java?rev=831940&r1=831939&r2=831940&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java Mon Nov 2 16:16:22 2009
@@ -42,16 +42,16 @@
public Class<?> loadClass(String name) throws ClassNotFoundException {
return loadClass(name, false);
}
-
+
@Override
- protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
+ protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
Class clazz = bundle.loadClass(name);
if (resolve) {
resolveClass(clazz);
}
return clazz;
}
-
+
@Override
public String toString() {
return "[BundleClassLoader] " + bundle;
@@ -70,6 +70,6 @@
return Collections.enumeration(Collections.EMPTY_LIST);
} else {
return e;
- }
+ }
}
}
Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/pom.xml?rev=831940&r1=831939&r2=831940&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/pom.xml (original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/pom.xml Mon Nov 2 16:16:22 2009
@@ -86,7 +86,10 @@
<!--<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>-->
<Import-Package>org.apache.xmlbeans.impl.schema,*</Import-Package>
<Export-Package>
- org.apache.geronimo.deployment.xbeans.impl,org.apache.geronimo.deployment.javabean.xbeans.impl,org.apache.geronimo.deployment*
+org.apache.geronimo.deployment.xbeans.impl,
+org.apache.geronimo.deployment.javabean.xbeans.impl,
+schemaorg_apache_xmlbeans*,
+org.apache.geronimo.deployment*
</Export-Package>
</instructions>
</configuration>
Modified: geronimo/server/trunk/plugins/connector-1_6/connector-deployer-1_6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector-1_6/connector-deployer-1_6/pom.xml?rev=831940&r1=831939&r2=831940&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/connector-1_6/connector-deployer-1_6/pom.xml (original)
+++ geronimo/server/trunk/plugins/connector-1_6/connector-deployer-1_6/pom.xml Mon Nov 2 16:16:22 2009
@@ -115,6 +115,12 @@
<type>car</type>
</dependency>
</dependencies>
+ <instructions>
+ <!--packages containing "impl" or "internal" are excluded by default -->
+ <Import-Package>org.apache.xmlbeans.impl.schema;version="2.4",org.apache.geronimo.deployment.xbeans.impl,org.apache.geronimo.deployment.javabean.xbeans.impl</Import-Package>
+ <Require-Bundle>org.apache.geronimo.framework.geronimo-service-builder</Require-Bundle>
+ <!--<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>-->
+ </instructions>
<instance>
<plugin-artifact>
<config-xml-content>
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=831940&r1=831939&r2=831940&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 Mon Nov 2 16:16:22 2009
@@ -100,6 +100,7 @@
<instructions>
<!--packages containing "impl" or "internal" are excluded by default -->
<Import-Package>org.apache.xmlbeans.impl.schema;version="2.4",org.apache.geronimo.deployment.xbeans.impl,org.apache.geronimo.deployment.javabean.xbeans.impl,*</Import-Package>
+ <Require-Bundle>org.apache.geronimo.framework.geronimo-service-builder</Require-Bundle>
<!--<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>-->
</instructions>
</configuration>
Modified: geronimo/server/trunk/plugins/system-database/system-database/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/system-database/pom.xml?rev=831940&r1=831939&r2=831940&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/system-database/pom.xml (original)
+++ geronimo/server/trunk/plugins/system-database/system-database/pom.xml Mon Nov 2 16:16:22 2009
@@ -43,7 +43,6 @@
<artifactId>geronimo-gbean-deployer</artifactId>
<version>${version}</version>
<type>car</type>
- <scope>provided</scope>
</dependency>
<dependency>
@@ -51,7 +50,6 @@
<artifactId>j2ee-deployer</artifactId>
<version>${version}</version>
<type>car</type>
- <scope>provided</scope>
</dependency>
<dependency>
@@ -59,7 +57,6 @@
<artifactId>connector-deployer-1_6</artifactId>
<version>${version}</version>
<type>car</type>
- <scope>provided</scope>
</dependency>
<dependency>
@@ -91,6 +88,7 @@
<dependency>
<groupId>org.apache.geronimo.framework</groupId>
<artifactId>geronimo-service-builder</artifactId>
+ <version>${version}</version>
</dependency>
</dependencies>
Modified: geronimo/server/trunk/plugins/system-database/system-database/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/system-database/src/main/history/dependencies.xml?rev=831940&r1=831939&r2=831940&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/system-database/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/system-database/system-database/src/main/history/dependencies.xml Mon Nov 2 16:16:22 2009
@@ -8,23 +8,28 @@
</module-id>
<dependency>
<groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>connector-deployer-1_6</artifactId>
+ <type>car</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.configs</groupId>
<artifactId>derby</artifactId>
<type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.configs</groupId>
- <artifactId>transaction-1_6</artifactId>
+ <artifactId>j2ee-deployer</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.framework</groupId>
- <artifactId>geronimo-management</artifactId>
- <type>jar</type>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>transaction-1_6</artifactId>
+ <type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.framework</groupId>
- <artifactId>geronimo-system</artifactId>
- <type>jar</type>
+ <artifactId>geronimo-gbean-deployer</artifactId>
+ <type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.modules</groupId>