You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2012/03/23 16:14:12 UTC

svn commit: r1304409 - in /karaf/eik/trunk: features/org.apache.karaf.eik.update/ features/org.apache.karaf.eik.update/src/main/resources/ plugins/org.ops4j.pax.url.mvn/src/main/java/org/ops4j/pax/url/mvn/

Author: jbonofre
Date: Fri Mar 23 15:14:11 2012
New Revision: 1304409

URL: http://svn.apache.org/viewvc?rev=1304409&view=rev
Log:
Fix the EIK build

Added:
    karaf/eik/trunk/plugins/org.ops4j.pax.url.mvn/src/main/java/org/ops4j/pax/url/mvn/MvnURLConnectionFactory.java
Modified:
    karaf/eik/trunk/features/org.apache.karaf.eik.update/category.xml
    karaf/eik/trunk/features/org.apache.karaf.eik.update/site.xml
    karaf/eik/trunk/features/org.apache.karaf.eik.update/src/main/resources/content.xml

Modified: karaf/eik/trunk/features/org.apache.karaf.eik.update/category.xml
URL: http://svn.apache.org/viewvc/karaf/eik/trunk/features/org.apache.karaf.eik.update/category.xml?rev=1304409&r1=1304408&r2=1304409&view=diff
==============================================================================
--- karaf/eik/trunk/features/org.apache.karaf.eik.update/category.xml (original)
+++ karaf/eik/trunk/features/org.apache.karaf.eik.update/category.xml Fri Mar 23 15:14:11 2012
@@ -1,8 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <site>
-   <feature url="features/org.apache.karaf.eik.smk.feature_3.0.0.qualifier.jar" id="org.apache.karaf.eik.smk.feature" version="3.0.0.qualifier">
-      <category name="Eclipse Integration for Apache ServiceMix Kernel"/>
-   </feature>
    <feature url="features/org.apache.karaf.eik.wtp.feature_3.0.0.qualifier.jar" id="org.apache.karaf.eik.wtp.feature" version="3.0.0.qualifier">
       <category name="Eclipse Web Tools Platform Integration for Apache Karaf"/>
    </feature>

Modified: karaf/eik/trunk/features/org.apache.karaf.eik.update/site.xml
URL: http://svn.apache.org/viewvc/karaf/eik/trunk/features/org.apache.karaf.eik.update/site.xml?rev=1304409&r1=1304408&r2=1304409&view=diff
==============================================================================
--- karaf/eik/trunk/features/org.apache.karaf.eik.update/site.xml (original)
+++ karaf/eik/trunk/features/org.apache.karaf.eik.update/site.xml Fri Mar 23 15:14:11 2012
@@ -1,8 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <site>
-   <feature url="features/org.apache.karaf.eik.smk.feature_3.0.0.classifier.jar" id="org.apache.karaf.eik.smk.feature" version="3.0.0.qualifier">
-      <category name="Eclipse Integration for Apache ServiceMix Kernel"/>
-   </feature>
    <feature url="features/org.apache.karaf.eik.feature_3.0.0.classifier.jar" id="org.apache.karaf.eik.feature" version="3.0.0.qualifier">
       <category name="Eclipse Integration for Apache Karaf"/>
    </feature>

Modified: karaf/eik/trunk/features/org.apache.karaf.eik.update/src/main/resources/content.xml
URL: http://svn.apache.org/viewvc/karaf/eik/trunk/features/org.apache.karaf.eik.update/src/main/resources/content.xml?rev=1304409&r1=1304408&r2=1304409&view=diff
==============================================================================
--- karaf/eik/trunk/features/org.apache.karaf.eik.update/src/main/resources/content.xml (original)
+++ karaf/eik/trunk/features/org.apache.karaf.eik.update/src/main/resources/content.xml Fri Mar 23 15:14:11 2012
@@ -327,8 +327,8 @@
         <provided namespace='org.eclipse.equinox.p2.iu' name='Eclipse Integration for Apache Karaf' version='1.0.0.07I7AcSCL8F7E7AA7g7Q7cQ7'/>
       </provides>
       <requires size='2'>
-        <required namespace='org.eclipse.equinox.p2.iu' name='org.apache.karaf.eik.feature.feature.group' range='[3.0.0.SNAPSHOT,3.0.0.SNAPSHOT]'/>
-        <required namespace='org.eclipse.equinox.p2.iu' name='org.apache.karaf.eik.jmx.feature.feature.group' range='[3.0.0.SNAPSHOT,3.0.0.SNAPSHOT]'/>
+        <required namespace='org.eclipse.equinox.p2.iu' name='org.apache.karaf.eik.wtp.feature.feature.group' version='3.0.0.SNAPSHOT'/>
+        <required namespace='org.eclipse.equinox.p2.iu' name='org.apache.karaf.eik.jmx.feature.feature.group' version='3.0.0.SNAPSHOT'/>
       </requires>
       <touchpoint id='null' version='0.0.0'/>
     </unit>
@@ -865,7 +865,6 @@
       </copyright>
     </unit>
     <unit id='org.apache.karaf.eik.wtp.feature.feature.group' version='3.0.0.SNAPSHOT' singleton='false'>
-      <update id='org.apache.karaf.eik.wtp.feature.feature.group' range='[0.0.0,3.0.0.SNAPSHOT)' severity='0'/>
       <properties size='9'>
         <property name='org.eclipse.equinox.p2.name' value='%featureName'/>
         <property name='org.eclipse.equinox.p2.description' value='%description'/>
@@ -926,7 +925,7 @@
         <provided namespace='org.eclipse.equinox.p2.iu' name='Eclipse Web Tools Platform Integration for Apache Karaf' version='1.0.0.0793cSCLAF773553K3C3IC3'/>
       </provides>
       <requires size='1'>
-        <required namespace='org.eclipse.equinox.p2.iu' name='info.evanchik.eclipse.karaf.wtp.feature.feature.group' range='[0.5.2.201109050850,0.5.2.201109050850]'/>
+        <required namespace='org.eclipse.equinox.p2.iu' name='org.apache.karaf.eik.wtp.feature.feature.group' version='3.0.0-SNAPSHOT'/>
       </requires>
       <touchpoint id='null' version='0.0.0'/>
     </unit>
@@ -939,7 +938,7 @@
         <provided namespace='org.eclipse.equinox.p2.iu' name='Eclipse Integration for Apache Karaf' version='1.0.0.0795cSCMY6773553K3C3IC3'/>
       </provides>
       <requires size='1'>
-        <required namespace='org.eclipse.equinox.p2.iu' name='org.apache.karaf.eik.feature.feature.group' range='3.0.0.SNAPSHOT'/>
+        <required namespace='org.eclipse.equinox.p2.iu' name='org.apache.karaf.eik.wtp.feature.feature.group' version='3.0.0.SNAPSHOT'/>
       </requires>
       <touchpoint id='null' version='0.0.0'/>
     </unit>

Added: karaf/eik/trunk/plugins/org.ops4j.pax.url.mvn/src/main/java/org/ops4j/pax/url/mvn/MvnURLConnectionFactory.java
URL: http://svn.apache.org/viewvc/karaf/eik/trunk/plugins/org.ops4j.pax.url.mvn/src/main/java/org/ops4j/pax/url/mvn/MvnURLConnectionFactory.java?rev=1304409&view=auto
==============================================================================
--- karaf/eik/trunk/plugins/org.ops4j.pax.url.mvn/src/main/java/org/ops4j/pax/url/mvn/MvnURLConnectionFactory.java (added)
+++ karaf/eik/trunk/plugins/org.ops4j.pax.url.mvn/src/main/java/org/ops4j/pax/url/mvn/MvnURLConnectionFactory.java Fri Mar 23 15:14:11 2012
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+package org.ops4j.pax.url.mvn;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Properties;
+
+import org.ops4j.pax.url.maven.commons.MavenConfigurationImpl;
+import org.ops4j.pax.url.maven.commons.MavenSettingsImpl;
+import org.ops4j.pax.url.mvn.internal.Connection;
+import org.ops4j.util.property.PropertiesPropertyResolver;
+
+public class MvnURLConnectionFactory {
+
+    private final Properties configuration;
+
+    /**
+     * Constructs the factory using a {@link Properties} to configure how PAX
+     * Maven URL resolves Maven artifacts
+     *
+     * @param configuration
+     *            the {@code Properties} used to configure the
+     *            {@code URLConnection}
+     */
+    public MvnURLConnectionFactory(final Properties configuration) {
+        this.configuration = configuration;
+    }
+
+    /**
+     * Creates a {@link URLConnection} from the specified {@link URL}
+     *
+     * @param url
+     *            the {@code URL}
+     * @return the {@code URLConnection}
+     * @throws IOException
+     */
+    public URLConnection create(final URL url) throws IOException {
+        final PropertiesPropertyResolver systemProperties =
+                new PropertiesPropertyResolver(System.getProperties());
+
+        final PropertiesPropertyResolver configuredProperties =
+                new PropertiesPropertyResolver(configuration, systemProperties);
+
+        final MavenConfigurationImpl config =
+                new MavenConfigurationImpl(configuredProperties, ServiceConstants.PID);
+
+        config.setSettings(new MavenSettingsImpl(config.getSettingsFileUrl(), config.useFallbackRepositories()));
+
+        return new Connection(url, config);
+    }
+}