karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [2/5] karaf git commit: [KARAF-3671] Clean up karaf-maven-plugin goals
Date Fri, 17 Apr 2015 09:34:54 GMT
http://git-wip-us.apache.org/repos/asf/karaf/blob/056239dc/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/url/WarURLHandler.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/url/WarURLHandler.java
b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/url/WarURLHandler.java
deleted file mode 100644
index 73d932a..0000000
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/url/WarURLHandler.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.apache.karaf.tooling.url;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLStreamHandler;
-
-/**
- * Simple workaround for "WAR" prefix.
- */
-public class WarURLHandler extends URLStreamHandler {
-
-	private static String SYNTAX = "war: war-uri";
-
-	private URL warURL;
-
-    /**
-     * Open the connection for the given URL.
-     *
-     * @param url the url from which to open a connection.
-     * @return a connection on the specified URL.
-     * @throws java.io.IOException if an error occurs or if the URL is malformed.
-     */
-    @Override
-	public URLConnection openConnection(URL url) throws IOException {
-		if (url.getPath() == null || url.getPath().trim().length() == 0) {
-			throw new MalformedURLException ("Path can not be null or empty. Syntax: " + SYNTAX );
-		}
-
-        // We don't resolve any specific data here, just forward it to another URL Stream
Handler
-		warURL = new URL(url.getPath());
-		return warURL.openConnection();
-	}
-
-	public URL getWarURL() {
-		return warURL;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/karaf/blob/056239dc/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/InternalMavenResolver.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/InternalMavenResolver.java
b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/InternalMavenResolver.java
deleted file mode 100644
index d9e632f..0000000
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/InternalMavenResolver.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- *
- * 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.apache.karaf.tooling.utils;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugin.logging.Log;
-import org.ops4j.pax.url.mvn.MavenResolver;
-
-public class InternalMavenResolver implements MavenResolver {
-
-    private final DependencyHelper dependencyHelper;
-    private final Log log;
-
-    public InternalMavenResolver(DependencyHelper dependencyHelper, Log log) {
-        this.dependencyHelper = dependencyHelper;
-        this.log = log;
-    }
-
-    @Override
-    public File resolve(String url) throws IOException {
-        try {
-            return dependencyHelper.resolveById(url, log);
-        } catch (MojoFailureException e) {
-            throw new IOException(e);
-        }
-    }
-
-    @Override
-    public File resolve(String groupId, String artifactId, String classifier, String extension,
String version) throws IOException {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public File resolveMetadata(String groupId, String artifactId, String type, String version)
throws IOException {
-        return null;
-    }
-
-    @Override
-    public void upload(String groupId, String artifactId, String classifier, String extension,
String version, File artifact) throws IOException {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void uploadMetadata(String groupId, String artifactId, String type, String version,
File artifact) throws IOException {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void close() throws IOException {
-    }
-}

http://git-wip-us.apache.org/repos/asf/karaf/blob/056239dc/tooling/karaf-maven-plugin/src/main/resources/META-INF/plexus/components.xml
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/resources/META-INF/plexus/components.xml
b/tooling/karaf-maven-plugin/src/main/resources/META-INF/plexus/components.xml
index c71e00d..dc52797 100644
--- a/tooling/karaf-maven-plugin/src/main/resources/META-INF/plexus/components.xml
+++ b/tooling/karaf-maven-plugin/src/main/resources/META-INF/plexus/components.xml
@@ -72,7 +72,7 @@
                                 org.apache.karaf.tooling:karaf-maven-plugin:features-generate-descriptor
                             </compile>
                             <package>
-                                org.apache.karaf.tooling:karaf-maven-plugin:features-create-kar
+                                org.apache.karaf.tooling:karaf-maven-plugin:kar
                             </package>
                             <install>
                                 org.apache.maven.plugins:maven-install-plugin:install
@@ -115,12 +115,12 @@
                         <phases>
                             <process-resources>
                                 org.apache.maven.plugins:maven-resources-plugin:resources,
-                                org.apache.karaf.tooling:karaf-maven-plugin:install-kars
+                                org.apache.karaf.tooling:karaf-maven-plugin:assembly
                             </process-resources>
                             <compile>
                             </compile>
                             <package>
-                                org.apache.karaf.tooling:karaf-maven-plugin:instance-create-archive
+                                org.apache.karaf.tooling:karaf-maven-plugin:archive
                             </package>
                             <install>
                                 org.apache.maven.plugins:maven-install-plugin:install

http://git-wip-us.apache.org/repos/asf/karaf/blob/056239dc/tooling/karaf-maven-plugin/src/site/apt/usage.apt
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/site/apt/usage.apt b/tooling/karaf-maven-plugin/src/site/apt/usage.apt
index c612103..1194e34 100644
--- a/tooling/karaf-maven-plugin/src/site/apt/usage.apt
+++ b/tooling/karaf-maven-plugin/src/site/apt/usage.apt
@@ -158,7 +158,7 @@ Packagings
                         <phases>
                             <process-resources>
                                 org.apache.maven.plugins:maven-resources-plugin:resources,
-                                org.apache.karaf.tooling:karaf-maven-plugin:install-kars
+                                org.apache.karaf.tooling:karaf-maven-plugin:assembly
                             </process-resources>
                             <compile>
                             </compile>


Mime
View raw message