Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason van Zyl2013-09-29 03:07:19 +0000
committerIgor Fedorenko2013-10-06 21:33:38 +0000
commitb29933bbb8cf2659d05d42e288c9c14ba7a416ea (patch)
treeeb493754e8711549d8e8fdf20b25089a24f72828 /org.eclipse.m2e.cliresolver31
parent85527e1eb1638654d8f33a7106900ef9d1158bc2 (diff)
downloadm2e-core-b29933bbb8cf2659d05d42e288c9c14ba7a416ea.tar.gz
m2e-core-b29933bbb8cf2659d05d42e288c9c14ba7a416ea.tar.xz
m2e-core-b29933bbb8cf2659d05d42e288c9c14ba7a416ea.zip
418263 Replaced netty/ahc with okhttp
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Diffstat (limited to 'org.eclipse.m2e.cliresolver31')
-rw-r--r--org.eclipse.m2e.cliresolver31/about.html28
-rw-r--r--org.eclipse.m2e.cliresolver31/pom.xml95
-rw-r--r--org.eclipse.m2e.cliresolver31/src/main/java/org/eclipse/m2e/cliresolver31/EclipseWorkspaceReader.java56
3 files changed, 179 insertions, 0 deletions
diff --git a/org.eclipse.m2e.cliresolver31/about.html b/org.eclipse.m2e.cliresolver31/about.html
new file mode 100644
index 00000000..70e4b67c
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver31/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>October 29, 2010</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/org.eclipse.m2e.cliresolver31/pom.xml b/org.eclipse.m2e.cliresolver31/pom.xml
new file mode 100644
index 00000000..d1c1b11a
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver31/pom.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2008 Sonatype, Inc. All rights reserved. This program
+ and the accompanying materials are made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>org.eclipse.m2e.cliresolver31</artifactId>
+ <version>1.0.100-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>io.tesla.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.1.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-api</artifactId>
+ <version>0.9.0.M2</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>org.eclipse.m2e.cliresolver</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins
+ </groupId>
+ <artifactId>maven-compiler-plugin
+ </artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <version>1.0.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-metadata</goal>
+ <goal>generate-test-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.2.1</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <includes>
+ <include>org.eclipse.m2e:org.eclipse.m2e.cliresolver</include>
+ </includes>
+ </artifactSet>
+ <filters>
+ <filter>
+ <artifact>org.eclipse.m2e:org.eclipse.m2e.cliresolver</artifact>
+ <includes>
+ <include>org/eclipse/m2e/cli/**</include>
+ </includes>
+ </filter>
+ </filters>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+</project>
diff --git a/org.eclipse.m2e.cliresolver31/src/main/java/org/eclipse/m2e/cliresolver31/EclipseWorkspaceReader.java b/org.eclipse.m2e.cliresolver31/src/main/java/org/eclipse/m2e/cliresolver31/EclipseWorkspaceReader.java
new file mode 100644
index 00000000..8ee3345f
--- /dev/null
+++ b/org.eclipse.m2e.cliresolver31/src/main/java/org/eclipse/m2e/cliresolver31/EclipseWorkspaceReader.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.m2e.cliresolver31;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.List;
+
+import org.codehaus.plexus.component.annotations.Component;
+import org.eclipse.aether.repository.WorkspaceReader;
+import org.eclipse.aether.repository.WorkspaceRepository;
+import org.eclipse.m2e.cli.WorkspaceState;
+
+
+/**
+ * Enables workspace resolution in Maven 3.1.0 and newer.
+ */
+@Component(role = WorkspaceReader.class, hint = "ide")
+public final class EclipseWorkspaceReader implements WorkspaceReader {
+
+ private WorkspaceRepository workspaceRepository;
+
+ public EclipseWorkspaceReader() {
+ this.workspaceRepository = new WorkspaceRepository("ide", getClass());
+ }
+
+ @Override
+ public int hashCode() {
+ return getClass().hashCode(); // no state
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return obj instanceof EclipseWorkspaceReader;
+ }
+
+ public WorkspaceRepository getRepository() {
+ return workspaceRepository;
+ }
+
+ public File findArtifact(org.eclipse.aether.artifact.Artifact artifact) {
+ return WorkspaceState.findArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getExtension(),
+ artifact.getBaseVersion());
+ }
+
+ public List<String> findVersions(org.eclipse.aether.artifact.Artifact artifact) {
+ return Collections.emptyList();
+ }
+
+}

Back to the top