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 2011/05/05 01:35:23 UTC

svn commit: r1099638 - in /geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin: pom.xml src/main/filtered-resources/resources/etc/custom.properties src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java

Author: djencks
Date: Wed May  4 23:35:22 2011
New Revision: 1099638

URL: http://svn.apache.org/viewvc?rev=1099638&view=rev
Log:
fix the jaxb 2.2 problem by removing the sun jaxb impl from the boot delegation. fix the feature service options

Added:
    geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/filtered-resources/resources/etc/custom.properties   (with props)
Modified:
    geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/pom.xml
    geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java

Modified: geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/pom.xml?rev=1099638&r1=1099637&r2=1099638&view=diff
==============================================================================
--- geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/pom.xml (original)
+++ geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/pom.xml Wed May  4 23:35:22 2011
@@ -406,6 +406,7 @@
                               <patternset>
                                   <include name="resources/etc/**"/>
                                   <exclude name="resources/etc/startup.properties"/>
+                                  <exclude name="resources/etc/custom.properties"/>
                               </patternset>
                           </unzip>
 

Added: geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/filtered-resources/resources/etc/custom.properties
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/filtered-resources/resources/etc/custom.properties?rev=1099638&view=auto
==============================================================================
--- geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/filtered-resources/resources/etc/custom.properties (added)
+++ geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/filtered-resources/resources/etc/custom.properties Wed May  4 23:35:22 2011
@@ -0,0 +1,93 @@
+################################################################################
+#
+#    Licensed to the Apache Software Foundation (ASF) under one or more
+#    contributor license agreements.  See the NOTICE file distributed with
+#    this work for additional information regarding copyright ownership.
+#    The ASF licenses this file to You under the Apache License, Version 2.0
+#    (the "License"); you may not use this file except in compliance with
+#    the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+################################################################################
+
+#
+# You can place any customized configuration here.
+# All the values specified here will override the default value.
+#
+
+karaf.systemBundlesStartLevel=50
+
+# javax.transaction is needed to avoid class loader constraint violation when using javax.sql  
+org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,\
+sun.*,\
+javax.transaction,\
+javax.transaction.*,\
+\
+com.sun.awt,\
+com.sun.beans,\
+com.sun.jarsigner,\
+com.sun.javadoc,\
+com.sun.jdi,\
+com.sun.management,\
+com.sun.rowset,\
+com.sun.servicetag,\
+\
+com.sun.awt.*,\
+com.sun.beans.*,\
+com.sun.jarsigner.*,\
+com.sun.javadoc.*,\
+com.sun.jdi.*,\
+com.sun.management.*,\
+com.sun.rowset.*,\
+com.sun.servicetag.*,\
+\
+com.sun.accessibility.*,\
+com.sun.activation.*,\
+com.sun.codemodel.*,\
+com.sun.corba.*,\
+com.sun.demo.*,\
+com.sun.image.*,\
+com.sun.imageio.*,\
+com.sun.istack.*,\
+com.sun.java.*,\
+com.sun.java_cup.*,\
+com.sun.jmx.*,\
+com.sun.jndi.*,\
+com.sun.media.*,\
+com.sun.mirror.*,\
+com.sun.naming.*,\
+com.sun.net.*,\
+com.sun.org.*,\
+com.sun.rmi.*,\
+com.sun.script.*,\
+com.sun.security.*,\
+com.sun.source.*,\
+com.sun.swing.*,\
+com.sun.tools.*,\
+\
+com.sun.xml.internal.dtdparser,\
+com.sun.xml.internal.fastinfoset,\
+com.sun.xml.internal.messaging,\
+com.sun.xml.internal.org,\
+com.sun.xml.internal.rngom,\
+com.sun.xml.internal.stream,\
+com.sun.xml.internal.txw2,\
+com.sun.xml.internal.ws,\
+com.sun.xml.internal.xsom,\
+\
+com.sun.xml.internal.dtdparser.*,\
+com.sun.xml.internal.fastinfoset.*,\
+com.sun.xml.internal.messaging.*,\
+com.sun.xml.internal.org.*,\
+com.sun.xml.internal.rngom.*,\
+com.sun.xml.internal.stream.*,\
+com.sun.xml.internal.txw2.*,\
+com.sun.xml.internal.ws.*,\
+com.sun.xml.internal.xsom.*

Propchange: geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/filtered-resources/resources/etc/custom.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/filtered-resources/resources/etc/custom.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/filtered-resources/resources/etc/custom.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java?rev=1099638&r1=1099637&r2=1099638&view=diff
==============================================================================
--- geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java (original)
+++ geronimo/server/branches/3.0-osgi/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java Wed May  4 23:35:22 2011
@@ -162,11 +162,17 @@ public class PackageMojo extends Abstrac
                 Method karInstallMethod;
                 Method featuresAddRepoMethod;
                 Method featuresInstallFeatureMethod;
-
+                EnumSet options;
                 try {
                     karInstallMethod = karService.getClass().getMethod("install", new Class[]{File.class});
                     featuresAddRepoMethod = featuresService.getClass().getMethod("addRepository", new Class[]{URI.class});
                     featuresInstallFeatureMethod = featuresService.getClass().getMethod("installFeature", new Class[]{String.class, String.class, EnumSet.class});
+                    ClassLoader cl = featuresService.getClass().getClassLoader();
+                    Class optionClass = cl.loadClass(FeaturesService.Option.class.getName());
+                    Method valueOf = optionClass.getMethod("valueOf", new Class[]{String.class});
+                    Enum NoCleanOnFailure = (Enum) valueOf.invoke(null, FeaturesService.Option.NoCleanIfFailure.toString());
+                    Enum ContinueBatchOnFailure = (Enum) valueOf.invoke(null, FeaturesService.Option.ContinueBatchOnFailure.toString());
+                    options = EnumSet.of(NoCleanOnFailure, ContinueBatchOnFailure);
                 } catch (NoSuchMethodException e) {
                     throw new MojoFailureException("What class??", e);
                 }
@@ -200,7 +206,7 @@ public class PackageMojo extends Abstrac
                 }
                 if (features != null) {
                     for (String featureName: features) {
-                        featuresInstallFeatureMethod.invoke(featuresService, featureName, org.apache.karaf.features.internal.model.Feature.DEFAULT_VERSION, EnumSet.of(FeaturesService.Option.NoCleanIfFailure, FeaturesService.Option.ContinueBatchOnFailure));
+                        featuresInstallFeatureMethod.invoke(featuresService, featureName, org.apache.karaf.features.internal.model.Feature.DEFAULT_VERSION, options);
                     }
                 }
                 for (Long id : ids) {