[1/9] maven-resolver git commit: moved ant tasks into subfolder

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[1/9] maven-resolver git commit: moved ant tasks into subfolder

mmoser
Repository: maven-resolver
Updated Branches:
  refs/heads/ant-tasks-folder [created] a088cdfca


http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Install/ant.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Install/ant.xml b/src/test/resources/ant/Install/ant.xml
deleted file mode 100644
index a4bd6eb..0000000
--- a/src/test/resources/ant/Install/ant.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<!DOCTYPE project [
-       <!ENTITY common SYSTEM "../common.xml">
-]>
-
-<project xmlns:repo="antlib:org.apache.maven.resolver.ant">
-
-  &common;
-
-  <repo:pom file="${project.dir}/dummy-pom.xml" id="pom"/>
-  <repo:artifact classifier="ant" file="${project.dir}/ant.xml" id="ant"/>
-
-  <target name="setUp">
-    <touch file="${project.dir}/dummy-pom.xml"/>
-    <touch file="${project.dir}/other-pom.xml"/>
-    <touch file="${project.dir}/ant.xml"/>
-  </target>
-
-  <target name="testInstallGlobalPom" depends="setUp">
-    <repo:pom file="${project.dir}/dummy-pom.xml"/>
-    <repo:install/>
-  </target>
-
-  <target name="testInstallOverrideGlobalPom" depends="setUp">
-    <repo:pom file="${project.dir}/dummy-pom.xml"/>
-    <repo:install>
-      <pom file="${project.dir}/other-pom.xml"/>
-    </repo:install>
-  </target>
-
-  <target name="testInstallOverrideGlobalPomByRef" depends="setUp">
-    <repo:pom file="${project.dir}/dummy-pom.xml"/>
-    <repo:pom file="${project.dir}/other-pom.xml" id="other"/>
-    <repo:install/>
-    <repo:install pomref="other"/>
-  </target>
-
-  <target name="testDefaultRepo" depends="setUp">
-    <repo:install pomref="pom">
-      <repo:artifact refid="ant"/>
-    </repo:install>
-  </target>
-
-  <target name="testCustomRepo" depends="setUp">
-    <repo:localrepo dir="${build.dir}/local-repo-custom" />
-    <repo:install pomref="pom">
-      <repo:artifact refid="ant"/>
-    </repo:install>
-  </target>
-
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Install/dummy-pom.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Install/dummy-pom.xml b/src/test/resources/ant/Install/dummy-pom.xml
deleted file mode 100644
index 0041f8c..0000000
--- a/src/test/resources/ant/Install/dummy-pom.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<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>test</groupId>
-  <artifactId>dummy</artifactId>
-  <version>0.1-SNAPSHOT</version>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Install/other-pom.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Install/other-pom.xml b/src/test/resources/ant/Install/other-pom.xml
deleted file mode 100644
index 626bede..0000000
--- a/src/test/resources/ant/Install/other-pom.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<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>test</groupId>
-  <artifactId>other</artifactId>
-  <version>0.1-SNAPSHOT</version>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Reactor/ant.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Reactor/ant.xml b/src/test/resources/ant/Reactor/ant.xml
deleted file mode 100644
index 7b7976a..0000000
--- a/src/test/resources/ant/Reactor/ant.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<!DOCTYPE project [
-       <!ENTITY common SYSTEM "../common.xml">
-]>
-
-<project xmlns:repo="antlib:org.apache.maven.resolver.ant">
-
-  &common;
-  
-  <target name="testPom">
-    <repo:pom file="${project.dir}/pom1.xml"/>
-  </target>
-  
-  <target name="testArtifact">
-    <repo:pom file="${project.dir}/pom1.xml" id="pom"/>
-    <repo:artifact pomref="pom" file="${project.dir}/pom1.xml"/>
-  </target>
-  
-  <target name="testArtifactInMemoryPom">
-    <repo:pom groupid="test" artifactid="test" version="0.1-SNAPSHOT" id="pom"/>
-    <repo:artifact pomref="pom" file="${project.dir}/pom1.xml"/>
-  </target>
-
-  <target name="testResolveArtifact">
-    <repo:pom file="${project.dir}/pom1.xml" id="pom"/>
-    <repo:artifact pomref="pom" file="${project.dir}/pom1.xml" type="jar"/>
-    <repo:pom file="${project.dir}/pom2.xml" id="pom2"/>
-
-    <repo:resolve>
-      <dependencies pomref="pom2"/>
-      <properties prefix="resolve"/>
-    </repo:resolve>
-  </target>
-
-  <target name="testResolveArtifactInMemoryPom">
-    <repo:pom groupid="test" artifactid="test" version="0.1-SNAPSHOT" id="pom"/>
-    <repo:artifact pomref="pom" file="${project.dir}/pom1.xml" type="jar"/>
-    <repo:pom file="${project.dir}/pom2.xml" id="pom2"/>
-
-    <repo:resolve>
-      <dependencies pomref="pom2"/>
-      <properties prefix="resolve"/>
-    </repo:resolve>
-  </target>
-
-  <target name="testResolveVersionRange">
-    <repo:pom file="${project.dir}/pom1.xml" id="pom"/>
-    <repo:artifact pomref="pom" file="${project.dir}/pom1.xml" type="jar"/>
-
-    <repo:resolve>
-      <dependencies>
-        <dependency groupId="test" artifactId="test" version="[0,)"/>
-      </dependencies>
-      <properties prefix="resolve"/>
-    </repo:resolve>
-  </target>
-
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Reactor/pom1.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Reactor/pom1.xml b/src/test/resources/ant/Reactor/pom1.xml
deleted file mode 100644
index 84496ca..0000000
--- a/src/test/resources/ant/Reactor/pom1.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<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>test</groupId>
-  <artifactId>test</artifactId>
-  <version>0.1-SNAPSHOT</version>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Reactor/pom2.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Reactor/pom2.xml b/src/test/resources/ant/Reactor/pom2.xml
deleted file mode 100644
index e0d5be6..0000000
--- a/src/test/resources/ant/Reactor/pom2.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<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>test</groupId>
-  <artifactId>test2</artifactId>
-  <version>0.1-SNAPSHOT</version>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>test</groupId>
-      <artifactId>test</artifactId>
-      <version>0.1-SNAPSHOT</version>
-    </dependency>
-  </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Resolve/ant.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Resolve/ant.xml b/src/test/resources/ant/Resolve/ant.xml
deleted file mode 100644
index 4565ea7..0000000
--- a/src/test/resources/ant/Resolve/ant.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<!DOCTYPE project [
-       <!ENTITY common SYSTEM "../common.xml">
-]>
-
-<project xmlns:repo="antlib:org.apache.maven.resolver.ant">
-
-  &common;
-
-  <repo:remoterepo id="remote" url="http://repo1.maven.org/maven2" type="default" releases="true" snapshots="true" updates="always" checksums="fail"/>
-  <repo:remoterepos id="resolver.repositories">
-    <repo:remoterepo refid="remote"/>
-  </repo:remoterepos>
-
-  <target name="setUp">
-    <delete dir="${build.dir}/resolvetest-local-repo"/>
-  </target>
-
-  <target name="testResolveGlobalPom">
-    <repo:pom file="${project.dir}/pom.xml"/>
-    <repo:resolve>
-      <properties prefix="test.resolve.path" classpath="compile"/>
-    </repo:resolve>
-  </target>
-
-  <target name="testResolveOverrideGlobalPom">
-    <repo:pom file="${project.dir}/dummy-pom.xml"/>
-    <repo:resolve>
-      <dependencies>
-        <pom file="${project.dir}/pom.xml"/>
-      </dependencies>
-      <properties prefix="test.resolve.path" classpath="compile"/>
-    </repo:resolve>
-  </target>
-
-  <target name="testResolveGlobalPomIntoOtherLocalRepo">
-    <repo:localrepo dir="${build.dir}/local-repo-custom"/>
-    <repo:pom file="${project.dir}/pom.xml"/>
-    <repo:resolve>
-      <properties prefix="test.resolve.path" classpath="compile"/>
-    </repo:resolve>
-  </target>
-
-  <target name="testResolveCustomFileLayout">
-    <repo:pom file="${project.dir}/pom.xml"/>
-    <repo:resolve>
-      <files dir="${build.dir}/resolve-custom-layout/" layout="{groupId}/{artifactId}/{groupIdDirs}/{extension}"/>
-    </repo:resolve>
-  </target>
-
-  <target name="testResolveAttachments">
-    <repo:resolve>
-      <dependencies>
-        <dependency groupid="org.eclipse.aether" artifactid="aether-impl" version="0.9.0.v20140226" />
-      </dependencies>
-      <files dir="${build.dir}/resolve-attachments/" layout="javadoc/{groupId}-{artifactId}-{classifier}.{extension}" attachments="javadoc"/>
-      <files dir="${build.dir}/resolve-attachments/" layout="sources/{groupId}-{artifactId}-{classifier}.{extension}" attachments="sources"/>
-    </repo:resolve>
-  </target>
-
-  <target name="testResolvePath">
-    <repo:pom file="${project.dir}/pom.xml"/>
-    <repo:resolve>
-      <path refid="out" classpath="compile"/>
-    </repo:resolve>
-    <echo>${tostring:out}</echo>
-  </target>
-
-  <target name="testResolveDepsFromFile">
-    <repo:resolve>
-      <dependencies file="${project.dir}/dependencies.txt">
-        <exclusion coords="org.eclipse.aether:aether-api"/>
-      </dependencies>
-      <properties prefix="test.resolve.path" classpath="runtime"/>
-    </repo:resolve>
-  </target>
-
-  <target name="testResolveNestedDependencyCollections">
-    <repo:resolve>
-      <dependencies>
-        <dependencies>
-          <dependency groupid="org.eclipse.aether" artifactid="aether-spi" version="0.9.0.v20140226" />
-        </dependencies>
-        <dependencies>
-          <dependency groupid="org.eclipse.aether" artifactid="aether-util" version="0.9.0.v20140226" />
-        </dependencies>
-        <exclusion coords="org.eclipse.aether:aether-api"/>
-      </dependencies>
-      <properties prefix="test.resolve.path" classpath="runtime"/>
-    </repo:resolve>
-  </target>
-
-  <target name="testResolveResourceCollectionOnly">
-    <repo:resolve>
-      <dependencies>
-        <dependency groupid="org.eclipse.aether" artifactid="aether-spi" version="0.9.0.v20140226" />
-      </dependencies>
-      <files refid="files"/>
-    </repo:resolve>
-  </target>
-
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Resolve/dependencies.txt
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Resolve/dependencies.txt b/src/test/resources/ant/Resolve/dependencies.txt
deleted file mode 100644
index 8254bb3..0000000
--- a/src/test/resources/ant/Resolve/dependencies.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# Copyright (c) 2014 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
-#
-
-# each line specifies one dependency
-org.eclipse.aether:aether-spi:0.9.0.v20140226:runtime  # a comment
-

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Resolve/dummy-pom.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Resolve/dummy-pom.xml b/src/test/resources/ant/Resolve/dummy-pom.xml
deleted file mode 100644
index 75bc291..0000000
--- a/src/test/resources/ant/Resolve/dummy-pom.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<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>test</groupId>
-  <artifactId>test</artifactId>
-  <version>0.1-SNAPSHOT</version>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Resolve/pom.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Resolve/pom.xml b/src/test/resources/ant/Resolve/pom.xml
deleted file mode 100644
index 392974d..0000000
--- a/src/test/resources/ant/Resolve/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<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>
-
-  <parent>
-    <groupId>org.sonatype.forge</groupId>
-    <artifactId>forge-parent</artifactId>
-    <version>10</version>
-  </parent>
-
-  <groupId>org.eclipse.aether</groupId>
-  <artifactId>aether-ant-tasks</artifactId>
-  <version>1.0-SNAPSHOT</version>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <aetherVersion>0.9.0.M3</aetherVersion>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.eclipse.aether</groupId>
-      <artifactId>aether-api</artifactId>
-      <version>${aetherVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.aether</groupId>
-      <artifactId>aether-system</artifactId>
-      <version>${aetherVersion}</version>
-      <type>pom</type>
-      <scope>system</scope>
-      <systemPath>${basedir}/pom.xml</systemPath>
-    </dependency>
-  </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Settings/ant.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Settings/ant.xml b/src/test/resources/ant/Settings/ant.xml
deleted file mode 100644
index 8c1f79a..0000000
--- a/src/test/resources/ant/Settings/ant.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<!DOCTYPE project [
-       <!ENTITY common SYSTEM "../common.xml">
-]>
-
-<project xmlns:repo="antlib:org.apache.maven.resolver.ant">
-
-  &common;
-
-  <target name="setUp">
-    <!-- touch file="${project.dir}/common.xml"/-->
-  </target>
-
-  <target name="testUserSettings" depends="setUp">
-    <repo:settings file="userSettings.xml"/>
-  </target>
-
-  <target name="testGlobalSettings" depends="setUp">
-    <repo:settings globalfile="globalSettings.xml"/>
-  </target>
-
-  <target name="testBothSettings" depends="setUp">
-    <repo:settings file="userSettings.xml" globalfile="globalSettings.xml"/>
-  </target>
-
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/common.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/common.xml b/src/test/resources/ant/common.xml
deleted file mode 100644
index 02c0a57..0000000
--- a/src/test/resources/ant/common.xml
+++ /dev/null
@@ -1,20 +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.
--->
-
-<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml"/>

Reply | Threaded
Open this post in threaded view
|

[2/9] maven-resolver git commit: moved ant tasks into subfolder

mmoser
http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyHelper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyHelper.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyHelper.java
deleted file mode 100644
index 5ec23ec..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyHelper.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import org.apache.tools.ant.PropertyHelper;
-
-/**
- */
-@SuppressWarnings( "deprecation" )
-class PomPropertyHelper
-    extends PropertyHelper
-{
-
-    private final ModelValueExtractor extractor;
-
-    public static void register( ModelValueExtractor extractor, PropertyHelper propertyHelper )
-    {
-        PomPropertyHelper helper = new PomPropertyHelper( extractor );
-        helper.setNext( propertyHelper.getNext() );
-        propertyHelper.setNext( helper );
-    }
-
-    public PomPropertyHelper( ModelValueExtractor extractor )
-    {
-        if ( extractor == null )
-        {
-            throw new IllegalArgumentException( "no model value exractor specified" );
-        }
-        this.extractor = extractor;
-        setProject( extractor.getProject() );
-    }
-
-    @Override
-    public Object getPropertyHook( String ns, String name, boolean user )
-    {
-        Object value = extractor.getValue( name );
-        if ( value != null )
-        {
-            return value;
-        }
-        else if ( extractor.isApplicable( name ) )
-        {
-            return null;
-        }
-        return super.getPropertyHook( ns, name, user );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/Proxy.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/Proxy.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/Proxy.java
deleted file mode 100644
index 6116c8e..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/Proxy.java
+++ /dev/null
@@ -1,163 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class Proxy
-    extends DataType
-{
-
-    private String host;
-
-    private int port;
-
-    private String type;
-
-    private String nonProxyHosts;
-
-    private Authentication authentication;
-
-    @Override
-    public void setProject( Project project )
-    {
-        super.setProject( project );
-
-        AntRepoSys.getInstance( project ).addProxy( this );
-    }
-
-    protected Proxy getRef()
-    {
-        return (Proxy) getCheckedRef();
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( host != null || port != 0 || type != null || nonProxyHosts != null )
-        {
-            throw tooManyAttributes();
-        }
-        if ( authentication != null )
-        {
-            throw noChildrenAllowed();
-        }
-        super.setRefid( ref );
-    }
-
-    public String getHost()
-    {
-        if ( isReference() )
-        {
-            return getRef().getHost();
-        }
-        return host;
-    }
-
-    public void setHost( String host )
-    {
-        checkAttributesAllowed();
-        this.host = host;
-    }
-
-    public int getPort()
-    {
-        if ( isReference() )
-        {
-            return getRef().getPort();
-        }
-        return port;
-    }
-
-    public void setPort( int port )
-    {
-        checkAttributesAllowed();
-        if ( port <= 0 || port > 0xFFFF )
-        {
-            throw new BuildException( "The port number must be within the range 1 - 65535" );
-        }
-        this.port = port;
-    }
-
-    public String getType()
-    {
-        if ( isReference() )
-        {
-            return getRef().getType();
-        }
-        return type;
-    }
-
-    public void setType( String type )
-    {
-        checkAttributesAllowed();
-        this.type = type;
-    }
-
-    public String getNonProxyHosts()
-    {
-        if ( isReference() )
-        {
-            return getRef().getNonProxyHosts();
-        }
-        return nonProxyHosts;
-    }
-
-    public void setNonProxyHosts( String nonProxyHosts )
-    {
-        checkAttributesAllowed();
-        this.nonProxyHosts = nonProxyHosts;
-    }
-
-    public Authentication getAuthentication()
-    {
-        if ( isReference() )
-        {
-            return getRef().getAuthentication();
-        }
-        return authentication;
-    }
-
-    public void addAuthentication( Authentication authentication )
-    {
-        checkChildrenAllowed();
-        if ( this.authentication != null )
-        {
-            throw new BuildException( "You must not specify multiple <authentication> elements" );
-        }
-        this.authentication = authentication;
-    }
-
-    public void setAuthRef( Reference ref )
-    {
-        if ( authentication == null )
-        {
-            authentication = new Authentication();
-            authentication.setProject( getProject() );
-        }
-        authentication.setRefid( ref );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositories.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositories.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositories.java
deleted file mode 100644
index 0b90877..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositories.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class RemoteRepositories
-    extends DataType
-    implements RemoteRepositoryContainer
-{
-
-    private List<RemoteRepositoryContainer> containers = new ArrayList<RemoteRepositoryContainer>();
-
-    protected RemoteRepositories getRef()
-    {
-        return (RemoteRepositories) getCheckedRef();
-    }
-
-    public void validate( Task task )
-    {
-        if ( isReference() )
-        {
-            getRef().validate( task );
-        }
-        else
-        {
-            for ( RemoteRepositoryContainer container : containers )
-            {
-                container.validate( task );
-            }
-        }
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( !containers.isEmpty() )
-        {
-            throw noChildrenAllowed();
-        }
-        super.setRefid( ref );
-    }
-
-    public void addRemoterepo( RemoteRepository repository )
-    {
-        checkChildrenAllowed();
-        containers.add( repository );
-    }
-
-    public void addRemoterepos( RemoteRepositories repositories )
-    {
-        checkChildrenAllowed();
-        if ( repositories == this )
-        {
-            throw circularReference();
-        }
-        containers.add( repositories );
-    }
-
-    public List<RemoteRepository> getRepositories()
-    {
-        if ( isReference() )
-        {
-            return getRef().getRepositories();
-        }
-        List<RemoteRepository> repos = new ArrayList<RemoteRepository>();
-        for ( RemoteRepositoryContainer container : containers )
-        {
-            repos.addAll( container.getRepositories() );
-        }
-        return repos;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepository.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepository.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepository.java
deleted file mode 100644
index aabefd2..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepository.java
+++ /dev/null
@@ -1,351 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.Reference;
-import org.eclipse.aether.repository.RepositoryPolicy;
-
-/**
- */
-public class RemoteRepository
-    extends DataType
-    implements RemoteRepositoryContainer
-{
-
-    private String id;
-
-    private String url;
-
-    private String type;
-
-    private Policy releasePolicy;
-
-    private Policy snapshotPolicy;
-
-    private boolean releases = true;
-
-    private boolean snapshots = false;
-
-    private String checksums;
-
-    private String updates;
-
-    private Authentication authentication;
-
-    @Override
-    public void setProject( Project project )
-    {
-        super.setProject( project );
-
-        // NOTE: Just trigger side-effect of default initialization before this type potentially overrides central
-        AntRepoSys.getInstance( project );
-    }
-
-    protected RemoteRepository getRef()
-    {
-        return (RemoteRepository) getCheckedRef();
-    }
-
-    public void validate( Task task )
-    {
-        if ( isReference() )
-        {
-            getRef().validate( task );
-        }
-        else
-        {
-            if ( url == null || url.length() <= 0 )
-            {
-                throw new BuildException( "You must specify the 'url' for a remote repository" );
-            }
-            if ( id == null || id.length() <= 0 )
-            {
-                throw new BuildException( "You must specify the 'id' for a remote repository" );
-            }
-        }
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( id != null || url != null || type != null || checksums != null || updates != null )
-        {
-            throw tooManyAttributes();
-        }
-        if ( releasePolicy != null || snapshotPolicy != null || authentication != null )
-        {
-            throw noChildrenAllowed();
-        }
-        super.setRefid( ref );
-    }
-
-    public String getId()
-    {
-        if ( isReference() )
-        {
-            return getRef().getId();
-        }
-        return id;
-    }
-
-    public void setId( String id )
-    {
-        this.id = id;
-    }
-
-    public String getUrl()
-    {
-        if ( isReference() )
-        {
-            return getRef().getUrl();
-        }
-        return url;
-    }
-
-    public void setUrl( String url )
-    {
-        checkAttributesAllowed();
-        this.url = url;
-    }
-
-    public String getType()
-    {
-        if ( isReference() )
-        {
-            return getRef().getType();
-        }
-        return ( type != null ) ? type : "default";
-    }
-
-    public void setType( String type )
-    {
-        checkAttributesAllowed();
-        this.type = type;
-    }
-
-    public Policy getReleasePolicy()
-    {
-        if ( isReference() )
-        {
-            return getRef().getReleasePolicy();
-        }
-        return releasePolicy;
-    }
-
-    public void addReleases( Policy policy )
-    {
-        checkChildrenAllowed();
-        if ( this.releasePolicy != null )
-        {
-            throw new BuildException( "You must not specify multiple <releases> elements" );
-        }
-        this.releasePolicy = policy;
-    }
-
-    public Policy getSnapshotPolicy()
-    {
-        if ( isReference() )
-        {
-            return getRef().getSnapshotPolicy();
-        }
-        return snapshotPolicy;
-    }
-
-    public void addSnapshots( Policy policy )
-    {
-        checkChildrenAllowed();
-        if ( this.snapshotPolicy != null )
-        {
-            throw new BuildException( "You must not specify multiple <snapshots> elements" );
-        }
-        this.snapshotPolicy = policy;
-    }
-
-    public boolean isReleases()
-    {
-        if ( isReference() )
-        {
-            return getRef().isReleases();
-        }
-        return releases;
-    }
-
-    public void setReleases( boolean releases )
-    {
-        checkAttributesAllowed();
-        this.releases = releases;
-    }
-
-    public boolean isSnapshots()
-    {
-        if ( isReference() )
-        {
-            return getRef().isSnapshots();
-        }
-        return snapshots;
-    }
-
-    public void setSnapshots( boolean snapshots )
-    {
-        checkAttributesAllowed();
-        this.snapshots = snapshots;
-    }
-
-    public String getUpdates()
-    {
-        if ( isReference() )
-        {
-            return getRef().getUpdates();
-        }
-        return ( updates != null ) ? updates : RepositoryPolicy.UPDATE_POLICY_DAILY;
-    }
-
-    public void setUpdates( String updates )
-    {
-        checkAttributesAllowed();
-        checkUpdates( updates );
-        this.updates = updates;
-    }
-
-    protected static void checkUpdates( String updates )
-    {
-        if ( !RepositoryPolicy.UPDATE_POLICY_ALWAYS.equals( updates )
-            && !RepositoryPolicy.UPDATE_POLICY_DAILY.equals( updates )
-            && !RepositoryPolicy.UPDATE_POLICY_NEVER.equals( updates )
-            && !updates.startsWith( RepositoryPolicy.UPDATE_POLICY_INTERVAL ) )
-        {
-            throw new BuildException( "'" + updates + "' is not a permitted update policy" );
-        }
-    }
-
-    public String getChecksums()
-    {
-        if ( isReference() )
-        {
-            return getRef().getChecksums();
-        }
-        return ( checksums != null ) ? checksums : RepositoryPolicy.CHECKSUM_POLICY_WARN;
-    }
-
-    public void setChecksums( String checksums )
-    {
-        checkAttributesAllowed();
-        checkChecksums( checksums );
-        this.checksums = checksums;
-    }
-
-    protected static void checkChecksums( String checksums )
-    {
-        if ( !RepositoryPolicy.CHECKSUM_POLICY_FAIL.equals( checksums )
-            && !RepositoryPolicy.CHECKSUM_POLICY_WARN.equals( checksums )
-            && !RepositoryPolicy.CHECKSUM_POLICY_IGNORE.equals( checksums ) )
-        {
-            throw new BuildException( "'" + checksums + "' is not a permitted checksum policy" );
-        }
-    }
-
-    public Authentication getAuthentication()
-    {
-        if ( isReference() )
-        {
-            return getRef().getAuthentication();
-        }
-        return authentication;
-    }
-
-    public void addAuthentication( Authentication authentication )
-    {
-        checkChildrenAllowed();
-        if ( this.authentication != null )
-        {
-            throw new BuildException( "You must not specify multiple <authentication> elements" );
-        }
-        this.authentication = authentication;
-    }
-
-    public void setAuthRef( Reference ref )
-    {
-        checkAttributesAllowed();
-        if ( authentication == null )
-        {
-            authentication = new Authentication();
-            authentication.setProject( getProject() );
-        }
-        authentication.setRefid( ref );
-    }
-
-    public List<RemoteRepository> getRepositories()
-    {
-        return Collections.singletonList( this );
-    }
-
-    /**
-     */
-    public static class Policy
-    {
-
-        private boolean enabled = true;
-
-        private String checksumPolicy;
-
-        private String updatePolicy;
-
-        public boolean isEnabled()
-        {
-            return enabled;
-        }
-
-        public void setEnabled( boolean enabled )
-        {
-            this.enabled = enabled;
-        }
-
-        public String getChecksums()
-        {
-            return checksumPolicy;
-        }
-
-        public void setChecksums( String checksumPolicy )
-        {
-            checkChecksums( checksumPolicy );
-            this.checksumPolicy = checksumPolicy;
-        }
-
-        public String getUpdates()
-        {
-            return updatePolicy;
-        }
-
-        public void setUpdates( String updatePolicy )
-        {
-            checkUpdates( updatePolicy );
-            this.updatePolicy = updatePolicy;
-        }
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositoryContainer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositoryContainer.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositoryContainer.java
deleted file mode 100644
index ab84a98..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositoryContainer.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.util.List;
-
-import org.apache.tools.ant.Task;
-
-/**
- */
-public interface RemoteRepositoryContainer
-{
-
-    void validate( Task task );
-
-    List<RemoteRepository> getRepositories();
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/Settings.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/Settings.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/Settings.java
deleted file mode 100644
index 5c77c43..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/Settings.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.io.File;
-
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class Settings
-    extends DataType
-{
-
-    private File file;
-
-    private File globalFile;
-
-    protected Settings getRef()
-    {
-        return (Settings) getCheckedRef();
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( file != null || globalFile != null )
-        {
-            throw tooManyAttributes();
-        }
-        super.setRefid( ref );
-    }
-
-    public File getFile()
-    {
-        if ( isReference() )
-        {
-            return getRef().getFile();
-        }
-        return file;
-    }
-
-    public void setFile( File file )
-    {
-        checkAttributesAllowed();
-        this.file = file;
-
-        AntRepoSys.getInstance( getProject() ).setUserSettings( file );
-    }
-
-    public File getGlobalFile()
-    {
-        if ( isReference() )
-        {
-            return getRef().getFile();
-        }
-        return globalFile;
-    }
-
-    public void setGlobalFile( File globalFile )
-    {
-        checkAttributesAllowed();
-        this.globalFile = globalFile;
-
-        AntRepoSys.getInstance( getProject() ).setGlobalSettings( globalFile );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/resources/org/apache/maven/resolver/ant/antlib.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/maven/resolver/ant/antlib.xml b/src/main/resources/org/apache/maven/resolver/ant/antlib.xml
deleted file mode 100644
index 0e47b30..0000000
--- a/src/main/resources/org/apache/maven/resolver/ant/antlib.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<antlib>
-
-  <typedef name="authentication"       classname="org.apache.maven.resolver.internal.ant.types.Authentication"/>
-  <typedef name="proxy"                classname="org.apache.maven.resolver.internal.ant.types.Proxy"/>
-  <typedef name="mirror"               classname="org.apache.maven.resolver.internal.ant.types.Mirror"/>
-  <typedef name="localrepo"            classname="org.apache.maven.resolver.internal.ant.types.LocalRepository"/>
-  <typedef name="remoterepo"           classname="org.apache.maven.resolver.internal.ant.types.RemoteRepository"/>
-  <typedef name="remoterepos"          classname="org.apache.maven.resolver.internal.ant.types.RemoteRepositories"/>
-  <typedef name="dependency"           classname="org.apache.maven.resolver.internal.ant.types.Dependency"/>
-  <typedef name="dependencies"         classname="org.apache.maven.resolver.internal.ant.types.Dependencies"/>
-  <typedef name="artifact"             classname="org.apache.maven.resolver.internal.ant.types.Artifact"/>
-  <typedef name="artifacts"            classname="org.apache.maven.resolver.internal.ant.types.Artifacts"/>
-  <typedef name="settings"             classname="org.apache.maven.resolver.internal.ant.types.Settings"/>
-
-  <taskdef name="resolve"              classname="org.apache.maven.resolver.internal.ant.tasks.Resolve"/>
-  <taskdef name="install"              classname="org.apache.maven.resolver.internal.ant.tasks.Install"/>
-  <taskdef name="deploy"               classname="org.apache.maven.resolver.internal.ant.tasks.Deploy"/>
-  <taskdef name="pom"                  classname="org.apache.maven.resolver.internal.ant.types.Pom"/>
-
-</antlib>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/site/markdown/index.md.vm
----------------------------------------------------------------------
diff --git a/src/site/markdown/index.md.vm b/src/site/markdown/index.md.vm
deleted file mode 100644
index 21d7689..0000000
--- a/src/site/markdown/index.md.vm
+++ /dev/null
@@ -1 +0,0 @@
-#include( "../../../README.md" )

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/site/resources/download.cgi
----------------------------------------------------------------------
diff --git a/src/site/resources/download.cgi b/src/site/resources/download.cgi
deleted file mode 100644
index 1b178d2..0000000
--- a/src/site/resources/download.cgi
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-#
-# 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.
-#
-# Just call the standard mirrors.cgi script. It will use download.html
-# as the input template.
-exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/site/site.xml
----------------------------------------------------------------------
diff --git a/src/site/site.xml b/src/site/site.xml
deleted file mode 100644
index 6ba57dc..0000000
--- a/src/site/site.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-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.
--->
-
-<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
-  name="Maven Resolver Ant Tasks">
-
-  <body>
-    <menu name="Overview">
-      <item name="Introduction" href="index.html"/>
-      <item name="JavaDocs" href="apidocs/index.html"/>
-      <item name="Source Xref" href="xref/index.html"/>
-      <!--item name="FAQ" href="faq.html"/-->
-      <item name="License" href="http://www.apache.org/licenses/"/>
-      <item name="Download" href="download.html"/>
-    </menu>
-    <menu name="See Also">
-      <item name="Maven Artifact Resolver" href="https://maven.apache.org/resolver/"/>
-      <item name="Maven Artifact Resolver Provider" href="https://maven.apache.org/ref/current/maven-resolver-provider/"/>
-    </menu>
-
-    <menu ref="reports"/>
-  </body>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/site/xdoc/download.xml.vm
----------------------------------------------------------------------
diff --git a/src/site/xdoc/download.xml.vm b/src/site/xdoc/download.xml.vm
deleted file mode 100644
index b37071a..0000000
--- a/src/site/xdoc/download.xml.vm
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.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.
--->
-
-<document>
-  <properties>
-    <title>Download ${project.name} Source</title>
-  </properties>
-  <body>
-    <section name="Download ${project.name} ${project.version} Source">
-
-      <p>${project.name} ${project.version} is distributed in source format. Use a source archive if you intend to build
-      ${project.name} yourself. Otherwise, simply use the ready-made binary artifacts from central repository.</p>
-
-      <p>You will be prompted for a mirror - if the file is not found on yours, please be patient, as it may take 24
-      hours to reach all mirrors.<p/>
-
-      <p>In order to guard against corrupted downloads/installations, it is highly recommended to
-      <a href="http://www.apache.org/dev/release-signing#verifying-signature">verify the signature</a>
-      of the release bundles against the public <a href="http://www.apache.org/dist/maven/KEYS">KEYS</a> used by the Apache Maven
-      developers.</p>
-
-      <p>${project.name} is distributed under the <a href="http://www.apache.org/licenses/">Apache License, version 2.0</a>.</p>
-
-      <p></p>We <b>strongly</b> encourage our users to configure a Maven repository mirror closer to their location, please read <a href="/guides/mini/guide-mirror-settings.html">How to Use Mirrors for Repositories</a>.</p>
-
-      <a name="mirror"/>
-      <subsection name="Mirror">
-
-        <p>
-          [if-any logo]
-          <a href="[link]">
-            <img align="right" src="[logo]" border="0"
-                 alt="logo"/>
-          </a>
-          [end]
-          The currently selected mirror is
-          <b>[preferred]</b>.
-          If you encounter a problem with this mirror,
-          please select another mirror.
-          If all mirrors are failing, there are
-          <i>backup</i>
-          mirrors
-          (at the end of the mirrors list) that should be available.
-        </p>
-
-        <form action="[location]" method="get" id="SelectMirror">
-          Other mirrors:
-          <select name="Preferred">
-            [if-any http]
-            [for http]
-            <option value="[http]">[http]</option>
-            [end]
-            [end]
-            [if-any ftp]
-            [for ftp]
-            <option value="[ftp]">[ftp]</option>
-            [end]
-            [end]
-            [if-any backup]
-            [for backup]
-            <option value="[backup]">[backup] (backup)</option>
-            [end]
-            [end]
-          </select>
-          <input type="submit" value="Change"/>
-        </form>
-
-        <p>
-          You may also consult the
-          <a href="http://www.apache.org/mirrors/">complete list of
-            mirrors.</a>
-        </p>
-
-      </subsection>
-      
-      <subsection name="${project.name} ${project.version}">
-        
-      <p>This is the current stable version of ${project.name}.</p>
-        
-      <table>
-        <thead>
-          <tr>
-            <th></th>
-            <th>Link</th>
-            <th>Checksum</th>
-            <th>Signature</th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr>
-            <td>${project.name} ${project.version} (Source zip)</td>
-            <td><a href="[preferred]maven/resolver/${project.artifactId}-${project.version}-source-release.zip">maven/resolver/${project.artifactId}-${project.version}-source-release.zip</a></td>
-            <td><a href="http://www.apache.org/dist/maven/resolver/${project.artifactId}-${project.version}-source-release.zip.md5">maven/resolver/${project.artifactId}-${project.version}-source-release.zip.md5</a></td>
-            <td><a href="http://www.apache.org/dist/maven/resolver/${project.artifactId}-${project.version}-source-release.zip.asc">maven/resolver/${project.artifactId}-${project.version}-source-release.zip.asc</a></td>
-          </tr>
-        </tbody>
-      </table>
-      </subsection>
-
-      <subsection name="Previous Versions">
-        
-      <p>Older non-recommended releases can be found on our <a href="http://archive.apache.org/dist/maven/resolver/">archive site</a>.</p>
-
-      </subsection>
-    </section>
-  </body>
-</document>
-

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/java/org/apache/maven/resolver/internal/ant/AntBuildsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/maven/resolver/internal/ant/AntBuildsTest.java b/src/test/java/org/apache/maven/resolver/internal/ant/AntBuildsTest.java
deleted file mode 100644
index aaf73da..0000000
--- a/src/test/java/org/apache/maven/resolver/internal/ant/AntBuildsTest.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.io.PrintStream;
-
-import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.BuildFileTest;
-import org.apache.tools.ant.DefaultLogger;
-import org.apache.tools.ant.Project;
-import org.eclipse.aether.internal.test.util.TestFileUtils;
-
-public abstract class AntBuildsTest
-    extends BuildFileTest
-{
-
-    private static final File BASE_DIR;
-
-    protected static final File BUILD_DIR;
-
-    static
-    {
-        BASE_DIR = new File( "" ).getAbsoluteFile();
-        BUILD_DIR = new File( BASE_DIR, "target/ant" );
-    }
-
-    protected File projectDir;
-
-    protected File localRepoDir;
-
-    protected File distRepoDir;
-
-    protected String getProjectDirName()
-    {
-        String name = getClass().getSimpleName();
-        if ( name.endsWith( "Test" ) )
-        {
-            name = name.substring( 0, name.length() - 4 );
-        }
-        return name;
-    }
-
-    protected void setUpProperties()
-        throws Exception
-    {
-        // hook for subclasses to set further system properties for the project to pick up
-    }
-
-    @Override
-    protected void setUp()
-        throws Exception
-    {
-        super.setUp();
-
-        TestFileUtils.deleteFile( BUILD_DIR );
-
-        projectDir = new File( new File( BASE_DIR, "src/test/resources/ant" ), getProjectDirName() );
-        localRepoDir = new File( BUILD_DIR, "local-repo" );
-        distRepoDir = new File( BUILD_DIR, "dist-repo" );
-
-        System.setProperty( "project.dir", projectDir.getAbsolutePath() );
-        System.setProperty( "build.dir", BUILD_DIR.getAbsolutePath() );
-        System.setProperty( "maven.repo.local", localRepoDir.getAbsolutePath() );
-        System.setProperty( "project.distrepo.url", distRepoDir.toURI().toString() );
-        setUpProperties();
-
-        configureProject( new File( projectDir, "ant.xml" ).getAbsolutePath(), Project.MSG_VERBOSE );
-    }
-
-    @Override
-    protected void tearDown()
-        throws Exception
-    {
-        try
-        {
-            ProjectWorkspaceReader.dropInstance();
-            TestFileUtils.deleteFile( BUILD_DIR );
-        }
-        finally
-        {
-            super.tearDown();
-        }
-    }
-
-    @Override
-    public void configureProject( String filename, int logLevel )
-        throws BuildException
-    {
-        super.configureProject( filename, logLevel );
-        DefaultLogger logger = new DefaultLogger()
-        {
-            @Override
-            protected void printMessage( String message, PrintStream stream, int priority )
-            {
-                message = System.currentTimeMillis() + " " + message;
-                super.printMessage( message, stream, priority );
-            }
-        };
-        logger.setMessageOutputLevel( logLevel );
-        logger.setOutputPrintStream( System.out );
-        logger.setErrorPrintStream( System.err );
-        getProject().addBuildListener( logger );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/java/org/apache/maven/resolver/internal/ant/DeployTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/maven/resolver/internal/ant/DeployTest.java b/src/test/java/org/apache/maven/resolver/internal/ant/DeployTest.java
deleted file mode 100644
index 203bdba..0000000
--- a/src/test/java/org/apache/maven/resolver/internal/ant/DeployTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import static org.hamcrest.MatcherAssert.*;
-import static org.hamcrest.Matchers.*;
-
-import java.io.File;
-import java.util.Arrays;
-
-/*
- * still missing:
- * - deploy snapshots/releases into correct repos
- */
-public class DeployTest
-    extends AntBuildsTest
-{
-
-    public void testDeployGlobalPom()
-    {
-        long min = System.currentTimeMillis();
-        executeTarget( "testDeployGlobalPom" );
-        long max = System.currentTimeMillis();
-
-        assertLogContaining( "Uploading" );
-        
-        assertUpdatedFile( min, max, distRepoDir, "test/dummy/0.1-SNAPSHOT/maven-metadata.xml" );
-    }
-
-    public void testDeployOverrideGlobalPom()
-    {
-        long min = System.currentTimeMillis();
-        executeTarget( "testDeployOverrideGlobalPom" );
-        long max = System.currentTimeMillis();
-
-        assertLogContaining( "Uploading" );
-
-        assertUpdatedFile( min, max, distRepoDir, "test/other/0.1-SNAPSHOT/maven-metadata.xml" );
-    }
-
-    public void testDeployOverrideGlobalPomByRef()
-    {
-        long min = System.currentTimeMillis();
-        executeTarget( "testDeployOverrideGlobalPomByRef" );
-        long max = System.currentTimeMillis();
-
-        assertLogContaining( "Uploading" );
-
-        assertUpdatedFile( min, max, distRepoDir, "test/dummy/0.1-SNAPSHOT/maven-metadata.xml" );
-        assertUpdatedFile( min, max, distRepoDir, "test/other/0.1-SNAPSHOT/maven-metadata.xml" );
-    }
-
-    public void testDeployAttachedArtifact()
-    {
-        executeTarget( "testDeployAttachedArtifact" );
-
-        assertLogContaining( "Uploading" );
-
-        File dir = new File(distRepoDir, "test/dummy/0.1-SNAPSHOT/" );
-        String[] files = dir.list();
-        assertThat( "attached artifact not found: " + Arrays.toString( files ), files,
-                    hasItemInArray( endsWith( "-ant.xml" ) ) );
-    }
-
-    private void assertUpdatedFile( long min, long max, File repoPath, String path )
-    {
-        File file = new File( repoPath, path );
-        min = (min / 1000) * 1000;
-        max = ((max + 999) / 1000) * 1000;
-        assertThat( "File does not exist in default repo: " + file.getAbsolutePath(), file.exists() );
-        assertThat( "Files were not updated for 1s before/after timestamp", file.lastModified(),
-                    allOf( greaterThanOrEqualTo( min ), lessThanOrEqualTo( max ) ) );
-    }
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/java/org/apache/maven/resolver/internal/ant/InstallTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/maven/resolver/internal/ant/InstallTest.java b/src/test/java/org/apache/maven/resolver/internal/ant/InstallTest.java
deleted file mode 100644
index bd3fcaa..0000000
--- a/src/test/java/org/apache/maven/resolver/internal/ant/InstallTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import static org.hamcrest.MatcherAssert.*;
-import static org.hamcrest.Matchers.*;
-
-import java.io.File;
-import java.io.IOException;
-
-public class InstallTest
-    extends AntBuildsTest
-{
-
-    public void testInstallGlobalPom()
-    {
-        executeTarget( "testInstallGlobalPom" );
-        long tstamp = System.currentTimeMillis();
-
-        assertLogContaining( "Installing" );
-        
-        assertUpdatedFile( tstamp, localRepoDir, "test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT.pom" );
-    }
-
-    public void testInstallOverrideGlobalPom()
-    {
-        executeTarget( "testInstallOverrideGlobalPom" );
-        long tstamp = System.currentTimeMillis();
-
-        assertLogContaining( "Installing" );
-
-        assertUpdatedFile( tstamp, localRepoDir, "test/other/0.1-SNAPSHOT/other-0.1-SNAPSHOT.pom" );
-    }
-
-    public void testInstallOverrideGlobalPomByRef()
-    {
-        long tstamp = System.currentTimeMillis();
-        executeTarget( "testInstallOverrideGlobalPomByRef" );
-
-        assertLogContaining( "Installing" );
-
-        assertUpdatedFile( tstamp, localRepoDir, "test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT.pom" );
-        assertUpdatedFile( tstamp, localRepoDir, "test/other/0.1-SNAPSHOT/other-0.1-SNAPSHOT.pom" );
-    }
-
-    public void testDefaultRepo()
-    {
-        executeTarget( "testDefaultRepo" );
-        long tstamp = System.currentTimeMillis();
-
-        assertLogContaining( "Installing" );
-
-        assertUpdatedFile( tstamp, localRepoDir, "test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT.pom" );
-        assertUpdatedFile( tstamp, localRepoDir, "test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT-ant.xml" );
-    }
-
-    public void testCustomRepo()
-        throws IOException
-    {
-        File repoPath = new File( BUILD_DIR, "local-repo-custom" );
-
-        executeTarget( "testCustomRepo" );
-        long tstamp = System.currentTimeMillis();
-
-        System.out.println( getLog() );
-        assertLogContaining( "Installing" );
-
-        assertUpdatedFile( tstamp, repoPath, "test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT.pom" );
-        assertUpdatedFile( tstamp, repoPath, "test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT-ant.xml" );
-    }
-
-    private void assertUpdatedFile( long tstamp, File repoPath, String path )
-    {
-        File file = new File( repoPath, path );
-        assertThat( "File does not exist in default repo: " + file.getAbsolutePath(), file.exists() );
-        assertThat( "Files were not updated for 1s before/after timestamp",
-                    file.lastModified(),
-                    allOf( greaterThanOrEqualTo( ( ( tstamp - 500 ) / 1000 ) * 1000 ),
-                           lessThanOrEqualTo( tstamp + 2000 ) ) );
-    }
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReaderTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReaderTest.java b/src/test/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReaderTest.java
deleted file mode 100644
index 0b7dfa3..0000000
--- a/src/test/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReaderTest.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
-import java.io.File;
-
-import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
-import org.apache.maven.resolver.internal.ant.types.Pom;
-import org.apache.tools.ant.Project;
-import org.junit.Before;
-import org.junit.Test;
-import org.eclipse.aether.artifact.Artifact;
-import org.eclipse.aether.artifact.DefaultArtifact;
-
-public class ProjectWorkspaceReaderTest
-{
-
-    private ProjectWorkspaceReader reader;
-
-    private Project project;
-
-    @Before
-    public void setUp()
-        throws Exception
-    {
-        this.reader = new ProjectWorkspaceReader();
-
-        this.project = new Project();
-        project.setProperty( "user.home", System.getProperty( "user.home" ) );
-    }
-
-    private Artifact artifact( String coords )
-    {
-        return new DefaultArtifact( coords );
-    }
-
-    private File getFile( String name )
-    {
-        return new File( "src/test/resources/ProjectWorkspaceReader", name );
-    }
-
-    @Test
-    public void testFindPom()
-    {
-        Pom pom = new Pom();
-        pom.setProject( project );
-        pom.setFile( getFile( "dummy-pom.xml" ) );
-
-        reader.addPom( pom );
-
-        assertEquals( pom.getFile(), reader.findArtifact( artifact( "test:dummy:pom:0.1-SNAPSHOT" ) ) );
-        assertNull( reader.findArtifact( artifact( "unavailable:test:pom:0.1-SNAPSHOT" ) ) );
-    }
-
-    @Test
-    public void testFindArtifact()
-    {
-        Pom pom = new Pom();
-        pom.setProject( project );
-        pom.setFile( getFile( "dummy-pom.xml" ) );
-
-        reader.addPom( pom );
-
-        org.apache.maven.resolver.internal.ant.types.Artifact artifact = new org.apache.maven.resolver.internal.ant.types.Artifact();
-        artifact.setProject( project );
-        artifact.addPom( pom );
-        artifact.setFile( getFile( "dummy-file.txt" ) );
-
-        reader.addArtifact( artifact );
-
-        assertEquals( artifact.getFile(), reader.findArtifact( artifact( "test:dummy:txt:0.1-SNAPSHOT" ) ) );
-        assertNull( reader.findArtifact( artifact( "unavailable:test:jar:0.1-SNAPSHOT" ) ) );
-    }
-
-    @Test
-    public void testFindVersions()
-    {
-        Pom pom1 = new Pom();
-        pom1.setProject( project );
-        pom1.setCoords( "test:dummy:1-SNAPSHOT" );
-
-        org.apache.maven.resolver.internal.ant.types.Artifact artifact1 = new org.apache.maven.resolver.internal.ant.types.Artifact();
-        artifact1.setProject( project );
-        artifact1.addPom( pom1 );
-        artifact1.setFile( getFile( "dummy-file.txt" ) );
-
-        reader.addArtifact( artifact1 );
-
-        Pom pom2 = new Pom();
-        pom2.setProject( project );
-        pom2.setCoords( "test:dummy:2-SNAPSHOT" );
-
-        org.apache.maven.resolver.internal.ant.types.Artifact artifact2 = new org.apache.maven.resolver.internal.ant.types.Artifact();
-        artifact2.setProject( project );
-        artifact2.addPom( pom2 );
-        artifact2.setFile( getFile( "dummy-file.txt" ) );
-
-        reader.addArtifact( artifact2 );
-
-        assertThat( reader.findVersions( artifact( "test:dummy:txt:[0,)" ) ),
-                    containsInAnyOrder( "1-SNAPSHOT", "2-SNAPSHOT" ) );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/java/org/apache/maven/resolver/internal/ant/ReactorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/maven/resolver/internal/ant/ReactorTest.java b/src/test/java/org/apache/maven/resolver/internal/ant/ReactorTest.java
deleted file mode 100644
index 6b33710..0000000
--- a/src/test/java/org/apache/maven/resolver/internal/ant/ReactorTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
-import org.eclipse.aether.artifact.Artifact;
-import org.eclipse.aether.artifact.DefaultArtifact;
-
-public class ReactorTest
-    extends AntBuildsTest
-{
-
-    private Artifact artifact( String coords )
-    {
-        return new DefaultArtifact( coords );
-    }
-
-    public void testPom()
-        throws IOException
-    {
-        executeTarget( "testPom" );
-        ProjectWorkspaceReader reader = ProjectWorkspaceReader.getInstance();
-        File found = reader.findArtifact( artifact( "test:test:pom:0.1-SNAPSHOT" ) );
-        assertNotNull( found );
-        assertEquals( new File( projectDir, "pom1.xml" ), found.getAbsoluteFile() );
-    }
-
-    public void testArtifact()
-        throws IOException
-    {
-        executeTarget( "testArtifact" );
-        ProjectWorkspaceReader reader = ProjectWorkspaceReader.getInstance();
-        File found = reader.findArtifact( artifact( "test:test:pom:0.1-SNAPSHOT" ) );
-        assertNotNull( found );
-        assertEquals( new File( projectDir, "pom1.xml" ), found.getAbsoluteFile() );
-
-        found = reader.findArtifact( artifact( "test:test:xml:0.1-SNAPSHOT" ) );
-        assertNotNull( found );
-        assertEquals( new File( projectDir, "pom1.xml" ), found.getAbsoluteFile() );
-    }
-
-    public void testArtifactInMemoryPom()
-        throws IOException
-    {
-        executeTarget( "testArtifactInMemoryPom" );
-        ProjectWorkspaceReader reader = ProjectWorkspaceReader.getInstance();
-        File found = reader.findArtifact( artifact( "test:test:pom:0.1-SNAPSHOT" ) );
-        assertNull( found );
-
-        found = reader.findArtifact( artifact( "test:test:xml:0.1-SNAPSHOT" ) );
-        assertNotNull( found );
-        assertEquals( new File( projectDir, "pom1.xml" ), found.getAbsoluteFile() );
-    }
-
-    public void testResolveArtifact()
-        throws IOException
-    {
-        executeTarget( "testResolveArtifact" );
-        String prop = project.getProperty( "resolve.test:test:jar" );
-        assertEquals( new File( projectDir, "pom1.xml" ).getAbsolutePath(), prop );
-    }
-
-    public void testResolveArtifactInMemoryPom()
-        throws IOException
-    {
-        executeTarget( "testResolveArtifactInMemoryPom" );
-        String prop = project.getProperty( "resolve.test:test:jar" );
-        assertEquals( new File( projectDir, "pom1.xml" ).getAbsolutePath(), prop );
-        assertLogContaining( "The POM for test:test:jar:0.1-SNAPSHOT is missing, no dependency information available" );
-    }
-
-    public void testResolveVersionRange()
-        throws IOException
-    {
-        executeTarget( "testResolveVersionRange" );
-        String prop = project.getProperty( "resolve.test:test:jar" );
-        assertEquals( new File( projectDir, "pom1.xml" ).getAbsolutePath(), prop );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/java/org/apache/maven/resolver/internal/ant/ResolveTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/maven/resolver/internal/ant/ResolveTest.java b/src/test/java/org/apache/maven/resolver/internal/ant/ResolveTest.java
deleted file mode 100644
index a736a74..0000000
--- a/src/test/java/org/apache/maven/resolver/internal/ant/ResolveTest.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import static org.hamcrest.MatcherAssert.*;
-import static org.hamcrest.Matchers.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.tools.ant.types.Path;
-import org.apache.tools.ant.types.ResourceCollection;
-import org.apache.tools.ant.types.resources.FileResource;
-
-public class ResolveTest
-    extends AntBuildsTest
-{
-
-    public void testResolveGlobalPom()
-    {
-        executeTarget( "testResolveGlobalPom" );
-
-        String prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-api:jar" );
-        assertThat( "aether-api was not resolved as a property", prop, notNullValue() );
-        assertThat( "aether-api was not resolved to default local repository", prop,
-                    allOf( containsString( "aether-api" ), endsWith( ".jar" ) ) );
-    }
-
-    public void testResolveOverrideGlobalPom()
-    {
-        executeTarget( "testResolveOverrideGlobalPom" );
-
-        String prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-api:jar" );
-        assertThat( "aether-api was not resolved as a property", prop, notNullValue() );
-        assertThat( "aether-api was not resolved to default local repository", prop,
-                    allOf( containsString( "aether-api" ), endsWith( ".jar" ) ) );
-    }
-
-    public void testResolveGlobalPomIntoOtherLocalRepo()
-    {
-        executeTarget( "testResolveGlobalPomIntoOtherLocalRepo" );
-
-        String prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-api:jar" );
-        assertThat( "aether-api was not resolved as a property", prop, notNullValue() );
-        assertThat( "aether-api was not resolved to default local repository", prop.replace( '\\', '/' ),
-                    endsWith( "local-repo-custom/org/eclipse/aether/aether-api/0.9.0.M3/aether-api-0.9.0.M3.jar" ) );
-    }
-
-    public void testResolveCustomFileLayout()
-        throws IOException
-    {
-        File dir = new File( BUILD_DIR, "resolve-custom-layout" );
-        executeTarget( "testResolveCustomFileLayout" );
-
-        assertThat( "aether-api was not saved with custom file layout",
-                    new File( dir, "org.eclipse.aether/aether-api/org/eclipse/aether/jar" ).exists() );
-    }
-
-    public void testResolveAttachments()
-        throws IOException
-    {
-        File dir = new File( BUILD_DIR, "resolve-attachments" );
-        executeTarget( "testResolveAttachments" );
-        
-        File jdocDir = new File(dir, "javadoc");
-        
-        assertThat( "aether-api-javadoc was not saved with custom file layout",
-                    new File( jdocDir, "org.eclipse.aether-aether-api-javadoc.jar" ).exists() );
-
-        assertThat( "found non-javadoc files", Arrays.asList( jdocDir.list() ), everyItem( endsWith( "javadoc.jar" ) ) );
-
-        File sourcesDir = new File( dir, "sources" );
-        assertThat( "aether-api-sources was not saved with custom file layout",
-                    new File( sourcesDir, "org.eclipse.aether-aether-api-sources.jar" ).exists() );
-        assertThat( "found non-sources files", Arrays.asList( sourcesDir.list() ),
-                    everyItem( endsWith( "sources.jar" ) ) );
-    }
-
-    public void testResolvePath()
-    {
-        executeTarget( "testResolvePath" );
-        Map<?, ?> refs = getProject().getReferences();
-        Object obj = refs.get( "out" );
-        assertThat( "ref 'out' is no path", obj, instanceOf( Path.class ) );
-        Path path = (Path) obj;
-        String[] elements = path.list();
-        assertThat( "no aether-api on classpath", elements,
-                    hasItemInArray( allOf( containsString( "aether-api" ), endsWith( ".jar" ) ) ) );
-    }
-
-    public void testResolveDepsFromFile()
-    {
-        executeTarget( "testResolveDepsFromFile" );
-
-        String prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-spi:jar" );
-        assertThat( "aether-spi was not resolved as a property", prop, notNullValue() );
-        assertThat( "aether-spi was not resolved to default local repository", prop,
-                    allOf( containsString( "aether-spi" ), endsWith( ".jar" ) ) );
-        prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-api:jar" );
-        assertThat( "aether-api was resolved as a property", prop, nullValue() );
-    }
-
-    public void testResolveNestedDependencyCollections()
-    {
-        executeTarget( "testResolveNestedDependencyCollections" );
-
-        String prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-spi:jar" );
-        assertThat( "aether-spi was not resolved as a property", prop, notNullValue() );
-        prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-util:jar" );
-        assertThat( "aether-util was not resolved as a property", prop, notNullValue() );
-        prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-api:jar" );
-        assertThat( "aether-api was resolved as a property", prop, nullValue() );
-    }
-
-    public void testResolveResourceCollectionOnly()
-    {
-        executeTarget( "testResolveResourceCollectionOnly" );
-
-        ResourceCollection resources = (ResourceCollection) getProject().getReference( "files" );
-        assertThat( resources, is( notNullValue() ) );
-        assertThat( resources.size(), is( 2 ) );
-        assertThat( resources.isFilesystemOnly(), is( true ) );
-        Iterator<?> it = resources.iterator();
-        FileResource file = (FileResource) it.next();
-        assertThat( file.getFile().getName(), is( "aether-spi-0.9.0.v20140226.jar" ) );
-        file = (FileResource) it.next();
-        assertThat( file.getFile().getName(), is( "aether-api-0.9.0.v20140226.jar" ) );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/java/org/apache/maven/resolver/internal/ant/SettingsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/maven/resolver/internal/ant/SettingsTest.java b/src/test/java/org/apache/maven/resolver/internal/ant/SettingsTest.java
deleted file mode 100644
index a22d573..0000000
--- a/src/test/java/org/apache/maven/resolver/internal/ant/SettingsTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import static org.hamcrest.MatcherAssert.*;
-import static org.hamcrest.Matchers.*;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-
-public class SettingsTest
-    extends AntBuildsTest
-{
-
-    public void testUserSettings()
-    {
-        executeTarget( "testUserSettings" );
-        assertThat( "user settings not set", AntRepoSys.getInstance( getProject() ).getUserSettings().getName(),
-                    equalTo( "userSettings.xml" ) );
-    }
-
-    public void testGlobalSettings()
-    {
-        executeTarget( "testGlobalSettings" );
-        assertThat( "global settings not set", AntRepoSys.getInstance( getProject() ).getGlobalSettings().getName(),
-                    equalTo( "globalSettings.xml" ) );
-    }
-
-    public void testBothSettings()
-    {
-        executeTarget( "testBothSettings" );
-        assertThat( "global settings not set", AntRepoSys.getInstance( getProject() ).getGlobalSettings().getName(),
-                    equalTo( "globalSettings.xml" ) );
-        assertThat( "user settings not set", AntRepoSys.getInstance( getProject() ).getUserSettings().getName(),
-                    equalTo( "userSettings.xml" ) );
-    }
-
-    public void testFallback()
-        throws IOException
-    {
-        executeTarget("setUp");
-        assertThat( "no fallback to local settings",
-                    AntRepoSys.getInstance( getProject() ).getUserSettings().getAbsolutePath(), endsWith( ".m2"
-                        + File.separator + "settings.xml" ) );
-    }
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/java/org/apache/maven/resolver/internal/ant/tasks/LayoutTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/maven/resolver/internal/ant/tasks/LayoutTest.java b/src/test/java/org/apache/maven/resolver/internal/ant/tasks/LayoutTest.java
deleted file mode 100644
index f79729b..0000000
--- a/src/test/java/org/apache/maven/resolver/internal/ant/tasks/LayoutTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.apache.maven.resolver.internal.ant.tasks;
-
-/*
- * 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.
- */
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.maven.resolver.internal.ant.tasks.Layout;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.aether.artifact.DefaultArtifact;
-import org.junit.Test;
-
-/**
- */
-public class LayoutTest
-{
-
-    @Test( expected = BuildException.class )
-    public void testUnknownVariable()
-    {
-        new Layout( "{unknown}" );
-    }
-
-    @Test
-    public void testGetPath()
-    {
-        Layout layout;
-
-        layout =
-            new Layout( "{groupIdDirs}/{artifactId}/{baseVersion}/{artifactId}-{version}-{classifier}.{extension}" );
-        assertEquals( "org/apache/maven/maven-model/3.0-SNAPSHOT/maven-model-3.0-20100720.132618-1.jar",
-                      layout.getPath( new DefaultArtifact( "org.apache.maven:maven-model:3.0-20100720.132618-1" ) ) );
-
-        layout = new Layout( "{groupId}/{artifactId}-{version}-{classifier}.{extension}" );
-        assertEquals( "org.apache.maven/maven-model-3.0-sources.jar",
-                      layout.getPath( new DefaultArtifact( "org.apache.maven:maven-model:jar:sources:3.0" ) ) );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/java/org/apache/maven/resolver/internal/ant/types/DependencyTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/maven/resolver/internal/ant/types/DependencyTest.java b/src/test/java/org/apache/maven/resolver/internal/ant/types/DependencyTest.java
deleted file mode 100644
index 10ca42b..0000000
--- a/src/test/java/org/apache/maven/resolver/internal/ant/types/DependencyTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import static org.junit.Assert.*;
-
-import org.apache.maven.resolver.internal.ant.types.Dependency;
-import org.junit.Test;
-
-/**
- */
-public class DependencyTest
-{
-
-    @Test
-    public void testSetCoordsGidAidVer()
-    {
-        Dependency dep = new Dependency();
-        dep.setCoords( "gid:aid:ver" );
-
-        assertEquals( "gid", dep.getGroupId() );
-        assertEquals( "aid", dep.getArtifactId() );
-        assertEquals( "ver", dep.getVersion() );
-        assertEquals( "jar", dep.getType() );
-        assertEquals( "", dep.getClassifier() );
-        assertEquals( "compile", dep.getScope() );
-    }
-
-    @Test
-    public void testSetCoordsGidAidVerScope()
-    {
-        Dependency dep = new Dependency();
-        dep.setCoords( "gid:aid:ver:scope" );
-
-        assertEquals( "gid", dep.getGroupId() );
-        assertEquals( "aid", dep.getArtifactId() );
-        assertEquals( "ver", dep.getVersion() );
-        assertEquals( "jar", dep.getType() );
-        assertEquals( "", dep.getClassifier() );
-        assertEquals( "scope", dep.getScope() );
-    }
-
-    @Test
-    public void testSetCoordsGidAidVerTypeScope()
-    {
-        Dependency dep = new Dependency();
-        dep.setCoords( "gid:aid:ver:type:scope" );
-
-        assertEquals( "gid", dep.getGroupId() );
-        assertEquals( "aid", dep.getArtifactId() );
-        assertEquals( "ver", dep.getVersion() );
-        assertEquals( "type", dep.getType() );
-        assertEquals( "", dep.getClassifier() );
-        assertEquals( "scope", dep.getScope() );
-    }
-
-    @Test
-    public void testSetCoordsGidAidVerTypeClsScope()
-    {
-        Dependency dep = new Dependency();
-        dep.setCoords( "gid:aid:ver:type:cls:scope" );
-
-        assertEquals( "gid", dep.getGroupId() );
-        assertEquals( "aid", dep.getArtifactId() );
-        assertEquals( "ver", dep.getVersion() );
-        assertEquals( "type", dep.getType() );
-        assertEquals( "cls", dep.getClassifier() );
-        assertEquals( "scope", dep.getScope() );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/java/org/apache/maven/resolver/internal/ant/types/ExclusionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/maven/resolver/internal/ant/types/ExclusionTest.java b/src/test/java/org/apache/maven/resolver/internal/ant/types/ExclusionTest.java
deleted file mode 100644
index 64d510f..0000000
--- a/src/test/java/org/apache/maven/resolver/internal/ant/types/ExclusionTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import static org.junit.Assert.*;
-
-import org.apache.maven.resolver.internal.ant.types.Exclusion;
-import org.junit.Test;
-
-/**
- */
-public class ExclusionTest
-{
-
-    @Test
-    public void testSetCoordsGid()
-    {
-        Exclusion ex = new Exclusion();
-        ex.setCoords( "gid" );
-
-        assertEquals( "gid", ex.getGroupId() );
-        assertEquals( "*", ex.getArtifactId() );
-        assertEquals( "*", ex.getExtension() );
-        assertEquals( "*", ex.getClassifier() );
-    }
-
-    @Test
-    public void testSetCoordsGidAid()
-    {
-        Exclusion ex = new Exclusion();
-        ex.setCoords( "gid:aid" );
-
-        assertEquals( "gid", ex.getGroupId() );
-        assertEquals( "aid", ex.getArtifactId() );
-        assertEquals( "*", ex.getExtension() );
-        assertEquals( "*", ex.getClassifier() );
-    }
-
-    @Test
-    public void testSetCoordsGidAidExt()
-    {
-        Exclusion ex = new Exclusion();
-        ex.setCoords( "gid:aid:ext" );
-
-        assertEquals( "gid", ex.getGroupId() );
-        assertEquals( "aid", ex.getArtifactId() );
-        assertEquals( "ext", ex.getExtension() );
-        assertEquals( "*", ex.getClassifier() );
-    }
-
-    @Test
-    public void testSetCoordsGidAidExtCls()
-    {
-        Exclusion ex = new Exclusion();
-        ex.setCoords( "gid:aid:ext:cls" );
-
-        assertEquals( "gid", ex.getGroupId() );
-        assertEquals( "aid", ex.getArtifactId() );
-        assertEquals( "ext", ex.getExtension() );
-        assertEquals( "cls", ex.getClassifier() );
-
-        ex = new Exclusion();
-        ex.setCoords( "gid:aid:ext:" );
-
-        assertEquals( "gid", ex.getGroupId() );
-        assertEquals( "aid", ex.getArtifactId() );
-        assertEquals( "ext", ex.getExtension() );
-        assertEquals( "", ex.getClassifier() );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/java/org/apache/maven/resolver/internal/ant/types/PomTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/maven/resolver/internal/ant/types/PomTest.java b/src/test/java/org/apache/maven/resolver/internal/ant/types/PomTest.java
deleted file mode 100644
index 35131b1..0000000
--- a/src/test/java/org/apache/maven/resolver/internal/ant/types/PomTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import static org.junit.Assert.*;
-
-import org.apache.maven.resolver.internal.ant.types.Pom;
-import org.junit.Test;
-
-/**
- */
-public class PomTest
-{
-
-    @Test
-    public void testSetCoordsGid()
-    {
-        Pom pom = new Pom();
-        pom.setCoords( "gid:aid:ver" );
-
-        assertEquals( "gid", pom.getGroupId() );
-        assertEquals( "aid", pom.getArtifactId() );
-        assertEquals( "ver", pom.getVersion() );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ProjectWorkspaceReader/dummy-file.txt
----------------------------------------------------------------------
diff --git a/src/test/resources/ProjectWorkspaceReader/dummy-file.txt b/src/test/resources/ProjectWorkspaceReader/dummy-file.txt
deleted file mode 100644
index b8a5cfa..0000000
--- a/src/test/resources/ProjectWorkspaceReader/dummy-file.txt
+++ /dev/null
@@ -1 +0,0 @@
-A test artifact.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ProjectWorkspaceReader/dummy-pom.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ProjectWorkspaceReader/dummy-pom.xml b/src/test/resources/ProjectWorkspaceReader/dummy-pom.xml
deleted file mode 100644
index 0041f8c..0000000
--- a/src/test/resources/ProjectWorkspaceReader/dummy-pom.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<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>test</groupId>
-  <artifactId>dummy</artifactId>
-  <version>0.1-SNAPSHOT</version>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Deploy/ant.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Deploy/ant.xml b/src/test/resources/ant/Deploy/ant.xml
deleted file mode 100644
index 2ad2d7a..0000000
--- a/src/test/resources/ant/Deploy/ant.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<!DOCTYPE project [
-       <!ENTITY common SYSTEM "../common.xml">
-]>
-
-<project xmlns:repo="antlib:org.apache.maven.resolver.ant">
-
-  &common;
-
-  <repo:remoterepo id="distrepo" url="${project.distrepo.url}" type="default" releases="true" snapshots="true" updates="always" checksums="fail"/>
-  
-  <target name="setUp">
-    <touch file="${project.dir}/dummy-pom.xml"/>
-    <touch file="${project.dir}/other-pom.xml"/>
-    <touch file="${project.dir}/ant.xml"/>
-  </target>
-  
-  <target name="testDeployGlobalPom" depends="setUp">
-    <repo:pom file="${project.dir}/dummy-pom.xml"/>
-    <repo:deploy remotereporef="distrepo"/>
-  </target>
-  
-  <target name="testDeployOverrideGlobalPom" depends="setUp">
-    <repo:pom file="${project.dir}/dummy-pom.xml"/>
-    <repo:deploy remotereporef="distrepo">
-      <pom file="${project.dir}/other-pom.xml"/>
-    </repo:deploy>
-  </target>
-  
-  <target name="testDeployOverrideGlobalPomByRef" depends="setUp">
-    <repo:pom file="${project.dir}/dummy-pom.xml"/>
-    <repo:pom file="${project.dir}/other-pom.xml" id="other"/>
-    <repo:deploy remotereporef="distrepo"/>
-    <repo:deploy pomref="other" remotereporef="distrepo"/>
-  </target>
-  
-  <target name="testDeployAttachedArtifact" depends="setUp">
-    <repo:pom file="${project.dir}/dummy-pom.xml"/>
-    <repo:artifact classifier="ant" file="${project.dir}/ant.xml" id="ant"/>
-    <repo:deploy remotereporef="distrepo">
-      <repo:artifact refid="ant"/>
-    </repo:deploy>
-  </target>
-
-  <target name="testInlineRepo" depends="setUp">
-    <repo:localrepo dir="${build.dir}/local-repo-custom" />
-    <repo:deploy pomref="pom" remotereporef="distrepo">
-      <repo:artifact refid="ant"/>
-    </repo:deploy>
-  </target>
-
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Deploy/dummy-pom.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Deploy/dummy-pom.xml b/src/test/resources/ant/Deploy/dummy-pom.xml
deleted file mode 100644
index 0041f8c..0000000
--- a/src/test/resources/ant/Deploy/dummy-pom.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<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>test</groupId>
-  <artifactId>dummy</artifactId>
-  <version>0.1-SNAPSHOT</version>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/test/resources/ant/Deploy/other-pom.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/ant/Deploy/other-pom.xml b/src/test/resources/ant/Deploy/other-pom.xml
deleted file mode 100644
index 626bede..0000000
--- a/src/test/resources/ant/Deploy/other-pom.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<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>test</groupId>
-  <artifactId>other</artifactId>
-  <version>0.1-SNAPSHOT</version>
-
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
-</project>

Reply | Threaded
Open this post in threaded view
|

[3/9] maven-resolver git commit: moved ant tasks into subfolder

mmoser
In reply to this post by mmoser
http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Install.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Install.java b/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Install.java
deleted file mode 100644
index b79716b..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Install.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.apache.maven.resolver.internal.ant.tasks;
-
-/*
- * 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.
- */
-
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-
-import org.apache.tools.ant.BuildException;
-
-/**
- */
-public class Install
-    extends AbstractDistTask
-{
-
-    @Override
-    public void execute()
-        throws BuildException
-    {
-        validate();
-
-        AntRepoSys.getInstance( getProject() ).install( this, getPom(), getArtifacts() );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Layout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Layout.java b/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Layout.java
deleted file mode 100644
index 995c00f..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Layout.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package org.apache.maven.resolver.internal.ant.tasks;
-
-/*
- * 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.
- */
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.TreeSet;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.tools.ant.BuildException;
-import org.eclipse.aether.artifact.Artifact;
-
-/**
- */
-class Layout
-{
-
-    public static final String GID = "{groupId}";
-
-    public static final String GID_DIRS = "{groupIdDirs}";
-
-    public static final String AID = "{artifactId}";
-
-    public static final String VER = "{version}";
-
-    public static final String BVER = "{baseVersion}";
-
-    public static final String EXT = "{extension}";
-
-    public static final String CLS = "{classifier}";
-
-    private String[] tokens;
-
-    public Layout( String layout )
-        throws BuildException
-    {
-        Collection<String> valid = new HashSet<String>( Arrays.asList( GID, GID_DIRS, AID, VER, BVER, EXT, CLS ) );
-        List<String> tokens = new ArrayList<String>();
-        Matcher m = Pattern.compile( "(\\{[^}]*\\})|([^{]+)" ).matcher( layout );
-        while ( m.find() )
-        {
-            if ( m.group( 1 ) != null && !valid.contains( m.group( 1 ) ) )
-            {
-                throw new BuildException( "Invalid variable '" + m.group() + "' in layout, supported variables are "
-                    + new TreeSet<String>( valid ) );
-            }
-            tokens.add( m.group() );
-        }
-        this.tokens = tokens.toArray( new String[tokens.size()] );
-    }
-
-    public String getPath( Artifact artifact )
-    {
-        StringBuilder buffer = new StringBuilder( 128 );
-
-        for ( int i = 0; i < tokens.length; i++ )
-        {
-            String token = tokens[i];
-            if ( GID.equals( token ) )
-            {
-                buffer.append( artifact.getGroupId() );
-            }
-            else if ( GID_DIRS.equals( token ) )
-            {
-                buffer.append( artifact.getGroupId().replace( '.', '/' ) );
-            }
-            else if ( AID.equals( token ) )
-            {
-                buffer.append( artifact.getArtifactId() );
-            }
-            else if ( VER.equals( token ) )
-            {
-                buffer.append( artifact.getVersion() );
-            }
-            else if ( BVER.equals( token ) )
-            {
-                buffer.append( artifact.getBaseVersion() );
-            }
-            else if ( CLS.equals( token ) )
-            {
-                if ( artifact.getClassifier().length() <= 0 )
-                {
-                    if ( i > 0 )
-                    {
-                        String lt = tokens[i - 1];
-                        if ( lt.length() > 0 && "-_".indexOf( lt.charAt( lt.length() - 1 ) ) >= 0 )
-                        {
-                            buffer.setLength( buffer.length() - 1 );
-                        }
-                    }
-                }
-                else
-                {
-                    buffer.append( artifact.getClassifier() );
-                }
-            }
-            else if ( EXT.equals( token ) )
-            {
-                buffer.append( artifact.getExtension() );
-            }
-            else
-            {
-                buffer.append( token );
-            }
-        }
-
-        return buffer.toString();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/tasks/RefTask.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/RefTask.java b/src/main/java/org/apache/maven/resolver/internal/ant/tasks/RefTask.java
deleted file mode 100644
index 02e7083..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/RefTask.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package org.apache.maven.resolver.internal.ant.tasks;
-
-/*
- * 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.
- */
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.ComponentHelper;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public abstract class RefTask
-    extends Task
-{
-
-    private Reference ref;
-
-    public boolean isReference()
-    {
-        return ref != null;
-    }
-
-    public void setRefid( final Reference ref )
-    {
-        this.ref = ref;
-    }
-
-    protected void checkAttributesAllowed()
-    {
-        if ( isReference() )
-        {
-            throw tooManyAttributes();
-        }
-    }
-
-    protected void checkChildrenAllowed()
-    {
-        if ( isReference() )
-        {
-            throw noChildrenAllowed();
-        }
-    }
-
-    protected BuildException tooManyAttributes()
-    {
-        return new BuildException( "You must not specify more than one " + "attribute when using refid" );
-    }
-
-    protected BuildException noChildrenAllowed()
-    {
-        return new BuildException( "You must not specify nested elements " + "when using refid" );
-    }
-
-    protected String getDataTypeName()
-    {
-        return ComponentHelper.getElementName( getProject(), this, true );
-    }
-
-    protected Object getCheckedRef()
-    {
-        return getCheckedRef( getClass(), getDataTypeName(), getProject() );
-    }
-
-    protected Object getCheckedRef( final Class<?> requiredClass, final String dataTypeName, final Project project )
-    {
-        if ( project == null )
-        {
-            throw new BuildException( "No Project specified" );
-        }
-        Object o = ref.getReferencedObject( project );
-        if ( !( requiredClass.isAssignableFrom( o.getClass() ) ) )
-        {
-            log( "Class " + o.getClass() + " is not a subclass of " + requiredClass, Project.MSG_VERBOSE );
-            String msg = ref.getRefId() + " doesn\'t denote a " + dataTypeName;
-            throw new BuildException( msg );
-        }
-        return o;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Resolve.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Resolve.java b/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Resolve.java
deleted file mode 100644
index da37563..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Resolve.java
+++ /dev/null
@@ -1,585 +0,0 @@
-package org.apache.maven.resolver.internal.ant.tasks;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-import org.apache.maven.resolver.internal.ant.Names;
-import org.apache.maven.resolver.internal.ant.types.Dependencies;
-import org.apache.maven.resolver.internal.ant.types.Pom;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.ProjectComponent;
-import org.apache.tools.ant.types.FileSet;
-import org.apache.tools.ant.types.Reference;
-import org.apache.tools.ant.types.resources.FileResource;
-import org.apache.tools.ant.types.resources.Resources;
-import org.apache.tools.ant.util.FileUtils;
-import org.eclipse.aether.RepositorySystem;
-import org.eclipse.aether.RepositorySystemSession;
-import org.eclipse.aether.artifact.Artifact;
-import org.eclipse.aether.graph.DependencyFilter;
-import org.eclipse.aether.graph.DependencyNode;
-import org.eclipse.aether.resolution.ArtifactRequest;
-import org.eclipse.aether.resolution.ArtifactResolutionException;
-import org.eclipse.aether.resolution.ArtifactResult;
-import org.eclipse.aether.util.artifact.SubArtifact;
-import org.eclipse.aether.util.filter.ScopeDependencyFilter;
-
-/**
- */
-public class Resolve
-    extends AbstractResolvingTask
-{
-
-    private List<ArtifactConsumer> consumers = new ArrayList<ArtifactConsumer>();
-
-    private boolean failOnMissingAttachments;
-
-    public void setFailOnMissingAttachments( boolean failOnMissingAttachments )
-    {
-        this.failOnMissingAttachments = failOnMissingAttachments;
-    }
-
-    public Path createPath()
-    {
-        Path path = new Path();
-        consumers.add( path );
-        return path;
-    }
-
-    public Files createFiles()
-    {
-        Files files = new Files();
-        consumers.add( files );
-        return files;
-    }
-
-    public Props createProperties()
-    {
-        Props props = new Props();
-        consumers.add( props );
-        return props;
-    }
-
-    private void validate()
-    {
-        for ( ArtifactConsumer consumer : consumers )
-        {
-            consumer.validate();
-        }
-
-        Pom pom = AntRepoSys.getInstance( getProject() ).getDefaultPom();
-        if ( dependencies == null && pom != null )
-        {
-            log( "Using default pom for dependency resolution (" + pom.toString() + ")", Project.MSG_INFO );
-            dependencies = new Dependencies();
-            dependencies.setProject( getProject() );
-            getProject().addReference( Names.ID_DEFAULT_POM, pom );
-            dependencies.setPomRef( new Reference( getProject(), Names.ID_DEFAULT_POM ) );
-        }
-
-        if ( dependencies != null )
-        {
-            dependencies.validate( this );
-        }
-        else
-        {
-            throw new BuildException( "No <dependencies> set for resolution" );
-        }
-    }
-
-    @Override
-    public void execute()
-        throws BuildException
-    {
-        validate();
-
-
-        AntRepoSys sys = AntRepoSys.getInstance( getProject() );
-
-        RepositorySystemSession session = sys.getSession( this, localRepository );
-        RepositorySystem system = sys.getSystem();
-        log( "Using local repository " + session.getLocalRepository(), Project.MSG_VERBOSE );
-
-        DependencyNode root = collectDependencies().getRoot();
-        root.accept( new DependencyGraphLogger( this ) );
-
-        Map<String, Group> groups = new HashMap<String, Group>();
-        for ( ArtifactConsumer consumer : consumers )
-        {
-            String classifier = consumer.getClassifier();
-            Group group = groups.get( classifier );
-            if ( group == null )
-            {
-                group = new Group( classifier );
-                groups.put( classifier, group );
-            }
-            group.add( consumer );
-        }
-
-        for ( Group group : groups.values() )
-        {
-            group.createRequests( root );
-        }
-
-        log( "Resolving artifacts", Project.MSG_INFO );
-
-        for ( Group group : groups.values() )
-        {
-            List<ArtifactResult> results;
-            try
-            {
-                results = system.resolveArtifacts( session, group.getRequests() );
-            }
-            catch ( ArtifactResolutionException e )
-            {
-                if ( !group.isAttachments() || failOnMissingAttachments )
-                {
-                    throw new BuildException( "Could not resolve artifacts: " + e.getMessage(), e );
-                }
-                results = e.getResults();
-                for ( ArtifactResult result : results )
-                {
-                    if ( result.isMissing() )
-                    {
-                        log( "Ignoring missing attachment " + result.getRequest().getArtifact(), Project.MSG_VERBOSE );
-                    }
-                    else if ( !result.isResolved() )
-                    {
-                        throw new BuildException( "Could not resolve artifacts: " + e.getMessage(), e );
-                    }
-                }
-            }
-
-            group.processResults( results, session );
-        }
-    }
-
-    /**
-     */
-    public abstract static class ArtifactConsumer
-        extends ProjectComponent
-    {
-
-        private DependencyFilter filter;
-
-        public boolean accept( org.eclipse.aether.graph.DependencyNode node, List<DependencyNode> parents )
-        {
-            return filter == null || filter.accept( node, parents );
-        }
-
-        public String getClassifier()
-        {
-            return null;
-        }
-
-        public void validate()
-        {
-
-        }
-
-        public abstract void process( Artifact artifact, RepositorySystemSession session );
-
-        public void setScopes( String scopes )
-        {
-            if ( filter != null )
-            {
-                throw new BuildException( "You must not specify both 'scopes' and 'classpath'" );
-            }
-
-            Collection<String> included = new HashSet<String>();
-            Collection<String> excluded = new HashSet<String>();
-
-            String[] split = scopes.split( "[, ]" );
-            for ( String scope : split )
-            {
-                scope = scope.trim();
-                Collection<String> dst;
-                if ( scope.startsWith( "-" ) || scope.startsWith( "!" ) )
-                {
-                    dst = excluded;
-                    scope = scope.substring( 1 );
-                }
-                else
-                {
-                    dst = included;
-                }
-                if ( scope.length() > 0 )
-                {
-                    dst.add( scope );
-                }
-            }
-
-            filter = new ScopeDependencyFilter( included, excluded );
-        }
-
-        public void setClasspath( String classpath )
-        {
-            if ( "compile".equals( classpath ) )
-            {
-                setScopes( "provided,system,compile" );
-            }
-            else if ( "runtime".equals( classpath ) )
-            {
-                setScopes( "compile,runtime" );
-            }
-            else if ( "test".equals( classpath ) )
-            {
-                setScopes( "provided,system,compile,runtime,test" );
-            }
-            else
-            {
-                throw new BuildException( "The classpath '" + classpath + "' is not defined"
-                    + ", must be one of 'compile', 'runtime' or 'test'" );
-            }
-        }
-
-    }
-
-    /**
-     */
-    public class Path
-        extends ArtifactConsumer
-    {
-
-        private String refid;
-
-        private org.apache.tools.ant.types.Path path;
-
-        public void setRefId( String refId )
-        {
-            this.refid = refId;
-        }
-
-        public void validate()
-        {
-            if ( refid == null )
-            {
-                throw new BuildException( "You must specify the 'refid' for the path" );
-            }
-        }
-
-        public void process( Artifact artifact, RepositorySystemSession session )
-        {
-            if ( path == null )
-            {
-                path = new org.apache.tools.ant.types.Path( getProject() );
-                getProject().addReference( refid, path );
-            }
-            path.setLocation( artifact.getFile() );
-        }
-
-    }
-
-    /**
-     */
-    public class Files
-        extends ArtifactConsumer
-    {
-
-        private static final String DEFAULT_LAYOUT = Layout.GID_DIRS + "/" + Layout.AID + "/" + Layout.BVER + "/"
-            + Layout.AID + "-" + Layout.VER + "-" + Layout.CLS + "." + Layout.EXT;
-
-        private String refid;
-
-        private String classifier;
-
-        private File dir;
-
-        private Layout layout;
-
-        private FileSet fileset;
-
-        private Resources resources;
-
-        public void setRefId( String refId )
-        {
-            this.refid = refId;
-        }
-
-        public String getClassifier()
-        {
-            return classifier;
-        }
-
-        public void setAttachments( String attachments )
-        {
-            if ( "sources".equals( attachments ) )
-            {
-                classifier = "*-sources";
-            }
-            else if ( "javadoc".equals( attachments ) )
-            {
-                classifier = "*-javadoc";
-            }
-            else
-            {
-                throw new BuildException( "The attachment type '" + attachments
-                    + "' is not defined, must be one of 'sources' or 'javadoc'" );
-            }
-        }
-
-        public void setDir( File dir )
-        {
-            this.dir = dir;
-            if ( dir != null && layout == null )
-            {
-                layout = new Layout( DEFAULT_LAYOUT );
-            }
-        }
-
-        public void setLayout( String layout )
-        {
-            this.layout = new Layout( layout );
-        }
-
-        public void validate()
-        {
-            if ( refid == null && dir == null )
-            {
-                throw new BuildException( "You must either specify the 'refid' for the resource collection"
-                    + " or a 'dir' to copy the files to" );
-            }
-            if ( dir == null && layout != null )
-            {
-                throw new BuildException( "You must not specify a 'layout' unless 'dir' is also specified" );
-            }
-        }
-
-        public void process( Artifact artifact, RepositorySystemSession session )
-        {
-            if ( dir != null )
-            {
-                if ( refid != null && fileset == null )
-                {
-                    fileset = new FileSet();
-                    fileset.setProject( getProject() );
-                    fileset.setDir( dir );
-                    getProject().addReference( refid, fileset );
-                }
-
-                String path = layout.getPath( artifact );
-
-                if ( fileset != null )
-                {
-                    fileset.createInclude().setName( path );
-                }
-
-                File src = artifact.getFile();
-                File dst = new File( dir, path );
-
-                if ( src.lastModified() != dst.lastModified() || src.length() != dst.length() )
-                {
-                    try
-                    {
-                        Resolve.this.log( "Copy " + src + " to " + dst, Project.MSG_VERBOSE );
-                        FileUtils.getFileUtils().copyFile( src, dst, null, true, true );
-                    }
-                    catch ( IOException e )
-                    {
-                        throw new BuildException( "Failed to copy artifact file " + src + " to " + dst + ": "
-                            + e.getMessage(), e );
-                    }
-                }
-                else
-                {
-                    Resolve.this.log( "Omit to copy " + src + " to " + dst + ", seems unchanged", Project.MSG_VERBOSE );
-                }
-            }
-            else
-            {
-                if ( resources == null )
-                {
-                    resources = new Resources();
-                    resources.setProject( getProject() );
-                    getProject().addReference( refid, resources );
-                }
-
-                FileResource resource = new FileResource( artifact.getFile() );
-                resource.setBaseDir( session.getLocalRepository().getBasedir() );
-                resource.setProject( getProject() );
-                resources.add( resource );
-            }
-        }
-
-    }
-
-    /**
-     */
-    public class Props
-        extends ArtifactConsumer
-    {
-
-        private String prefix;
-
-        private String classifier;
-
-        public void setPrefix( String prefix )
-        {
-            this.prefix = prefix;
-        }
-
-        public String getClassifier()
-        {
-            return classifier;
-        }
-
-        public void setAttachments( String attachments )
-        {
-            if ( "sources".equals( attachments ) )
-            {
-                classifier = "*-sources";
-            }
-            else if ( "javadoc".equals( attachments ) )
-            {
-                classifier = "*-javadoc";
-            }
-            else
-            {
-                throw new BuildException( "The attachment type '" + attachments
-                    + "' is not defined, must be one of 'sources' or 'javadoc'" );
-            }
-        }
-
-        public void process( Artifact artifact, RepositorySystemSession session )
-        {
-            StringBuilder buffer = new StringBuilder( 256 );
-            if ( prefix != null && prefix.length() > 0 )
-            {
-                buffer.append( prefix );
-                if ( !prefix.endsWith( "." ) )
-                {
-                    buffer.append( '.' );
-                }
-            }
-            buffer.append( artifact.getGroupId() );
-            buffer.append( ':' );
-            buffer.append( artifact.getArtifactId() );
-            buffer.append( ':' );
-            buffer.append( artifact.getExtension() );
-            if ( artifact.getClassifier().length() > 0 )
-            {
-                buffer.append( ':' );
-                buffer.append( artifact.getClassifier() );
-            }
-
-            String path = artifact.getFile().getAbsolutePath();
-
-            getProject().setProperty( buffer.toString(), path );
-        }
-
-    }
-
-    private static class Group
-    {
-
-        private String classifier;
-
-        private List<ArtifactConsumer> consumers = new ArrayList<ArtifactConsumer>();
-
-        private List<ArtifactRequest> requests = new ArrayList<ArtifactRequest>();
-
-        public Group( String classifier )
-        {
-            this.classifier = classifier;
-        }
-
-        public boolean isAttachments()
-        {
-            return classifier != null;
-        }
-
-        public void add( ArtifactConsumer consumer )
-        {
-            consumers.add( consumer );
-        }
-
-        public void createRequests( DependencyNode node )
-        {
-            createRequests( node, new LinkedList<DependencyNode>() );
-        }
-
-        private void createRequests( DependencyNode node, LinkedList<DependencyNode> parents )
-        {
-            if ( node.getDependency() != null )
-            {
-                for ( ArtifactConsumer consumer : consumers )
-                {
-                    if ( consumer.accept( node, parents ) )
-                    {
-                        ArtifactRequest request = new ArtifactRequest( node );
-                        if ( classifier != null )
-                        {
-                            request.setArtifact( new SubArtifact( request.getArtifact(), classifier, "jar" ) );
-                        }
-                        requests.add( request );
-                        break;
-                    }
-                }
-            }
-
-            parents.addFirst( node );
-
-            for ( DependencyNode child : node.getChildren() )
-            {
-                createRequests( child, parents );
-            }
-
-            parents.removeFirst();
-        }
-
-        public List<ArtifactRequest> getRequests()
-        {
-            return requests;
-        }
-
-        public void processResults( List<ArtifactResult> results, RepositorySystemSession session )
-        {
-            for ( ArtifactResult result : results )
-            {
-                if ( !result.isResolved() )
-                {
-                    continue;
-                }
-                for ( ArtifactConsumer consumer : consumers )
-                {
-                    if ( consumer.accept( result.getRequest().getDependencyNode(),
-                                          Collections.<DependencyNode>emptyList() ) )
-                    {
-                        consumer.process( result.getArtifact(), session );
-                    }
-                }
-            }
-        }
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifact.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifact.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifact.java
deleted file mode 100644
index 7a5d054..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifact.java
+++ /dev/null
@@ -1,181 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
-import org.apache.maven.resolver.internal.ant.tasks.RefTask;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class Artifact
-    extends RefTask
-    implements ArtifactContainer
-{
-
-    private File file;
-
-    private String type;
-
-    private String classifier;
-
-    private Pom pom;
-
-    protected Artifact getRef()
-    {
-        return (Artifact) getCheckedRef();
-    }
-
-    public void validate( Task task )
-    {
-        if ( isReference() )
-        {
-            getRef().validate( task );
-        }
-        else
-        {
-            if ( file == null )
-            {
-                throw new BuildException( "You must specify the 'file' for the artifact" );
-            }
-            else if ( !file.isFile() )
-            {
-                throw new BuildException( "The artifact file " + file + " does not exist" );
-            }
-            if ( type == null || type.length() <= 0 )
-            {
-                throw new BuildException( "You must specify the 'type' for the artifact" );
-            }
-        }
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( file != null || type != null || classifier != null )
-        {
-            throw tooManyAttributes();
-        }
-        super.setRefid( ref );
-    }
-
-    public File getFile()
-    {
-        if ( isReference() )
-        {
-            return getRef().getFile();
-        }
-        return file;
-    }
-
-    public void setFile( File file )
-    {
-        checkAttributesAllowed();
-        this.file = file;
-
-        if ( file != null && type == null )
-        {
-            String name = file.getName();
-            int period = name.lastIndexOf( '.' );
-            if ( period >= 0 )
-            {
-                type = name.substring( period + 1 );
-            }
-        }
-    }
-
-    public String getType()
-    {
-        if ( isReference() )
-        {
-            return getRef().getType();
-        }
-        return ( type != null ) ? type : "jar";
-    }
-
-    public void setType( String type )
-    {
-        checkAttributesAllowed();
-        this.type = type;
-    }
-
-    public String getClassifier()
-    {
-        if ( isReference() )
-        {
-            return getRef().getClassifier();
-        }
-        return ( classifier != null ) ? classifier : "";
-    }
-
-    public void setClassifier( String classifier )
-    {
-        checkAttributesAllowed();
-        this.classifier = classifier;
-    }
-
-    public void setPomRef( Reference ref )
-    {
-        checkAttributesAllowed();
-        Pom pom = new Pom();
-        pom.setProject( getProject() );
-        pom.setRefid( ref );
-        this.pom = pom;
-    }
-
-    public void addPom( Pom pom )
-    {
-        checkChildrenAllowed();
-        this.pom = pom;
-    }
-
-    public Pom getPom()
-    {
-        if ( isReference() )
-        {
-            return getRef().getPom();
-        }
-        return pom;
-    }
-
-    public List<Artifact> getArtifacts()
-    {
-        return Collections.singletonList( this );
-    }
-
-    @Override
-    public void execute()
-        throws BuildException
-    {
-        ProjectWorkspaceReader.getInstance().addArtifact( this );
-    }
-
-    public String toString()
-    {
-        String pomRepr = getPom() != null ? "(" + getPom().toString() + ":)" : "";
-        return String.format( pomRepr + "%s:%s", getType(), getClassifier() );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/ArtifactContainer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/ArtifactContainer.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/ArtifactContainer.java
deleted file mode 100644
index d447808..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/ArtifactContainer.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.util.List;
-
-import org.apache.tools.ant.Task;
-
-/**
- */
-public interface ArtifactContainer
-{
-
-    void validate( Task task );
-
-    List<Artifact> getArtifacts();
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifacts.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifacts.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifacts.java
deleted file mode 100644
index 85f8b78..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifacts.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class Artifacts
-    extends DataType
-    implements ArtifactContainer
-{
-
-    private List<ArtifactContainer> containers = new ArrayList<ArtifactContainer>();
-
-    protected Artifacts getRef()
-    {
-        return (Artifacts) getCheckedRef();
-    }
-
-    public void validate( Task task )
-    {
-        if ( isReference() )
-        {
-            getRef().validate( task );
-        }
-        else
-        {
-            for ( ArtifactContainer container : containers )
-            {
-                container.validate( task );
-            }
-        }
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( !containers.isEmpty() )
-        {
-            throw noChildrenAllowed();
-        }
-        super.setRefid( ref );
-    }
-
-    public void addArtifact( Artifact artifact )
-    {
-        checkChildrenAllowed();
-        containers.add( artifact );
-    }
-
-    public void addArtifacts( Artifacts artifacts )
-    {
-        checkChildrenAllowed();
-        if ( artifacts == this )
-        {
-            throw circularReference();
-        }
-        containers.add( artifacts );
-    }
-
-    public List<Artifact> getArtifacts()
-    {
-        if ( isReference() )
-        {
-            return getRef().getArtifacts();
-        }
-        List<Artifact> artifacts = new ArrayList<Artifact>();
-        for ( ArtifactContainer container : containers )
-        {
-            artifacts.addAll( container.getArtifacts() );
-        }
-        return artifacts;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/Authentication.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/Authentication.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/Authentication.java
deleted file mode 100644
index 6d212fc..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/Authentication.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class Authentication
-    extends DataType
-{
-
-    private String username;
-
-    private String password;
-
-    private String privateKeyFile;
-
-    private String passphrase;
-
-    private List<String> servers = new ArrayList<String>();
-
-    @Override
-    public void setProject( Project project )
-    {
-        super.setProject( project );
-
-        AntRepoSys.getInstance( project ).addAuthentication( this );
-    }
-
-    protected Authentication getRef()
-    {
-        return (Authentication) getCheckedRef();
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( username != null || password != null || privateKeyFile != null || passphrase != null )
-        {
-            throw tooManyAttributes();
-        }
-        super.setRefid( ref );
-    }
-
-    public String getUsername()
-    {
-        if ( isReference() )
-        {
-            return getRef().getUsername();
-        }
-        return username;
-    }
-
-    public void setUsername( String username )
-    {
-        checkAttributesAllowed();
-        this.username = username;
-    }
-
-    public String getPassword()
-    {
-        if ( isReference() )
-        {
-            return getRef().getPassword();
-        }
-        return password;
-    }
-
-    public void setPassword( String password )
-    {
-        checkAttributesAllowed();
-        this.password = password;
-    }
-
-    public String getPrivateKeyFile()
-    {
-        if ( isReference() )
-        {
-            return getRef().getPrivateKeyFile();
-        }
-        return privateKeyFile;
-    }
-
-    public void setPrivateKeyFile( String privateKeyFile )
-    {
-        checkAttributesAllowed();
-        this.privateKeyFile = privateKeyFile;
-    }
-
-    public String getPassphrase()
-    {
-        if ( isReference() )
-        {
-            return getRef().getPassphrase();
-        }
-        return passphrase;
-    }
-
-    public void setPassphrase( String passphrase )
-    {
-        checkAttributesAllowed();
-        this.passphrase = passphrase;
-    }
-
-    public List<String> getServers()
-    {
-        if ( isReference() )
-        {
-            return getRef().getServers();
-        }
-        return servers;
-    }
-
-    public void setServers( String servers )
-    {
-        checkAttributesAllowed();
-        this.servers.clear();
-        String[] split = servers.split( "[;:]" );
-        for ( String server : split )
-        {
-            server = server.trim();
-            if ( server.length() > 0 )
-            {
-                this.servers.add( server );
-            }
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependencies.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependencies.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependencies.java
deleted file mode 100644
index 5e1ea3c..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependencies.java
+++ /dev/null
@@ -1,197 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class Dependencies
-    extends DataType
-    implements DependencyContainer
-{
-
-    private File file;
-
-    private Pom pom;
-
-    private List<DependencyContainer> containers = new ArrayList<DependencyContainer>();
-
-    private List<Exclusion> exclusions = new ArrayList<Exclusion>();
-
-    private boolean nestedDependencies;
-
-    protected Dependencies getRef()
-    {
-        return (Dependencies) getCheckedRef();
-    }
-
-    public void validate( Task task )
-    {
-        if ( isReference() )
-        {
-            getRef().validate( task );
-        }
-        else
-        {
-            if ( getPom() != null && getPom().getFile() == null )
-            {
-                throw new BuildException( "A <pom> used for dependency resolution has to be backed by a pom.xml file" );
-            }
-            Map<String, String> ids = new HashMap<String, String>();
-            for ( DependencyContainer container : containers )
-            {
-                container.validate( task );
-                if ( container instanceof Dependency )
-                {
-                    Dependency dependency = (Dependency) container;
-                    String id = dependency.getVersionlessKey();
-                    String collision = ids.put( id, dependency.getVersion() );
-                    if ( collision != null )
-                    {
-                        throw new BuildException( "You must not declare multiple <dependency> elements"
-                            + " with the same coordinates but got " + id + " -> " + collision + " vs "
-                            + dependency.getVersion() );
-                    }
-                }
-            }
-        }
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( pom != null || !exclusions.isEmpty() || !containers.isEmpty() )
-        {
-            throw noChildrenAllowed();
-        }
-        super.setRefid( ref );
-    }
-
-    public void setFile( File file )
-    {
-        checkAttributesAllowed();
-        this.file = file;
-        checkExternalSources();
-    }
-
-    public File getFile()
-    {
-        if ( isReference() )
-        {
-            return getRef().getFile();
-        }
-        return file;
-    }
-
-    public void addPom( Pom pom )
-    {
-        checkChildrenAllowed();
-        if ( this.pom != null )
-        {
-            throw new BuildException( "You must not specify multiple <pom> elements" );
-        }
-        this.pom = pom;
-        checkExternalSources();
-    }
-
-    public Pom getPom()
-    {
-        if ( isReference() )
-        {
-            return getRef().getPom();
-        }
-        return pom;
-    }
-
-    public void setPomRef( Reference ref )
-    {
-        if ( pom == null )
-        {
-            pom = new Pom();
-            pom.setProject( getProject() );
-        }
-        pom.setRefid( ref );
-        checkExternalSources();
-    }
-
-    private void checkExternalSources()
-    {
-        if ( file != null && pom != null )
-        {
-            throw new BuildException( "You must not specify both a text file and a POM to list dependencies" );
-        }
-        if ( ( file != null || pom != null ) && nestedDependencies )
-        {
-            throw new BuildException( "You must not specify both a file/POM and nested dependency collections" );
-        }
-    }
-
-    public void addDependency( Dependency dependency )
-    {
-        checkChildrenAllowed();
-        containers.add( dependency );
-    }
-
-    public void addDependencies( Dependencies dependencies )
-    {
-        checkChildrenAllowed();
-        if ( dependencies == this )
-        {
-            throw circularReference();
-        }
-        containers.add( dependencies );
-        nestedDependencies = true;
-        checkExternalSources();
-    }
-
-    public List<DependencyContainer> getDependencyContainers()
-    {
-        if ( isReference() )
-        {
-            return getRef().getDependencyContainers();
-        }
-        return containers;
-    }
-
-    public void addExclusion( Exclusion exclusion )
-    {
-        checkChildrenAllowed();
-        this.exclusions.add( exclusion );
-    }
-
-    public List<Exclusion> getExclusions()
-    {
-        if ( isReference() )
-        {
-            return getRef().getExclusions();
-        }
-        return exclusions;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependency.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependency.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependency.java
deleted file mode 100644
index 9299a5f..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependency.java
+++ /dev/null
@@ -1,329 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class Dependency
-    extends DataType
-    implements DependencyContainer
-{
-
-    private String groupId;
-
-    private String artifactId;
-
-    private String version;
-
-    private String classifier;
-
-    private String type;
-
-    private String scope;
-
-    private File systemPath;
-
-    private List<Exclusion> exclusions = new ArrayList<Exclusion>();
-
-    protected Dependency getRef()
-    {
-        return (Dependency) getCheckedRef();
-    }
-
-    public void validate( Task task )
-    {
-        if ( isReference() )
-        {
-            getRef().validate( task );
-        }
-        else
-        {
-            if ( groupId == null || groupId.length() <= 0 )
-            {
-                throw new BuildException( "You must specify the 'groupId' for a dependency" );
-            }
-            if ( artifactId == null || artifactId.length() <= 0 )
-            {
-                throw new BuildException( "You must specify the 'artifactId' for a dependency" );
-            }
-            if ( version == null || version.length() <= 0 )
-            {
-                throw new BuildException( "You must specify the 'version' for a dependency" );
-            }
-
-            if ( "system".equals( scope ) )
-            {
-                if ( systemPath == null )
-                {
-                    throw new BuildException( "You must specify 'systemPath' for dependencies with scope=system" );
-                }
-            }
-            else if ( systemPath != null )
-            {
-                throw new BuildException( "You may only specify 'systemPath' for dependencies with scope=system" );
-            }
-
-            if ( scope != null && !"compile".equals( scope ) && !"provided".equals( scope ) && !"system".equals( scope )
-                && !"runtime".equals( scope ) && !"test".equals( scope ) )
-            {
-                task.log( "Unknown scope '" + scope + "' for dependency", Project.MSG_WARN );
-            }
-
-            for ( Exclusion exclusion : exclusions )
-            {
-                exclusion.validate( task );
-            }
-        }
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( groupId != null || artifactId != null || type != null || classifier != null || version != null
-            || scope != null || systemPath != null )
-        {
-            throw tooManyAttributes();
-        }
-        if ( !exclusions.isEmpty() )
-        {
-            throw noChildrenAllowed();
-        }
-        super.setRefid( ref );
-    }
-
-    public String getGroupId()
-    {
-        if ( isReference() )
-        {
-            return getRef().getGroupId();
-        }
-        return groupId;
-    }
-
-    public void setGroupId( String groupId )
-    {
-        checkAttributesAllowed();
-        if ( this.groupId != null )
-        {
-            throw ambiguousCoords();
-        }
-        this.groupId = groupId;
-    }
-
-    public String getArtifactId()
-    {
-        if ( isReference() )
-        {
-            return getRef().getArtifactId();
-        }
-        return artifactId;
-    }
-
-    public void setArtifactId( String artifactId )
-    {
-        checkAttributesAllowed();
-        if ( this.artifactId != null )
-        {
-            throw ambiguousCoords();
-        }
-        this.artifactId = artifactId;
-    }
-
-    public String getVersion()
-    {
-        if ( isReference() )
-        {
-            return getRef().getVersion();
-        }
-        return version;
-    }
-
-    public void setVersion( String version )
-    {
-        checkAttributesAllowed();
-        if ( this.version != null )
-        {
-            throw ambiguousCoords();
-        }
-        this.version = version;
-    }
-
-    public String getClassifier()
-    {
-        if ( isReference() )
-        {
-            return getRef().getClassifier();
-        }
-        return classifier;
-    }
-
-    public void setClassifier( String classifier )
-    {
-        checkAttributesAllowed();
-        if ( this.classifier != null )
-        {
-            throw ambiguousCoords();
-        }
-        this.classifier = classifier;
-    }
-
-    public String getType()
-    {
-        if ( isReference() )
-        {
-            return getRef().getType();
-        }
-        return ( type != null ) ? type : "jar";
-    }
-
-    public void setType( String type )
-    {
-        checkAttributesAllowed();
-        if ( this.type != null )
-        {
-            throw ambiguousCoords();
-        }
-        this.type = type;
-    }
-
-    public String getScope()
-    {
-        if ( isReference() )
-        {
-            return getRef().getScope();
-        }
-        return ( scope != null ) ? scope : "compile";
-    }
-
-    public void setScope( String scope )
-    {
-        checkAttributesAllowed();
-        if ( this.scope != null )
-        {
-            throw ambiguousCoords();
-        }
-        this.scope = scope;
-    }
-
-    public void setCoords( String coords )
-    {
-        checkAttributesAllowed();
-        if ( groupId != null || artifactId != null || version != null || type != null || classifier != null
-            || scope != null )
-        {
-            throw ambiguousCoords();
-        }
-        Pattern p = Pattern.compile( "([^: ]+):([^: ]+):([^: ]+)((:([^: ]+)(:([^: ]+))?)?:([^: ]+))?" );
-        Matcher m = p.matcher( coords );
-        if ( !m.matches() )
-        {
-            throw new BuildException( "Bad dependency coordinates '" + coords
-                + "', expected format is <groupId>:<artifactId>:<version>[[:<type>[:<classifier>]]:<scope>]" );
-        }
-        groupId = m.group( 1 );
-        artifactId = m.group( 2 );
-        version = m.group( 3 );
-        type = m.group( 6 );
-        if ( type == null || type.length() <= 0 )
-        {
-            type = "jar";
-        }
-        classifier = m.group( 8 );
-        if ( classifier == null )
-        {
-            classifier = "";
-        }
-        scope = m.group( 9 );
-    }
-
-    public void setSystemPath( File systemPath )
-    {
-        checkAttributesAllowed();
-        this.systemPath = systemPath;
-    }
-
-    public File getSystemPath()
-    {
-        if ( isReference() )
-        {
-            return getRef().getSystemPath();
-        }
-        return systemPath;
-    }
-
-    public String getVersionlessKey()
-    {
-        if ( isReference() )
-        {
-            return getRef().getVersionlessKey();
-        }
-        StringBuilder key = new StringBuilder( 128 );
-        if ( groupId != null )
-        {
-            key.append( groupId );
-        }
-        key.append( ':' );
-        if ( artifactId != null )
-        {
-            key.append( artifactId );
-        }
-        key.append( ':' );
-        key.append( ( type != null ) ? type : "jar" );
-        if ( classifier != null && classifier.length() > 0 )
-        {
-            key.append( ':' );
-            key.append( classifier );
-        }
-        return key.toString();
-    }
-
-    public void addExclusion( Exclusion exclusion )
-    {
-        checkChildrenAllowed();
-        this.exclusions.add( exclusion );
-    }
-
-    public List<Exclusion> getExclusions()
-    {
-        if ( isReference() )
-        {
-            return getRef().getExclusions();
-        }
-        return exclusions;
-    }
-
-    private BuildException ambiguousCoords()
-    {
-        return new BuildException( "You must not specify both 'coords' and "
-            + "('groupId', 'artifactId', 'version', 'extension', 'classifier', 'scope')" );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/DependencyContainer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/DependencyContainer.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/DependencyContainer.java
deleted file mode 100644
index bcca972..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/DependencyContainer.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import org.apache.tools.ant.Task;
-
-/**
- */
-public interface DependencyContainer
-{
-
-    void validate( Task task );
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/Exclusion.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/Exclusion.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/Exclusion.java
deleted file mode 100644
index ea0e06e..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/Exclusion.java
+++ /dev/null
@@ -1,190 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class Exclusion
-    extends DataType
-{
-
-    private static final String WILDCARD = "*";
-
-    private String groupId;
-
-    private String artifactId;
-
-    private String classifier;
-
-    private String extension;
-
-    protected Exclusion getRef()
-    {
-        return (Exclusion) getCheckedRef();
-    }
-
-    public void validate( Task task )
-    {
-        if ( isReference() )
-        {
-            getRef().validate( task );
-        }
-        else
-        {
-            if ( groupId == null && artifactId == null && classifier == null && extension == null )
-            {
-                throw new BuildException( "You must specify at least one of "
-                    + "'groupId', 'artifactId', 'classifier' or 'extension'" );
-            }
-        }
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( groupId != null || artifactId != null || extension != null || classifier != null )
-        {
-            throw tooManyAttributes();
-        }
-        super.setRefid( ref );
-    }
-
-    public String getGroupId()
-    {
-        if ( isReference() )
-        {
-            return getRef().getGroupId();
-        }
-        return ( groupId != null ) ? groupId : WILDCARD;
-    }
-
-    public void setGroupId( String groupId )
-    {
-        checkAttributesAllowed();
-        if ( this.groupId != null )
-        {
-            throw ambiguousCoords();
-        }
-        this.groupId = groupId;
-    }
-
-    public String getArtifactId()
-    {
-        if ( isReference() )
-        {
-            return getRef().getArtifactId();
-        }
-        return ( artifactId != null ) ? artifactId : WILDCARD;
-    }
-
-    public void setArtifactId( String artifactId )
-    {
-        checkAttributesAllowed();
-        if ( this.artifactId != null )
-        {
-            throw ambiguousCoords();
-        }
-        this.artifactId = artifactId;
-    }
-
-    public String getClassifier()
-    {
-        if ( isReference() )
-        {
-            return getRef().getClassifier();
-        }
-        return ( classifier != null ) ? classifier : WILDCARD;
-    }
-
-    public void setClassifier( String classifier )
-    {
-        checkAttributesAllowed();
-        if ( this.classifier != null )
-        {
-            throw ambiguousCoords();
-        }
-        this.classifier = classifier;
-    }
-
-    public String getExtension()
-    {
-        if ( isReference() )
-        {
-            return getRef().getExtension();
-        }
-        return ( extension != null ) ? extension : WILDCARD;
-    }
-
-    public void setExtension( String extension )
-    {
-        checkAttributesAllowed();
-        if ( this.extension != null )
-        {
-            throw ambiguousCoords();
-        }
-        this.extension = extension;
-    }
-
-    public void setCoords( String coords )
-    {
-        checkAttributesAllowed();
-        if ( groupId != null || artifactId != null || extension != null || classifier != null )
-        {
-            throw ambiguousCoords();
-        }
-        Pattern p = Pattern.compile( "([^: ]+)(:([^: ]+)(:([^: ]+)(:([^: ]*))?)?)?" );
-        Matcher m = p.matcher( coords );
-        if ( !m.matches() )
-        {
-            throw new BuildException( "Bad exclusion coordinates '" + coords
-                + "', expected format is <groupId>[:<artifactId>[:<extension>[:<classifier>]]]" );
-        }
-        groupId = m.group( 1 );
-        artifactId = m.group( 3 );
-        if ( artifactId == null )
-        {
-            artifactId = "*";
-        }
-        extension = m.group( 5 );
-        if ( extension == null )
-        {
-            extension = "*";
-        }
-        classifier = m.group( 7 );
-        if ( classifier == null )
-        {
-            classifier = "*";
-        }
-    }
-
-    private BuildException ambiguousCoords()
-    {
-        return new BuildException( "You must not specify both 'coords' and "
-            + "('groupId', 'artifactId', 'extension', 'classifier')" );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/LocalRepository.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/LocalRepository.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/LocalRepository.java
deleted file mode 100644
index 8847e54..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/LocalRepository.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.io.File;
-
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class LocalRepository
-    extends DataType
-{
-
-    private final Task task;
-
-    private File dir;
-
-    public LocalRepository()
-    {
-        this( null );
-    }
-
-    public LocalRepository( Task task )
-    {
-        this.task = task;
-    }
-
-    @Override
-    public void setProject( Project project )
-    {
-        super.setProject( project );
-
-        if ( task == null )
-        {
-            AntRepoSys.getInstance( project ).setLocalRepository( this );
-        }
-    }
-
-    protected LocalRepository getRef()
-    {
-        return (LocalRepository) getCheckedRef();
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( dir != null )
-        {
-            throw tooManyAttributes();
-        }
-        super.setRefid( ref );
-    }
-
-    public File getDir()
-    {
-        if ( isReference() )
-        {
-            return getRef().getDir();
-        }
-        return dir;
-    }
-
-    public void setDir( File dir )
-    {
-        checkAttributesAllowed();
-        this.dir = dir;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/Mirror.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/Mirror.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/Mirror.java
deleted file mode 100644
index 21534e8..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/Mirror.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.types.DataType;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class Mirror
-    extends DataType
-{
-
-    private String id;
-
-    private String url;
-
-    private String type;
-
-    private String mirrorOf;
-
-    private Authentication authentication;
-
-    @Override
-    public void setProject( Project project )
-    {
-        super.setProject( project );
-
-        AntRepoSys.getInstance( project ).addMirror( this );
-    }
-
-    protected Mirror getRef()
-    {
-        return (Mirror) getCheckedRef();
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( id != null || url != null || mirrorOf != null || type != null )
-        {
-            throw tooManyAttributes();
-        }
-        super.setRefid( ref );
-    }
-
-    public String getId()
-    {
-        if ( isReference() )
-        {
-            return getRef().getId();
-        }
-        return id;
-    }
-
-    public void setId( String id )
-    {
-        this.id = id;
-    }
-
-    public String getUrl()
-    {
-        if ( isReference() )
-        {
-            return getRef().getUrl();
-        }
-        return url;
-    }
-
-    public void setUrl( String url )
-    {
-        checkAttributesAllowed();
-        this.url = url;
-    }
-
-    public String getType()
-    {
-        if ( isReference() )
-        {
-            return getRef().getType();
-        }
-        return ( type != null ) ? type : "default";
-    }
-
-    public void setType( String type )
-    {
-        checkAttributesAllowed();
-        this.type = type;
-    }
-
-    public String getMirrorOf()
-    {
-        if ( isReference() )
-        {
-            return getRef().getMirrorOf();
-        }
-        return mirrorOf;
-    }
-
-    public void setMirrorOf( String mirrorOf )
-    {
-        checkAttributesAllowed();
-        this.mirrorOf = mirrorOf;
-    }
-
-    public void addAuthentication( Authentication authentication )
-    {
-        checkChildrenAllowed();
-        if ( this.authentication != null )
-        {
-            throw new BuildException( "You must not specify multiple <authentication> elements" );
-        }
-        this.authentication = authentication;
-    }
-
-    public Authentication getAuthentication()
-    {
-        if ( isReference() )
-        {
-            getRef().getAuthentication();
-        }
-        return authentication;
-    }
-
-    public void setAuthRef( Reference ref )
-    {
-        if ( authentication == null )
-        {
-            authentication = new Authentication();
-            authentication.setProject( getProject() );
-        }
-        authentication.setRefid( ref );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/ModelValueExtractor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/ModelValueExtractor.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/ModelValueExtractor.java
deleted file mode 100644
index c1ab45c..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/ModelValueExtractor.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import org.apache.maven.model.Model;
-import org.apache.tools.ant.Project;
-import org.codehaus.plexus.interpolation.reflection.ReflectionValueExtractor;
-
-/**
- */
-class ModelValueExtractor
-{
-
-    private static final String PREFIX_PROPERTIES = "properties.";
-
-    private final String prefix;
-
-    private final Project project;
-
-    private final Model model;
-
-    public ModelValueExtractor( String prefix, Model model, Project project )
-    {
-        if ( model == null )
-        {
-            throw new IllegalArgumentException( "reference to Maven POM has not been specified" );
-        }
-        if ( project == null )
-        {
-            throw new IllegalArgumentException( "reference to Ant project has not been specified" );
-        }
-        if ( prefix == null || prefix.length() <= 0 )
-        {
-            prefix = "pom.";
-        }
-        else if ( !prefix.endsWith( "." ) )
-        {
-            prefix += '.';
-        }
-        this.prefix = prefix;
-        this.model = model;
-        this.project = project;
-    }
-
-    public Project getProject()
-    {
-        return project;
-    }
-
-    public boolean isApplicable( String expression )
-    {
-        return expression.startsWith( prefix );
-    }
-
-    public Object getValue( String expression )
-    {
-        if ( expression.startsWith( prefix ) )
-        {
-            String expr = expression.substring( prefix.length() );
-            try
-            {
-                if ( expr.startsWith( PREFIX_PROPERTIES ) )
-                {
-                    String key = expr.substring( PREFIX_PROPERTIES.length() );
-                    return model.getProperties().getProperty( key );
-                }
-
-                return ReflectionValueExtractor.evaluate( expr, model, false );
-            }
-            catch ( Exception e )
-            {
-                project.log( "Could not retrieve '" + expression + "' from POM: " + e.getMessage(), e, Project.MSG_WARN );
-                return null;
-            }
-        }
-        else
-        {
-            return null;
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/Pom.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/Pom.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/Pom.java
deleted file mode 100644
index 62ca308..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/Pom.java
+++ /dev/null
@@ -1,352 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.maven.model.Model;
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
-import org.apache.maven.resolver.internal.ant.tasks.RefTask;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.PropertyHelper;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class Pom
-    extends RefTask
-{
-
-    private Model model;
-
-    private String id;
-
-    private File file;
-
-    private String groupId;
-
-    private String artifactId;
-
-    private String version;
-
-    private String packaging = "jar";
-
-    private RemoteRepositories remoteRepositories;
-
-    private String coords;
-
-    protected Pom getRef()
-    {
-        return (Pom) getCheckedRef();
-    }
-
-    public void validate()
-    {
-        if ( isReference() )
-        {
-            getRef().validate();
-        }
-        else
-        {
-            if ( file == null )
-            {
-                if ( groupId == null )
-                {
-                    throw new BuildException( "You must specify the 'groupId' for the POM" );
-                }
-                if ( artifactId == null )
-                {
-                    throw new BuildException( "You must specify the 'artifactId' for the POM" );
-                }
-                if ( version == null )
-                {
-                    throw new BuildException( "You must specify the 'version' for the POM" );
-                }
-            }
-        }
-
-    }
-
-    public void setRefid( Reference ref )
-    {
-        if ( id != null || file != null || groupId != null || artifactId != null || version != null )
-        {
-            throw tooManyAttributes();
-        }
-        if ( remoteRepositories != null )
-        {
-            throw noChildrenAllowed();
-        }
-        super.setRefid( ref );
-    }
-
-    public void setId( String id )
-    {
-        checkAttributesAllowed();
-        this.id = id;
-    }
-
-    public File getFile()
-    {
-        if ( isReference() )
-        {
-            return getRef().getFile();
-        }
-        return file;
-    }
-
-    public void setFile( File file )
-    {
-        checkAttributesAllowed();
-        if ( groupId != null || artifactId != null || version != null )
-        {
-            throw ambiguousSource();
-        }
-
-        this.file = file;
-
-    }
-
-    public String getGroupId()
-    {
-        if ( isReference() )
-        {
-            return getRef().getGroupId();
-        }
-        return groupId;
-    }
-
-    public void setGroupId( String groupId )
-    {
-        checkAttributesAllowed();
-        if ( this.groupId != null )
-        {
-            throw ambiguousCoords();
-        }
-        if ( file != null )
-        {
-            throw ambiguousSource();
-        }
-        this.groupId = groupId;
-    }
-
-    public String getArtifactId()
-    {
-        if ( isReference() )
-        {
-            return getRef().getArtifactId();
-        }
-        return artifactId;
-    }
-
-    public void setArtifactId( String artifactId )
-    {
-        checkAttributesAllowed();
-        if ( this.artifactId != null )
-        {
-            throw ambiguousCoords();
-        }
-        if ( file != null )
-        {
-            throw ambiguousSource();
-        }
-        this.artifactId = artifactId;
-    }
-
-    public String getVersion()
-    {
-        if ( isReference() )
-        {
-            return getRef().getVersion();
-        }
-        return version;
-    }
-
-    public void setVersion( String version )
-    {
-        checkAttributesAllowed();
-        if ( this.version != null )
-        {
-            throw ambiguousCoords();
-        }
-        if ( file != null )
-        {
-            throw ambiguousSource();
-        }
-        this.version = version;
-    }
-
-    public String getCoords()
-    {
-        if ( isReference() )
-        {
-            return getRef().getCoords();
-        }
-        return coords;
-    }
-
-    public void setCoords( String coords )
-    {
-        checkAttributesAllowed();
-        if ( file != null )
-        {
-            throw ambiguousSource();
-        }
-        if ( groupId != null || artifactId != null || version != null )
-        {
-            throw ambiguousCoords();
-        }
-        Pattern p = Pattern.compile( "([^: ]+):([^: ]+):([^: ]+)" );
-        Matcher m = p.matcher( coords );
-        if ( !m.matches() )
-        {
-            throw new BuildException( "Bad POM coordinates, expected format is <groupId>:<artifactId>:<version>" );
-        }
-        groupId = m.group( 1 );
-        artifactId = m.group( 2 );
-        version = m.group( 3 );
-    }
-
-    private BuildException ambiguousCoords()
-    {
-        return new BuildException( "You must not specify both 'coords' and ('groupId', 'artifactId', 'version')" );
-    }
-
-    private BuildException ambiguousSource()
-    {
-        return new BuildException( "You must not specify both 'file' and "
-            + "('coords', 'groupId', 'artifactId', 'version')" );
-    }
-
-    public String getPackaging()
-    {
-        if ( isReference() )
-        {
-            return getRef().getPackaging();
-        }
-        return packaging;
-    }
-
-    public void setPackaging( String packaging )
-    {
-        checkAttributesAllowed();
-        if ( file != null )
-        {
-            throw ambiguousSource();
-        }
-        this.packaging = packaging;
-    }
-
-    private RemoteRepositories getRemoteRepos()
-    {
-        if ( remoteRepositories == null )
-        {
-            remoteRepositories = new RemoteRepositories();
-            remoteRepositories.setProject( getProject() );
-        }
-        return remoteRepositories;
-    }
-
-    public void addRemoteRepo( RemoteRepository repository )
-    {
-        getRemoteRepos().addRemoterepo( repository );
-    }
-
-    public void addRemoteRepos( RemoteRepositories repositories )
-    {
-        getRemoteRepos().addRemoterepos( repositories );
-    }
-
-    public void setRemoteReposRef( Reference ref )
-    {
-        RemoteRepositories repos = new RemoteRepositories();
-        repos.setProject( getProject() );
-        repos.setRefid( ref );
-        getRemoteRepos().addRemoterepos( repos );
-    }
-
-    public Model getModel( Task task )
-    {
-        if ( isReference() )
-        {
-            return getRef().getModel( task );
-        }
-        synchronized ( this )
-        {
-            if ( model == null )
-            {
-                if ( file != null )
-                {
-                    model = AntRepoSys.getInstance( getProject() ).loadModel( task, file, true, remoteRepositories );
-                }
-            }
-            return model;
-        }
-    }
-
-    @Override
-    public void execute()
-    {
-        validate();
-
-        if ( file != null && ( id == null || AntRepoSys.getInstance( getProject() ).getDefaultPom() == null ) )
-        {
-            AntRepoSys.getInstance( getProject() ).setDefaultPom( this );
-        }
-
-        ProjectWorkspaceReader.getInstance().addPom( this );
-
-        Model model = getModel( this );
-
-        if ( model == null )
-        {
-            coords = getGroupId() + ":" + getArtifactId() + ":" + getVersion();
-            return;
-        }
-
-        coords = model.getGroupId() + ":" + model.getArtifactId() + ":" + model.getVersion();
-
-        ModelValueExtractor extractor = new ModelValueExtractor( id, model, getProject() );
-
-        PropertyHelper propHelper = PropertyHelper.getPropertyHelper( getProject() );
-
-        try
-        {
-            // Ant 1.8.0 delegate
-            PomPropertyEvaluator.register( extractor, propHelper );
-        }
-        catch ( LinkageError e )
-        {
-            // Ant 1.6 - 1.7.1 interceptor chaining
-            PomPropertyHelper.register( extractor, propHelper );
-        }
-
-    }
-
-    public String toString()
-    {
-        return coords + " (" + super.toString() + ")";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyEvaluator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyEvaluator.java b/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyEvaluator.java
deleted file mode 100644
index 1b76bfd..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyEvaluator.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.apache.maven.resolver.internal.ant.types;
-
-/*
- * 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.
- */
-
-import org.apache.tools.ant.PropertyHelper;
-import org.apache.tools.ant.PropertyHelper.PropertyEvaluator;
-import org.apache.tools.ant.property.NullReturn;
-
-/**
- */
-class PomPropertyEvaluator
-    implements PropertyEvaluator
-{
-
-    private final ModelValueExtractor extractor;
-
-    public static void register( ModelValueExtractor extractor, PropertyHelper propertyHelper )
-    {
-        propertyHelper.add( new PomPropertyEvaluator( extractor ) );
-    }
-
-    private PomPropertyEvaluator( ModelValueExtractor extractor )
-    {
-        if ( extractor == null )
-        {
-            throw new IllegalArgumentException( "no model value exractor specified" );
-        }
-        this.extractor = extractor;
-    }
-
-    public Object evaluate( String property, PropertyHelper propertyHelper )
-    {
-        Object value = extractor.getValue( property );
-        if ( value != null )
-        {
-            return value;
-        }
-        else if ( extractor.isApplicable( property ) )
-        {
-            return NullReturn.NULL;
-        }
-        return null;
-    }
-
-}

Reply | Threaded
Open this post in threaded view
|

[4/9] maven-resolver git commit: moved ant tasks into subfolder

mmoser
In reply to this post by mmoser
http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java b/src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java
deleted file mode 100644
index 3b158e4..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java
+++ /dev/null
@@ -1,825 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.apache.maven.model.Model;
-import org.apache.maven.model.building.DefaultModelBuilderFactory;
-import org.apache.maven.model.building.DefaultModelBuildingRequest;
-import org.apache.maven.model.building.FileModelSource;
-import org.apache.maven.model.building.ModelBuilder;
-import org.apache.maven.model.building.ModelBuildingException;
-import org.apache.maven.model.building.ModelBuildingRequest;
-import org.apache.maven.model.resolution.ModelResolver;
-import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
-import org.apache.maven.resolver.internal.ant.types.Artifact;
-import org.apache.maven.resolver.internal.ant.types.Artifacts;
-import org.apache.maven.resolver.internal.ant.types.Authentication;
-import org.apache.maven.resolver.internal.ant.types.Dependencies;
-import org.apache.maven.resolver.internal.ant.types.Dependency;
-import org.apache.maven.resolver.internal.ant.types.DependencyContainer;
-import org.apache.maven.resolver.internal.ant.types.Exclusion;
-import org.apache.maven.resolver.internal.ant.types.LocalRepository;
-import org.apache.maven.resolver.internal.ant.types.Mirror;
-import org.apache.maven.resolver.internal.ant.types.Pom;
-import org.apache.maven.resolver.internal.ant.types.Proxy;
-import org.apache.maven.resolver.internal.ant.types.RemoteRepositories;
-import org.apache.maven.resolver.internal.ant.types.RemoteRepository;
-import org.apache.maven.settings.Server;
-import org.apache.maven.settings.Settings;
-import org.apache.maven.settings.building.DefaultSettingsBuilderFactory;
-import org.apache.maven.settings.building.DefaultSettingsBuildingRequest;
-import org.apache.maven.settings.building.SettingsBuilder;
-import org.apache.maven.settings.building.SettingsBuildingException;
-import org.apache.maven.settings.crypto.DefaultSettingsDecryptionRequest;
-import org.apache.maven.settings.crypto.SettingsDecrypter;
-import org.apache.maven.settings.crypto.SettingsDecryptionResult;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.taskdefs.condition.Os;
-import org.apache.tools.ant.types.Reference;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.eclipse.aether.ConfigurationProperties;
-import org.eclipse.aether.DefaultRepositoryCache;
-import org.eclipse.aether.DefaultRepositorySystemSession;
-import org.eclipse.aether.RepositorySystem;
-import org.eclipse.aether.RepositorySystemSession;
-import org.eclipse.aether.artifact.DefaultArtifact;
-import org.eclipse.aether.collection.CollectRequest;
-import org.eclipse.aether.collection.CollectResult;
-import org.eclipse.aether.collection.DependencyCollectionException;
-import org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory;
-import org.eclipse.aether.deployment.DeployRequest;
-import org.eclipse.aether.deployment.DeploymentException;
-import org.eclipse.aether.impl.DefaultServiceLocator;
-import org.eclipse.aether.impl.RemoteRepositoryManager;
-import org.eclipse.aether.installation.InstallRequest;
-import org.eclipse.aether.installation.InstallationException;
-import org.eclipse.aether.repository.AuthenticationSelector;
-import org.eclipse.aether.repository.LocalRepositoryManager;
-import org.eclipse.aether.repository.MirrorSelector;
-import org.eclipse.aether.repository.ProxySelector;
-import org.eclipse.aether.spi.connector.RepositoryConnectorFactory;
-import org.eclipse.aether.spi.connector.transport.TransporterFactory;
-import org.eclipse.aether.spi.log.Logger;
-import org.eclipse.aether.transport.classpath.ClasspathTransporterFactory;
-import org.eclipse.aether.transport.file.FileTransporterFactory;
-import org.eclipse.aether.transport.http.HttpTransporterFactory;
-import org.eclipse.aether.util.repository.AuthenticationBuilder;
-import org.eclipse.aether.util.repository.ConservativeAuthenticationSelector;
-import org.eclipse.aether.util.repository.DefaultAuthenticationSelector;
-import org.eclipse.aether.util.repository.DefaultMirrorSelector;
-import org.eclipse.aether.util.repository.DefaultProxySelector;
-
-/**
- */
-public class AntRepoSys
-{
-
-    private static final boolean OS_WINDOWS = Os.isFamily( "windows" );
-
-    private static final ModelBuilder MODEL_BUILDER = new DefaultModelBuilderFactory().newInstance();
-
-    private static final SettingsBuilder SETTINGS_BUILDER = new DefaultSettingsBuilderFactory().newInstance();
-
-    private static final SettingsDecrypter SETTINGS_DECRYPTER = new AntSettingsDecryptorFactory().newInstance();
-
-    private final Project project;
-
-    private final DefaultServiceLocator locator;
-
-    private RepositorySystem repoSys;
-
-    private RemoteRepositoryManager remoteRepoMan;
-
-    private File userSettings;
-
-    private File globalSettings;
-
-    private Settings settings;
-
-    private final List<Mirror> mirrors = new CopyOnWriteArrayList<Mirror>();
-
-    private final List<Proxy> proxies = new CopyOnWriteArrayList<Proxy>();
-
-    private final List<Authentication> authentications = new CopyOnWriteArrayList<Authentication>();
-
-    private LocalRepository localRepository;
-
-    private Pom defaultPom;
-
-    private static <T> boolean eq( T o1, T o2 )
-    {
-        return ( o1 == null ) ? o2 == null : o1.equals( o2 );
-    }
-
-    public static synchronized AntRepoSys getInstance( Project project )
-    {
-        Object obj = project.getReference( Names.ID );
-        if ( obj instanceof AntRepoSys )
-        {
-            return (AntRepoSys) obj;
-        }
-        AntRepoSys instance = new AntRepoSys( project );
-        project.addReference( Names.ID, instance );
-        instance.initDefaults();
-        return instance;
-    }
-
-    private AntRepoSys( Project project )
-    {
-        this.project = project;
-
-        locator = MavenRepositorySystemUtils.newServiceLocator();
-        locator.setErrorHandler( new AntServiceLocatorErrorHandler( project ) );
-        locator.setServices( Logger.class, new AntLogger( project ) );
-        locator.setServices( ModelBuilder.class, MODEL_BUILDER );
-        locator.addService( RepositoryConnectorFactory.class, BasicRepositoryConnectorFactory.class );
-        locator.addService( TransporterFactory.class, FileTransporterFactory.class );
-        locator.addService( TransporterFactory.class, HttpTransporterFactory.class );
-        locator.addService( TransporterFactory.class, ClasspathTransporterFactory.class );
-    }
-
-    private void initDefaults()
-    {
-        RemoteRepository repo = new RemoteRepository();
-        repo.setProject( project );
-        repo.setId( "central" );
-        repo.setUrl( "http://repo1.maven.org/maven2/" );
-        project.addReference( Names.ID_CENTRAL, repo );
-
-        repo = new RemoteRepository();
-        repo.setProject( project );
-        repo.setRefid( new Reference( project, Names.ID_CENTRAL ) );
-        RemoteRepositories repos = new RemoteRepositories();
-        repos.setProject( project );
-        repos.addRemoterepo( repo );
-        project.addReference( Names.ID_DEFAULT_REPOS, repos );
-    }
-
-    public synchronized RepositorySystem getSystem()
-    {
-        if ( repoSys == null )
-        {
-            repoSys = locator.getService( RepositorySystem.class );
-            if ( repoSys == null )
-            {
-                throw new BuildException( "The repository system could not be initialized" );
-            }
-        }
-        return repoSys;
-    }
-
-    private synchronized RemoteRepositoryManager getRemoteRepoMan()
-    {
-        if ( remoteRepoMan == null )
-        {
-            remoteRepoMan = locator.getService( RemoteRepositoryManager.class );
-            if ( remoteRepoMan == null )
-            {
-                throw new BuildException( "The repository system could not be initialized" );
-            }
-        }
-        return remoteRepoMan;
-    }
-
-    public RepositorySystemSession getSession( Task task, LocalRepository localRepo )
-    {
-        DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
-
-        Map<Object, Object> configProps = new LinkedHashMap<Object, Object>();
-        configProps.put( ConfigurationProperties.USER_AGENT, getUserAgent() );
-        configProps.putAll( (Map<?, ?>) project.getProperties() );
-        processServerConfiguration( configProps );
-        session.setConfigProperties( configProps );
-
-        session.setOffline( isOffline() );
-        session.setUserProperties( project.getUserProperties() );
-
-        session.setProxySelector( getProxySelector() );
-        session.setMirrorSelector( getMirrorSelector() );
-        session.setAuthenticationSelector( getAuthSelector() );
-
-        session.setCache( new DefaultRepositoryCache() );
-
-        session.setRepositoryListener( new AntRepositoryListener( task ) );
-        session.setTransferListener( new AntTransferListener( task ) );
-
-        session.setLocalRepositoryManager( getLocalRepoMan( session, localRepo ) );
-
-        session.setWorkspaceReader( ProjectWorkspaceReader.getInstance() );
-
-        return session;
-    }
-
-    private String getUserAgent()
-    {
-        StringBuilder buffer = new StringBuilder( 128 );
-
-        buffer.append( "Apache-Ant/" ).append( project.getProperty( "ant.version" ) );
-        buffer.append( " (" );
-        buffer.append( "Java " ).append( System.getProperty( "java.version" ) );
-        buffer.append( "; " );
-        buffer.append( System.getProperty( "os.name" ) ).append( " " ).append( System.getProperty( "os.version" ) );
-        buffer.append( ")" );
-        buffer.append( " Aether" );
-
-        return buffer.toString();
-    }
-
-    private boolean isOffline()
-    {
-        String prop = project.getProperty( Names.PROPERTY_OFFLINE );
-        if ( prop != null )
-        {
-            return Boolean.parseBoolean( prop );
-        }
-        return getSettings().isOffline();
-    }
-
-    private void processServerConfiguration( Map<Object, Object> configProps )
-    {
-        Settings settings = getSettings();
-        for ( Server server : settings.getServers() )
-        {
-            if ( server.getConfiguration() != null )
-            {
-                Xpp3Dom dom = (Xpp3Dom) server.getConfiguration();
-                for ( int i = dom.getChildCount() - 1; i >= 0; i-- )
-                {
-                    Xpp3Dom child = dom.getChild( i );
-                    if ( "wagonProvider".equals( child.getName() ) )
-                    {
-                        dom.removeChild( i );
-                    }
-                    else if ( "httpHeaders".equals( child.getName() ) )
-                    {
-                        configProps.put( ConfigurationProperties.HTTP_HEADERS + "." + server.getId(),
-                                         getHttpHeaders( child ) );
-                    }
-                }
-
-                configProps.put( "aether.connector.wagon.config." + server.getId(), dom );
-            }
-
-            configProps.put( "aether.connector.perms.fileMode." + server.getId(), server.getFilePermissions() );
-            configProps.put( "aether.connector.perms.dirMode." + server.getId(), server.getDirectoryPermissions() );
-        }
-    }
-
-    private Map<String, String> getHttpHeaders( Xpp3Dom dom )
-    {
-        Map<String, String> headers = new HashMap<String, String>();
-        for ( int i = 0; i < dom.getChildCount(); i++ )
-        {
-            Xpp3Dom child = dom.getChild( i );
-            Xpp3Dom name = child.getChild( "name" );
-            Xpp3Dom value = child.getChild( "value" );
-            if ( name != null && name.getValue() != null )
-            {
-                headers.put( name.getValue(), ( value != null ) ? value.getValue() : null );
-            }
-        }
-        return Collections.unmodifiableMap( headers );
-    }
-
-    private File getDefaultLocalRepoDir()
-    {
-        String dir = project.getProperty( "maven.repo.local" );
-        if ( dir != null )
-        {
-            return project.resolveFile( dir );
-        }
-
-        Settings settings = getSettings();
-        if ( settings.getLocalRepository() != null )
-        {
-            return new File( settings.getLocalRepository() );
-        }
-
-        return new File( new File( project.getProperty( "user.home" ), ".m2" ), "repository" );
-    }
-
-    private LocalRepositoryManager getLocalRepoMan( RepositorySystemSession session, LocalRepository localRepo )
-    {
-        if ( localRepo == null )
-        {
-            localRepo = localRepository;
-        }
-
-        File repoDir;
-        if ( localRepo != null && localRepo.getDir() != null )
-        {
-            repoDir = localRepo.getDir();
-        }
-        else
-        {
-            repoDir = getDefaultLocalRepoDir();
-        }
-
-        org.eclipse.aether.repository.LocalRepository repo =
-            new org.eclipse.aether.repository.LocalRepository( repoDir );
-
-        return getSystem().newLocalRepositoryManager( session, repo );
-    }
-
-    private synchronized Settings getSettings()
-    {
-        if ( settings == null )
-        {
-            DefaultSettingsBuildingRequest request = new DefaultSettingsBuildingRequest();
-            request.setUserSettingsFile( getUserSettings() );
-            request.setGlobalSettingsFile( getGlobalSettings() );
-            request.setSystemProperties( getSystemProperties() );
-            request.setUserProperties( getUserProperties() );
-
-            try
-            {
-                settings = SETTINGS_BUILDER.build( request ).getEffectiveSettings();
-            }
-            catch ( SettingsBuildingException e )
-            {
-                project.log( "Could not process settings.xml: " + e.getMessage(), e, Project.MSG_WARN );
-            }
-
-            SettingsDecryptionResult result =
-                SETTINGS_DECRYPTER.decrypt( new DefaultSettingsDecryptionRequest( settings ) );
-            settings.setServers( result.getServers() );
-            settings.setProxies( result.getProxies() );
-        }
-        return settings;
-    }
-
-    private ProxySelector getProxySelector()
-    {
-        DefaultProxySelector selector = new DefaultProxySelector();
-
-        for ( Proxy proxy : proxies )
-        {
-            selector.add( ConverterUtils.toProxy( proxy ), proxy.getNonProxyHosts() );
-        }
-
-        Settings settings = getSettings();
-        for ( org.apache.maven.settings.Proxy proxy : settings.getProxies() )
-        {
-            AuthenticationBuilder auth = new AuthenticationBuilder();
-            auth.addUsername( proxy.getUsername() ).addPassword( proxy.getPassword() );
-            selector.add( new org.eclipse.aether.repository.Proxy( proxy.getProtocol(), proxy.getHost(),
-                                                                   proxy.getPort(), auth.build() ),
-                          proxy.getNonProxyHosts() );
-        }
-
-        return selector;
-    }
-
-    private MirrorSelector getMirrorSelector()
-    {
-        DefaultMirrorSelector selector = new DefaultMirrorSelector();
-
-        for ( Mirror mirror : mirrors )
-        {
-            selector.add( mirror.getId(), mirror.getUrl(), mirror.getType(), false, mirror.getMirrorOf(), null );
-        }
-
-        Settings settings = getSettings();
-        for ( org.apache.maven.settings.Mirror mirror : settings.getMirrors() )
-        {
-            selector.add( String.valueOf( mirror.getId() ), mirror.getUrl(), mirror.getLayout(), false,
-                          mirror.getMirrorOf(), mirror.getMirrorOfLayouts() );
-        }
-
-        return selector;
-    }
-
-    private AuthenticationSelector getAuthSelector()
-    {
-        DefaultAuthenticationSelector selector = new DefaultAuthenticationSelector();
-
-        Collection<String> ids = new HashSet<String>();
-        for ( Authentication auth : authentications )
-        {
-            List<String> servers = auth.getServers();
-            if ( !servers.isEmpty() )
-            {
-                org.eclipse.aether.repository.Authentication a = ConverterUtils.toAuthentication( auth );
-                for ( String server : servers )
-                {
-                    if ( ids.add( server ) )
-                    {
-                        selector.add( server, a );
-                    }
-                }
-            }
-        }
-
-        Settings settings = getSettings();
-        for ( Server server : settings.getServers() )
-        {
-            AuthenticationBuilder auth = new AuthenticationBuilder();
-            auth.addUsername( server.getUsername() ).addPassword( server.getPassword() );
-            auth.addPrivateKey( server.getPrivateKey(), server.getPassphrase() );
-            selector.add( server.getId(), auth.build() );
-        }
-
-        return new ConservativeAuthenticationSelector( selector );
-    }
-
-    public synchronized void setUserSettings( File file )
-    {
-        if ( !eq( this.userSettings, file ) )
-        {
-            settings = null;
-        }
-        this.userSettings = file;
-    }
-
-    /* UT */File getUserSettings()
-    {
-        if ( userSettings == null )
-        {
-            userSettings = AetherUtils.findUserSettings( project );
-        }
-        return userSettings;
-    }
-
-    public void setGlobalSettings( File file )
-    {
-        if ( !eq( this.globalSettings, file ) )
-        {
-            settings = null;
-        }
-        this.globalSettings = file;
-    }
-
-    /* UT */File getGlobalSettings()
-    {
-        if ( globalSettings == null )
-        {
-            globalSettings = AetherUtils.findGlobalSettings( project );
-        }
-        return globalSettings;
-    }
-
-    public void addProxy( Proxy proxy )
-    {
-        proxies.add( proxy );
-    }
-
-    public void addMirror( Mirror mirror )
-    {
-        mirrors.add( mirror );
-    }
-
-    public void addAuthentication( Authentication authentication )
-    {
-        authentications.add( authentication );
-    }
-
-    public void setLocalRepository( LocalRepository localRepository )
-    {
-        this.localRepository = localRepository;
-    }
-
-    public Model loadModel( Task task, File pomFile, boolean local, RemoteRepositories remoteRepositories )
-    {
-        RepositorySystemSession session = getSession( task, null );
-
-        remoteRepositories =
-            remoteRepositories == null ? AetherUtils.getDefaultRepositories( project ) : remoteRepositories;
-
-        List<org.eclipse.aether.repository.RemoteRepository> repositories =
-            ConverterUtils.toRepositories( task.getProject(), session, remoteRepositories, getRemoteRepoMan() );
-
-        ModelResolver modelResolver =
-            new AntModelResolver( session, "project", getSystem(), getRemoteRepoMan(), repositories );
-
-        Settings settings = getSettings();
-
-        try
-        {
-            DefaultModelBuildingRequest request = new DefaultModelBuildingRequest();
-            request.setLocationTracking( true );
-            request.setProcessPlugins( false );
-            if ( local )
-            {
-                request.setPomFile( pomFile );
-                request.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_STRICT );
-            }
-            else
-            {
-                request.setModelSource( new FileModelSource( pomFile ) );
-                request.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL );
-            }
-            request.setSystemProperties( getSystemProperties() );
-            request.setUserProperties( getUserProperties() );
-            request.setProfiles( SettingsUtils.convert( settings.getProfiles() ) );
-            request.setActiveProfileIds( settings.getActiveProfiles() );
-            request.setModelResolver( modelResolver );
-            return MODEL_BUILDER.build( request ).getEffectiveModel();
-        }
-        catch ( ModelBuildingException e )
-        {
-            throw new BuildException( "Could not load POM " + pomFile + ": " + e.getMessage(), e );
-        }
-    }
-
-    private Properties getSystemProperties()
-    {
-        Properties props = new Properties();
-        getEnvProperties( props );
-        props.putAll( System.getProperties() );
-        ConverterUtils.addProperties( props, project.getProperties() );
-        return props;
-    }
-
-    private Properties getEnvProperties( Properties props )
-    {
-        if ( props == null )
-        {
-            props = new Properties();
-        }
-        boolean envCaseInsensitive = OS_WINDOWS;
-        for ( Map.Entry<String, String> entry : System.getenv().entrySet() )
-        {
-            String key = entry.getKey();
-            if ( envCaseInsensitive )
-            {
-                key = key.toUpperCase( Locale.ENGLISH );
-            }
-            key = "env." + key;
-            props.put( key, entry.getValue() );
-        }
-        return props;
-    }
-
-    private Properties getUserProperties()
-    {
-        return ConverterUtils.addProperties( null, project.getUserProperties() );
-    }
-
-    /**
-     * Sets the default POM.
-     */
-    public void setDefaultPom( Pom pom )
-    {
-        this.defaultPom = pom;
-    }
-
-    /**
-     * Returns the current default POM.
-     */
-    public Pom getDefaultPom()
-    {
-        return defaultPom;
-    }
-
-    public CollectResult collectDependencies( Task task, Dependencies dependencies, LocalRepository localRepository,
-                                              RemoteRepositories remoteRepositories )
-    {
-        RepositorySystemSession session = getSession( task, localRepository );
-
-        remoteRepositories =
-            remoteRepositories == null ? AetherUtils.getDefaultRepositories( project ) : remoteRepositories;
-
-        List<org.eclipse.aether.repository.RemoteRepository> repos =
-            ConverterUtils.toRepositories( project, session, remoteRepositories, getRemoteRepoMan() );
-
-        CollectRequest collectRequest = new CollectRequest();
-        collectRequest.setRequestContext( "project" );
-
-        for ( org.eclipse.aether.repository.RemoteRepository repo : repos )
-        {
-            task.getProject().log( "Using remote repository " + repo, Project.MSG_VERBOSE );
-            collectRequest.addRepository( repo );
-        }
-
-        if ( dependencies != null )
-        {
-            populateCollectRequest( collectRequest, task, session, dependencies, Collections.<Exclusion>emptyList() );
-        }
-
-        task.getProject().log( "Collecting dependencies", Project.MSG_VERBOSE );
-
-        CollectResult result;
-        try
-        {
-            result = getSystem().collectDependencies( session, collectRequest );
-        }
-        catch ( DependencyCollectionException e )
-        {
-            throw new BuildException( "Could not collect dependencies: " + e.getMessage(), e );
-        }
-
-        return result;
-    }
-
-    private void populateCollectRequest( CollectRequest collectRequest, Task task, RepositorySystemSession session,
-                                         Dependencies dependencies, List<Exclusion> exclusions )
-    {
-        List<Exclusion> globalExclusions = exclusions;
-        if ( !dependencies.getExclusions().isEmpty() )
-        {
-            globalExclusions = new ArrayList<Exclusion>( exclusions );
-            globalExclusions.addAll( dependencies.getExclusions() );
-        }
-
-        Collection<String> ids = new HashSet<String>();
-
-        for ( DependencyContainer container : dependencies.getDependencyContainers() )
-        {
-            if ( container instanceof Dependency )
-            {
-                Dependency dep = (Dependency) container;
-                ids.add( dep.getVersionlessKey() );
-                collectRequest.addDependency( ConverterUtils.toDependency( dep, globalExclusions, session ) );
-            }
-            else
-            {
-                populateCollectRequest( collectRequest, task, session, (Dependencies) container, globalExclusions );
-            }
-        }
-
-        if ( dependencies.getPom() != null )
-        {
-            Model model = dependencies.getPom().getModel( task );
-            for ( org.apache.maven.model.Dependency dep : model.getDependencies() )
-            {
-                Dependency dependency = new Dependency();
-                dependency.setArtifactId( dep.getArtifactId() );
-                dependency.setClassifier( dep.getClassifier() );
-                dependency.setGroupId( dep.getGroupId() );
-                dependency.setScope( dep.getScope() );
-                dependency.setType( dep.getType() );
-                dependency.setVersion( dep.getVersion() );
-                if ( ids.contains( dependency.getVersionlessKey() ) )
-                {
-                    project.log( "Ignoring dependency " + dependency.getVersionlessKey() + " from " + model.getId()
-                        + ", already declared locally", Project.MSG_VERBOSE );
-                    continue;
-                }
-                if ( dep.getSystemPath() != null && dep.getSystemPath().length() > 0 )
-                {
-                    dependency.setSystemPath( task.getProject().resolveFile( dep.getSystemPath() ) );
-                }
-                for ( org.apache.maven.model.Exclusion exc : dep.getExclusions() )
-                {
-                    Exclusion exclusion = new Exclusion();
-                    exclusion.setGroupId( exc.getGroupId() );
-                    exclusion.setArtifactId( exc.getArtifactId() );
-                    exclusion.setClassifier( "*" );
-                    exclusion.setExtension( "*" );
-                    dependency.addExclusion( exclusion );
-                }
-                collectRequest.addDependency( ConverterUtils.toDependency( dependency, globalExclusions, session ) );
-            }
-        }
-
-        if ( dependencies.getFile() != null )
-        {
-            List<Dependency> deps = readDependencies( dependencies.getFile() );
-            for ( Dependency dependency : deps )
-            {
-                if ( ids.contains( dependency.getVersionlessKey() ) )
-                {
-                    project.log( "Ignoring dependency " + dependency.getVersionlessKey() + " from "
-                                     + dependencies.getFile() + ", already declared locally", Project.MSG_VERBOSE );
-                    continue;
-                }
-                collectRequest.addDependency( ConverterUtils.toDependency( dependency, globalExclusions, session ) );
-            }
-        }
-    }
-
-    private List<Dependency> readDependencies( File file )
-    {
-        List<Dependency> dependencies = new ArrayList<Dependency>();
-        try
-        {
-            BufferedReader reader = new BufferedReader( new InputStreamReader( new FileInputStream( file ), "UTF-8" ) );
-            try
-            {
-                for ( String line = reader.readLine(); line != null; line = reader.readLine() )
-                {
-                    int comment = line.indexOf( '#' );
-                    if ( comment >= 0 )
-                    {
-                        line = line.substring( 0, comment );
-                    }
-                    line = line.trim();
-                    if ( line.length() <= 0 )
-                    {
-                        continue;
-                    }
-                    Dependency dependency = new Dependency();
-                    dependency.setCoords( line );
-                    dependencies.add( dependency );
-                }
-            }
-            finally
-            {
-                reader.close();
-            }
-        }
-        catch ( IOException e )
-        {
-            throw new BuildException( "Cannot read " + file, e );
-        }
-        return dependencies;
-    }
-
-    public void install( Task task, Pom pom, Artifacts artifacts )
-    {
-        RepositorySystemSession session = getSession( task, null );
-
-        InstallRequest request = new InstallRequest();
-        request.setArtifacts( toArtifacts( task, session, pom, artifacts ) );
-
-        try
-        {
-            getSystem().install( session, request );
-        }
-        catch ( InstallationException e )
-        {
-            throw new BuildException( "Could not install artifacts: " + e.getMessage(), e );
-        }
-    }
-
-    public void deploy( Task task, Pom pom, Artifacts artifacts, RemoteRepository releaseRepository,
-                        RemoteRepository snapshotRepository )
-    {
-        RepositorySystemSession session = getSession( task, null );
-
-        DeployRequest request = new DeployRequest();
-        request.setArtifacts( toArtifacts( task, session, pom, artifacts ) );
-        boolean snapshot = request.getArtifacts().iterator().next().isSnapshot();
-        RemoteRepository distRepo = ( snapshot && snapshotRepository != null ) ? snapshotRepository : releaseRepository;
-        request.setRepository( ConverterUtils.toDistRepository( distRepo, session ) );
-
-        try
-        {
-            getSystem().deploy( session, request );
-        }
-        catch ( DeploymentException e )
-        {
-            throw new BuildException( "Could not deploy artifacts: " + e.getMessage(), e );
-        }
-    }
-
-    private List<org.eclipse.aether.artifact.Artifact> toArtifacts( Task task, RepositorySystemSession session,
-                                                                    Pom pom, Artifacts artifacts )
-    {
-        Model model = pom.getModel( task );
-        File pomFile = pom.getFile();
-
-        List<org.eclipse.aether.artifact.Artifact> results = new ArrayList<org.eclipse.aether.artifact.Artifact>();
-
-        org.eclipse.aether.artifact.Artifact pomArtifact =
-            new DefaultArtifact( model.getGroupId(), model.getArtifactId(), "pom", model.getVersion() ).setFile( pomFile );
-        results.add( pomArtifact );
-
-        for ( Artifact artifact : artifacts.getArtifacts() )
-        {
-            org.eclipse.aether.artifact.Artifact buildArtifact =
-                new DefaultArtifact( model.getGroupId(), model.getArtifactId(), artifact.getClassifier(),
-                                     artifact.getType(), model.getVersion() ).setFile( artifact.getFile() );
-            results.add( buildArtifact );
-        }
-
-        return results;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/AntRepositoryListener.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/AntRepositoryListener.java b/src/main/java/org/apache/maven/resolver/internal/ant/AntRepositoryListener.java
deleted file mode 100644
index f850357..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/AntRepositoryListener.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import java.io.FileNotFoundException;
-
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.eclipse.aether.AbstractRepositoryListener;
-import org.eclipse.aether.RepositoryEvent;
-import org.eclipse.aether.transfer.MetadataNotFoundException;
-
-/**
- * Logs repository events like installed and unresolved artifacts and metadata.
- */
-class AntRepositoryListener
-    extends AbstractRepositoryListener
-{
-
-    private Task task;
-
-    public AntRepositoryListener( Task task )
-    {
-        this.task = task;
-    }
-
-    @Override
-    public void artifactInstalling( RepositoryEvent event )
-    {
-        task.log( "Installing " + event.getArtifact().getFile() + " to " + event.getFile() );
-    }
-
-    @Override
-    public void metadataInstalling( RepositoryEvent event )
-    {
-        task.log( "Installing " + event.getMetadata() + " to " + event.getFile() );
-    }
-
-    @Override
-    public void metadataResolved( RepositoryEvent event )
-    {
-        Exception e = event.getException();
-        if ( e != null )
-        {
-            if ( e instanceof MetadataNotFoundException )
-            {
-                task.log( e.getMessage(), Project.MSG_DEBUG );
-            }
-            else
-            {
-                task.log( e.getMessage(), e, Project.MSG_WARN );
-            }
-        }
-    }
-
-    @Override
-    public void metadataInvalid( RepositoryEvent event )
-    {
-        Exception exception = event.getException();
-
-        StringBuilder buffer = new StringBuilder( 256 );
-        buffer.append( "The metadata " );
-        if ( event.getMetadata().getFile() != null )
-        {
-            buffer.append( event.getMetadata().getFile() );
-        }
-        else
-        {
-            buffer.append( event.getMetadata() );
-        }
-
-        if ( exception instanceof FileNotFoundException )
-        {
-            buffer.append( " is inaccessible" );
-        }
-        else
-        {
-            buffer.append( " is invalid" );
-        }
-
-        if ( exception != null )
-        {
-            buffer.append( ": " );
-            buffer.append( exception.getMessage() );
-        }
-
-        task.log( buffer.toString(), exception, Project.MSG_WARN );
-    }
-
-    @Override
-    public void artifactDescriptorInvalid( RepositoryEvent event )
-    {
-        task.log( "The POM for " + event.getArtifact() + " is invalid"
-                      + ", transitive dependencies (if any) will not be available: "
-                      + event.getException().getMessage(),
-                  event.getException(), Project.MSG_WARN );
-    };
-
-    @Override
-    public void artifactDescriptorMissing( RepositoryEvent event )
-    {
-        task.log( "The POM for " + event.getArtifact() + " is missing, no dependency information available",
-                  Project.MSG_WARN );
-    };
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/AntSecDispatcher.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/AntSecDispatcher.java b/src/main/java/org/apache/maven/resolver/internal/ant/AntSecDispatcher.java
deleted file mode 100644
index 0852f86..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/AntSecDispatcher.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import org.sonatype.plexus.components.cipher.DefaultPlexusCipher;
-import org.sonatype.plexus.components.cipher.PlexusCipherException;
-import org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher;
-
-/**
- */
-class AntSecDispatcher
-    extends DefaultSecDispatcher
-{
-
-    public AntSecDispatcher()
-    {
-        _configurationFile = "~/.m2/settings-security.xml";
-        try
-        {
-            _cipher = new DefaultPlexusCipher();
-        }
-        catch ( PlexusCipherException e )
-        {
-            e.printStackTrace();
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/AntServiceLocatorErrorHandler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/AntServiceLocatorErrorHandler.java b/src/main/java/org/apache/maven/resolver/internal/ant/AntServiceLocatorErrorHandler.java
deleted file mode 100644
index 1621285..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/AntServiceLocatorErrorHandler.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import org.apache.tools.ant.Project;
-import org.eclipse.aether.RepositorySystem;
-import org.eclipse.aether.impl.DefaultServiceLocator;
-
-/**
- */
-class AntServiceLocatorErrorHandler
-    extends DefaultServiceLocator.ErrorHandler
-{
-
-    private Project project;
-
-    public AntServiceLocatorErrorHandler( Project project )
-    {
-        this.project = project;
-    }
-
-    public void serviceCreationFailed( Class<?> type, Class<?> impl, Throwable exception )
-    {
-        String msg = "Could not initialize repository system";
-        if ( !RepositorySystem.class.equals( type ) )
-        {
-            msg += ", service " + type.getName() + " (" + impl.getName() + ") failed to initialize";
-        }
-        msg += ": " + exception.getMessage();
-        project.log( msg, exception, Project.MSG_ERR );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java b/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
deleted file mode 100644
index 39ef960..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import java.lang.reflect.Field;
-
-import org.apache.maven.settings.crypto.DefaultSettingsDecrypter;
-
-/**
- */
-class AntSettingsDecryptorFactory
-{
-
-    public DefaultSettingsDecrypter newInstance()
-    {
-        AntSecDispatcher secDispatcher = new AntSecDispatcher();
-
-        DefaultSettingsDecrypter decrypter = new DefaultSettingsDecrypter();
-
-        try
-        {
-            Field field = decrypter.getClass().getDeclaredField( "securityDispatcher" );
-            field.setAccessible( true );
-            field.set( decrypter, secDispatcher );
-        }
-        catch ( Exception e )
-        {
-            throw new IllegalStateException( e );
-        }
-
-        return decrypter;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/AntTransferListener.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/AntTransferListener.java b/src/main/java/org/apache/maven/resolver/internal/ant/AntTransferListener.java
deleted file mode 100644
index 6844d22..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/AntTransferListener.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import java.text.DecimalFormat;
-import java.text.DecimalFormatSymbols;
-import java.util.Locale;
-
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.eclipse.aether.transfer.AbstractTransferListener;
-import org.eclipse.aether.transfer.TransferCancelledException;
-import org.eclipse.aether.transfer.TransferEvent;
-import org.eclipse.aether.transfer.TransferResource;
-
-/**
- * Logs up- and downloads.
- */
-class AntTransferListener
-    extends AbstractTransferListener
-{
-
-    private Task task;
-
-    public AntTransferListener( Task task )
-    {
-        this.task = task;
-    }
-
-    @Override
-    public void transferInitiated( TransferEvent event )
-        throws TransferCancelledException
-    {
-        String msg = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
-        msg += " " + event.getResource().getRepositoryUrl() + event.getResource().getResourceName();
-        task.log( msg );
-    }
-
-    @Override
-    public void transferCorrupted( TransferEvent event )
-        throws TransferCancelledException
-    {
-        TransferResource resource = event.getResource();
-
-        task.log( event.getException().getMessage() + " for " + resource.getRepositoryUrl()
-                      + resource.getResourceName(), Project.MSG_WARN );
-    }
-
-    @Override
-    public void transferSucceeded( TransferEvent event )
-    {
-        String msg = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded";
-        msg += " " + event.getResource().getRepositoryUrl() + event.getResource().getResourceName();
-
-        long contentLength = event.getTransferredBytes();
-        if ( contentLength >= 0 )
-        {
-            String len = contentLength >= 1024 ? ( ( contentLength + 1023 ) / 1024 ) + " KB" : contentLength + " B";
-
-            String throughput = "";
-            long duration = System.currentTimeMillis() - event.getResource().getTransferStartTime();
-            if ( duration > 0 )
-            {
-                DecimalFormat format = new DecimalFormat( "0.0", new DecimalFormatSymbols( Locale.ENGLISH ) );
-                double kbPerSec = ( contentLength / 1024.0 ) / ( duration / 1000.0 );
-                throughput = " at " + format.format( kbPerSec ) + " KB/sec";
-            }
-
-            msg += " (" + len + throughput + ")";
-        }
-        task.log( msg );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java b/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
deleted file mode 100644
index 6452ec1..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
+++ /dev/null
@@ -1,227 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.maven.resolver.internal.ant.types.Authentication;
-import org.apache.maven.resolver.internal.ant.types.Dependency;
-import org.apache.maven.resolver.internal.ant.types.Exclusion;
-import org.apache.maven.resolver.internal.ant.types.Proxy;
-import org.apache.maven.resolver.internal.ant.types.RemoteRepositories;
-import org.apache.maven.resolver.internal.ant.types.RemoteRepository;
-import org.apache.tools.ant.Project;
-import org.eclipse.aether.RepositorySystemSession;
-import org.eclipse.aether.artifact.Artifact;
-import org.eclipse.aether.artifact.ArtifactProperties;
-import org.eclipse.aether.artifact.ArtifactType;
-import org.eclipse.aether.artifact.ArtifactTypeRegistry;
-import org.eclipse.aether.artifact.DefaultArtifact;
-import org.eclipse.aether.artifact.DefaultArtifactType;
-import org.eclipse.aether.impl.RemoteRepositoryManager;
-import org.eclipse.aether.repository.RepositoryPolicy;
-import org.eclipse.aether.util.repository.AuthenticationBuilder;
-
-/**
- * Utility methods to convert between Aether and Ant objects.
- */
-class ConverterUtils
-{
-
-    private static org.eclipse.aether.artifact.Artifact toArtifact( Dependency dependency, ArtifactTypeRegistry types )
-    {
-        ArtifactType type = types.get( dependency.getType() );
-        if ( type == null )
-        {
-            type = new DefaultArtifactType( dependency.getType() );
-        }
-
-        Map<String, String> props = null;
-        if ( "system".equals( dependency.getScope() ) && dependency.getSystemPath() != null )
-        {
-            props = Collections.singletonMap( ArtifactProperties.LOCAL_PATH, dependency.getSystemPath().getPath() );
-        }
-
-        Artifact artifact =
-            new DefaultArtifact( dependency.getGroupId(), dependency.getArtifactId(), dependency.getClassifier(), null,
-                                 dependency.getVersion(), props, type );
-
-        return artifact;
-    }
-
-    public static org.eclipse.aether.repository.Authentication toAuthentication( Authentication auth )
-    {
-        if ( auth == null )
-        {
-            return null;
-        }
-        AuthenticationBuilder authBuilder = new AuthenticationBuilder();
-        authBuilder.addUsername( auth.getUsername() ).addPassword( auth.getPassword() );
-        authBuilder.addPrivateKey( auth.getPrivateKeyFile(), auth.getPassphrase() );
-        return authBuilder.build();
-    }
-
-    public static org.eclipse.aether.graph.Dependency toDependency( Dependency dependency, List<Exclusion> exclusions,
-                                                                     RepositorySystemSession session )
-    {
-        return new org.eclipse.aether.graph.Dependency( toArtifact( dependency, session.getArtifactTypeRegistry() ),
-                                                         dependency.getScope(), false,
-                                                         toExclusions( dependency.getExclusions(), exclusions ) );
-    }
-
-    /**
-     * Converts the given ant repository type to an Aether repository instance with authentication and proxy filled in
-     * via the sessions' selectors.
-     */
-    public static org.eclipse.aether.repository.RemoteRepository toDistRepository( RemoteRepository repo,
-                                                                       RepositorySystemSession session )
-    {
-        org.eclipse.aether.repository.RemoteRepository result = toRepository( repo );
-        org.eclipse.aether.repository.RemoteRepository.Builder builder =
-            new org.eclipse.aether.repository.RemoteRepository.Builder( result );
-        builder.setAuthentication( session.getAuthenticationSelector().getAuthentication( result ) );
-        builder.setProxy( session.getProxySelector().getProxy( result ) );
-        return builder.build();
-    }
-
-    private static org.eclipse.aether.graph.Exclusion toExclusion( Exclusion exclusion )
-    {
-        return new org.eclipse.aether.graph.Exclusion( exclusion.getGroupId(), exclusion.getArtifactId(),
-                                                        exclusion.getClassifier(), exclusion.getExtension() );
-    }
-
-    private static Collection<org.eclipse.aether.graph.Exclusion> toExclusions( Collection<Exclusion> exclusions1,
-                                                                                 Collection<Exclusion> exclusions2 )
-    {
-        Collection<org.eclipse.aether.graph.Exclusion> results =
-            new LinkedHashSet<org.eclipse.aether.graph.Exclusion>();
-        if ( exclusions1 != null )
-        {
-            for ( Exclusion exclusion : exclusions1 )
-            {
-                results.add( toExclusion( exclusion ) );
-            }
-        }
-        if ( exclusions2 != null )
-        {
-            for ( Exclusion exclusion : exclusions2 )
-            {
-                results.add( toExclusion( exclusion ) );
-            }
-        }
-        return results;
-    }
-
-    private static RepositoryPolicy toPolicy( RemoteRepository.Policy policy, boolean enabled, String updates,
-                                              String checksums )
-    {
-        if ( policy != null )
-        {
-            enabled = policy.isEnabled();
-            if ( policy.getChecksums() != null )
-            {
-                checksums = policy.getChecksums();
-            }
-            if ( policy.getUpdates() != null )
-            {
-                updates = policy.getUpdates();
-            }
-        }
-        return new RepositoryPolicy( enabled, updates, checksums );
-    }
-
-    /**
-     * Adds every &lt;String, String>-entry in the map as a property to the given Properties.
-     */
-    public static Properties addProperties( Properties props, Map<?, ?> map )
-    {
-        if ( props == null )
-        {
-            props = new Properties();
-        }
-        for ( Map.Entry<?, ?> entry : map.entrySet() )
-        {
-            if ( entry.getKey() instanceof String && entry.getValue() instanceof String )
-            {
-                props.put( entry.getKey(), entry.getValue() );
-            }
-        }
-        return props;
-    }
-
-    public static org.eclipse.aether.repository.Proxy toProxy( Proxy proxy )
-    {
-        if ( proxy == null )
-        {
-            return null;
-        }
-        return new org.eclipse.aether.repository.Proxy( proxy.getType(), proxy.getHost(), proxy.getPort(),
-                                                         toAuthentication( proxy.getAuthentication() ) );
-    }
-
-    private static org.eclipse.aether.repository.RemoteRepository toRepository( RemoteRepository repo )
-    {
-        org.eclipse.aether.repository.RemoteRepository.Builder builder =
-            new org.eclipse.aether.repository.RemoteRepository.Builder( repo.getId(), repo.getType(), repo.getUrl() );
-        builder.setSnapshotPolicy( toPolicy( repo.getSnapshotPolicy(), repo.isSnapshots(), repo.getUpdates(),
-                                             repo.getChecksums() ) );
-        builder.setReleasePolicy( toPolicy( repo.getReleasePolicy(), repo.isReleases(), repo.getUpdates(),
-                                            repo.getChecksums() ) );
-        builder.setAuthentication( toAuthentication( repo.getAuthentication() ) );
-        return builder.build();
-    }
-
-    public static List<org.eclipse.aether.repository.RemoteRepository> toRepositories( Project project,
-                                                                          RepositorySystemSession session,
-                                                                          RemoteRepositories repos, RemoteRepositoryManager remoteRepositoryManager )
-    {
-        List<RemoteRepository> repositories;
-
-        if ( repos != null )
-        {
-            repositories = repos.getRepositories();
-        }
-        else
-        {
-            repositories = new ArrayList<RemoteRepository>();
-        }
-
-        List<org.eclipse.aether.repository.RemoteRepository> results =
-            new ArrayList<org.eclipse.aether.repository.RemoteRepository>();
-        for ( RemoteRepository repo : repositories )
-        {
-            results.add( toRepository( repo ) );
-        }
-
-        results =
-            remoteRepositoryManager.aggregateRepositories( session,
-                                                      Collections.<org.eclipse.aether.repository.RemoteRepository>emptyList(),
-                                                      results, true );
-
-        return results;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/Names.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/Names.java b/src/main/java/org/apache/maven/resolver/internal/ant/Names.java
deleted file mode 100644
index 122bafa..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/Names.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-/**
- */
-public final class Names
-{
-
-    private Names()
-    {
-        // hide constructor
-    }
-
-    public static final String ID = "resolver";
-
-    public static final String ID_DEFAULT_REPOS = ID + ".repositories";
-
-    public static final String ID_DEFAULT_POM = ID + ".pom";
-
-    public static final String ID_CENTRAL = "central";
-
-    public static final String PROPERTY_OFFLINE = ID + ".offline";
-
-    public static final String SETTINGS_XML = "settings.xml";
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReader.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReader.java b/src/main/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReader.java
deleted file mode 100644
index 8ae2857..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReader.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.maven.model.Model;
-import org.apache.maven.resolver.internal.ant.types.Pom;
-import org.eclipse.aether.artifact.Artifact;
-import org.eclipse.aether.artifact.DefaultArtifact;
-import org.eclipse.aether.repository.WorkspaceReader;
-import org.eclipse.aether.repository.WorkspaceRepository;
-import org.eclipse.aether.util.artifact.ArtifactIdUtils;
-
-/**
- * Workspace reader caching available POMs and artifacts for ant builds.
- * <p/>
- * &lt;pom> elements are cached if they are defined by the 'file'-attribute, as they reference a backing pom.xml file that
- * can be used for resolution with Aether. &lt;artifact> elements are cached if they directly define a 'pom'-attribute
- * or child. The POM may be file-based or in-memory.
- */
-public class ProjectWorkspaceReader
-    implements WorkspaceReader
-{
-
-    private static volatile ProjectWorkspaceReader instance;
-
-    private static final Object LOCK = new Object();
-
-    private Map<String, Artifact> artifacts = new ConcurrentHashMap<String, Artifact>();
-
-    public void addPom( Pom pom )
-    {
-        if ( pom.getFile() != null )
-        {
-            Model model = pom.getModel( pom );
-            Artifact aetherArtifact =
-                new DefaultArtifact( model.getGroupId(), model.getArtifactId(), null, "pom", model.getVersion() );
-            aetherArtifact = aetherArtifact.setFile( pom.getFile() );
-            String coords = coords( aetherArtifact );
-            artifacts.put( coords, aetherArtifact );
-        }
-    }
-
-    public void addArtifact( org.apache.maven.resolver.internal.ant.types.Artifact artifact )
-    {
-        if ( artifact.getPom() != null )
-        {
-            Pom pom = artifact.getPom();
-            Artifact aetherArtifact;
-            if ( pom.getFile() != null )
-            {
-                Model model = pom.getModel( pom );
-                aetherArtifact =
-                    new DefaultArtifact( model.getGroupId(), model.getArtifactId(), artifact.getClassifier(),
-                                         artifact.getType(), model.getVersion() );
-            }
-            else
-            {
-                aetherArtifact =
-                    new DefaultArtifact( pom.getGroupId(), pom.getArtifactId(), artifact.getClassifier(),
-                                         artifact.getType(), pom.getVersion() );
-            }
-            aetherArtifact = aetherArtifact.setFile( artifact.getFile() );
-
-            String coords = coords( aetherArtifact );
-            artifacts.put( coords, aetherArtifact );
-        }
-    }
-
-    private String coords( Artifact artifact )
-    {
-        return ArtifactIdUtils.toId( artifact );
-    }
-
-    public WorkspaceRepository getRepository()
-    {
-        return new WorkspaceRepository( "ant" );
-    }
-
-    public File findArtifact( Artifact artifact )
-    {
-        artifact = artifacts.get( coords( artifact ) );
-        return ( artifact != null ) ? artifact.getFile() : null;
-    }
-
-    public List<String> findVersions( Artifact artifact )
-    {
-        List<String> versions = new ArrayList<String>();
-        for ( Artifact art : artifacts.values() )
-        {
-            if ( ArtifactIdUtils.equalsVersionlessId( artifact, art ) )
-            {
-                versions.add( art.getVersion() );
-            }
-        }
-        return versions;
-    }
-
-    ProjectWorkspaceReader()
-    {
-    }
-
-    public static ProjectWorkspaceReader getInstance()
-    {
-        if ( instance == null )
-        {
-            synchronized ( LOCK )
-            {
-                if ( instance == null )
-                {
-                    instance = new ProjectWorkspaceReader();
-                }
-            }
-        }
-        return instance;
-    }
-
-    static void dropInstance()
-    {
-        instance = null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/SettingsUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/SettingsUtils.java b/src/main/java/org/apache/maven/resolver/internal/ant/SettingsUtils.java
deleted file mode 100644
index 51cb0d1..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/SettingsUtils.java
+++ /dev/null
@@ -1,182 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.maven.settings.Activation;
-import org.apache.maven.settings.ActivationFile;
-import org.apache.maven.settings.ActivationOS;
-import org.apache.maven.settings.ActivationProperty;
-import org.apache.maven.settings.Profile;
-import org.apache.maven.settings.Repository;
-import org.apache.maven.settings.RepositoryPolicy;
-
-/**
- * Utility methods to read settings from Mavens settings.xml.
- */
-class SettingsUtils
-{
-
-    public static List<org.apache.maven.model.Profile> convert( List<Profile> profiles )
-    {
-        if ( profiles == null )
-        {
-            return null;
-        }
-
-        List<org.apache.maven.model.Profile> results = new ArrayList<org.apache.maven.model.Profile>();
-
-        for ( Profile profile : profiles )
-        {
-            results.add( convert( profile ) );
-        }
-
-        return results;
-    }
-
-    static org.apache.maven.model.Profile convert( Profile profile )
-    {
-        if ( profile == null )
-        {
-            return null;
-        }
-
-        org.apache.maven.model.Profile result = new org.apache.maven.model.Profile();
-
-        result.setId( profile.getId() );
-        result.setProperties( profile.getProperties() );
-        result.setSource( "settings.xml" );
-        result.setActivation( convert( profile.getActivation() ) );
-
-        for ( Repository repo : profile.getRepositories() )
-        {
-            result.addRepository( convert( repo ) );
-        }
-
-        for ( Repository repo : profile.getPluginRepositories() )
-        {
-            result.addPluginRepository( convert( repo ) );
-        }
-
-        return result;
-    }
-
-    static org.apache.maven.model.Activation convert( Activation activation )
-    {
-        if ( activation == null )
-        {
-            return null;
-        }
-
-        org.apache.maven.model.Activation result = new org.apache.maven.model.Activation();
-
-        result.setActiveByDefault( activation.isActiveByDefault() );
-        result.setJdk( activation.getJdk() );
-        result.setFile( convert( activation.getFile() ) );
-        result.setProperty( convert( activation.getProperty() ) );
-        result.setOs( convert( activation.getOs() ) );
-
-        return result;
-    }
-
-    static org.apache.maven.model.ActivationOS convert( ActivationOS activation )
-    {
-        if ( activation == null )
-        {
-            return null;
-        }
-
-        org.apache.maven.model.ActivationOS result = new org.apache.maven.model.ActivationOS();
-
-        result.setArch( activation.getArch() );
-        result.setFamily( activation.getFamily() );
-        result.setName( activation.getName() );
-        result.setVersion( activation.getVersion() );
-
-        return result;
-    }
-
-    static org.apache.maven.model.ActivationProperty convert( ActivationProperty activation )
-    {
-        if ( activation == null )
-        {
-            return null;
-        }
-
-        org.apache.maven.model.ActivationProperty result = new org.apache.maven.model.ActivationProperty();
-
-        result.setName( activation.getName() );
-        result.setValue( activation.getValue() );
-
-        return result;
-    }
-
-    static org.apache.maven.model.ActivationFile convert( ActivationFile activation )
-    {
-        if ( activation == null )
-        {
-            return null;
-        }
-
-        org.apache.maven.model.ActivationFile result = new org.apache.maven.model.ActivationFile();
-
-        result.setExists( activation.getExists() );
-        result.setMissing( activation.getMissing() );
-
-        return result;
-    }
-
-    static org.apache.maven.model.Repository convert( Repository repo )
-    {
-        if ( repo == null )
-        {
-            return null;
-        }
-
-        org.apache.maven.model.Repository result = new org.apache.maven.model.Repository();
-
-        result.setId( repo.getId() );
-        result.setUrl( repo.getUrl() );
-        result.setLayout( repo.getLayout() );
-        result.setReleases( convert( repo.getReleases() ) );
-        result.setSnapshots( convert( repo.getSnapshots() ) );
-
-        return result;
-    }
-
-    static org.apache.maven.model.RepositoryPolicy convert( RepositoryPolicy policy )
-    {
-        if ( policy == null )
-        {
-            return null;
-        }
-
-        org.apache.maven.model.RepositoryPolicy result = new org.apache.maven.model.RepositoryPolicy();
-
-        result.setEnabled( policy.isEnabled() );
-        result.setChecksumPolicy( policy.getChecksumPolicy() );
-        result.setUpdatePolicy( policy.getUpdatePolicy() );
-
-        return result;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/tasks/AbstractDistTask.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/AbstractDistTask.java b/src/main/java/org/apache/maven/resolver/internal/ant/tasks/AbstractDistTask.java
deleted file mode 100644
index 70bebbc..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/AbstractDistTask.java
+++ /dev/null
@@ -1,180 +0,0 @@
-package org.apache.maven.resolver.internal.ant.tasks;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.maven.model.Model;
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-import org.apache.maven.resolver.internal.ant.types.Artifact;
-import org.apache.maven.resolver.internal.ant.types.Artifacts;
-import org.apache.maven.resolver.internal.ant.types.Pom;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public abstract class AbstractDistTask
-    extends Task
-{
-
-    private Pom pom;
-
-    private Artifacts artifacts;
-
-    protected void validate()
-    {
-        getArtifacts().validate( this );
-
-        Map<String, File> duplicates = new HashMap<String, File>();
-        for ( Artifact artifact : getArtifacts().getArtifacts() )
-        {
-            String key = artifact.getType() + ':' + artifact.getClassifier();
-            if ( "pom:".equals( key ) )
-            {
-                throw new BuildException( "You must not specify an <artifact> with type=pom"
-                    + ", please use the <pom> element instead." );
-            }
-            else if ( duplicates.containsKey( key ) )
-            {
-                throw new BuildException( "You must not specify two or more artifacts with the same type ("
-                    + artifact.getType() + ") and classifier (" + artifact.getClassifier() + ")" );
-            }
-            else
-            {
-                duplicates.put( key, artifact.getFile() );
-            }
-
-            validateArtifactGav( artifact );
-        }
-
-        Pom defaultPom = AntRepoSys.getInstance( getProject() ).getDefaultPom();
-        if ( pom == null && defaultPom != null )
-        {
-            log( "Using default POM (" + defaultPom.getCoords() + ")", Project.MSG_INFO );
-            pom = defaultPom;
-        }
-
-        if ( pom == null )
-        {
-            throw new BuildException( "You must specify the <pom file=\"...\"> element"
-                + " to denote the descriptor for the artifacts" );
-        }
-        if ( pom.getFile() == null )
-        {
-            throw new BuildException( "You must specify a <pom> element that has the 'file' attribute set" );
-        }
-    }
-
-    private void validateArtifactGav( Artifact artifact )
-    {
-        Pom artifactPom = artifact.getPom();
-        if ( artifactPom != null )
-        {
-            String gid;
-            String aid;
-            String version;
-            if ( artifactPom.getFile() != null )
-            {
-                Model model = artifactPom.getModel( this );
-                gid = model.getGroupId();
-                aid = model.getArtifactId();
-                version = model.getVersion();
-            }
-            else
-            {
-                gid = artifactPom.getGroupId();
-                aid = artifactPom.getArtifactId();
-                version = artifactPom.getVersion();
-            }
-            
-            Model model = getPom().getModel( this );
-            
-            if ( ! ( model.getGroupId().equals( gid ) && model.getArtifactId().equals( aid ) && model.getVersion().equals( version ) ) )
-            {
-                throw new BuildException( "Artifact references different pom than it would be installed with: "
-                    + artifact.toString() );
-            }
-        }
-    }
-
-    protected Artifacts getArtifacts()
-    {
-        if ( artifacts == null )
-        {
-            artifacts = new Artifacts();
-            artifacts.setProject( getProject() );
-        }
-        return artifacts;
-    }
-
-    public void addArtifact( Artifact artifact )
-    {
-        getArtifacts().addArtifact( artifact );
-    }
-
-    public void addArtifacts( Artifacts artifacts )
-    {
-        getArtifacts().addArtifacts( artifacts );
-    }
-
-    public void setArtifactsRef( Reference ref )
-    {
-        Artifacts artifacts = new Artifacts();
-        artifacts.setProject( getProject() );
-        artifacts.setRefid( ref );
-        getArtifacts().addArtifacts( artifacts );
-    }
-
-    protected Pom getPom()
-    {
-        if ( pom == null )
-        {
-            return AntRepoSys.getInstance( getProject() ).getDefaultPom();
-        }
-
-        return pom;
-    }
-
-    public void addPom( Pom pom )
-    {
-        if ( this.pom != null )
-        {
-            throw new BuildException( "You must not specify multiple <pom> elements" );
-        }
-        this.pom = pom;
-    }
-
-    public void setPomRef( Reference ref )
-    {
-        if ( this.pom != null )
-        {
-            throw new BuildException( "You must not specify multiple <pom> elements" );
-        }
-        pom = new Pom();
-        pom.setProject( getProject() );
-        pom.setRefid( ref );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/tasks/AbstractResolvingTask.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/AbstractResolvingTask.java b/src/main/java/org/apache/maven/resolver/internal/ant/tasks/AbstractResolvingTask.java
deleted file mode 100644
index c19e086..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/AbstractResolvingTask.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.apache.maven.resolver.internal.ant.tasks;
-
-/*
- * 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.
- */
-
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-import org.apache.maven.resolver.internal.ant.types.Dependencies;
-import org.apache.maven.resolver.internal.ant.types.LocalRepository;
-import org.apache.maven.resolver.internal.ant.types.RemoteRepositories;
-import org.apache.maven.resolver.internal.ant.types.RemoteRepository;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.Reference;
-import org.eclipse.aether.collection.CollectResult;
-
-/**
- */
-public abstract class AbstractResolvingTask
-    extends Task
-{
-
-    protected Dependencies dependencies;
-
-    protected RemoteRepositories remoteRepositories;
-
-    protected LocalRepository localRepository;
-
-    public void addDependencies( Dependencies dependencies )
-    {
-        if ( this.dependencies != null )
-        {
-            throw new BuildException( "You must not specify multiple <dependencies> elements" );
-        }
-        this.dependencies = dependencies;
-    }
-
-    public void setDependenciesRef( Reference ref )
-    {
-        if ( dependencies == null )
-        {
-            dependencies = new Dependencies();
-            dependencies.setProject( getProject() );
-        }
-        dependencies.setRefid( ref );
-    }
-
-    public LocalRepository createLocalRepo()
-    {
-        if ( localRepository != null )
-        {
-            throw new BuildException( "You must not specify multiple <localRepo> elements" );
-        }
-        localRepository = new LocalRepository( this );
-        return localRepository;
-    }
-
-    private RemoteRepositories getRemoteRepos()
-    {
-        if ( remoteRepositories == null )
-        {
-            remoteRepositories = new RemoteRepositories();
-            remoteRepositories.setProject( getProject() );
-        }
-        return remoteRepositories;
-    }
-
-    public void addRemoteRepo( RemoteRepository repository )
-    {
-        getRemoteRepos().addRemoterepo( repository );
-    }
-
-    public void addRemoteRepos( RemoteRepositories repositories )
-    {
-        getRemoteRepos().addRemoterepos( repositories );
-    }
-
-    public void setRemoteReposRef( Reference ref )
-    {
-        RemoteRepositories repos = new RemoteRepositories();
-        repos.setProject( getProject() );
-        repos.setRefid( ref );
-        getRemoteRepos().addRemoterepos( repos );
-    }
-
-    protected CollectResult collectDependencies()
-    {
-        return AntRepoSys.getInstance( getProject() ).collectDependencies( this, dependencies, localRepository,
-                                                                           remoteRepositories );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/tasks/DependencyGraphLogger.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/DependencyGraphLogger.java b/src/main/java/org/apache/maven/resolver/internal/ant/tasks/DependencyGraphLogger.java
deleted file mode 100644
index c1fff1d..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/DependencyGraphLogger.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.apache.maven.resolver.internal.ant.tasks;
-
-/*
- * 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.
- */
-
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.eclipse.aether.artifact.Artifact;
-import org.eclipse.aether.graph.Dependency;
-import org.eclipse.aether.graph.DependencyNode;
-import org.eclipse.aether.graph.DependencyVisitor;
-import org.eclipse.aether.util.graph.manager.DependencyManagerUtils;
-
-/**
- */
-class DependencyGraphLogger
-    implements DependencyVisitor
-{
-
-    private Task task;
-
-    private String indent = "";
-
-    public DependencyGraphLogger( Task task )
-    {
-        this.task = task;
-    }
-
-    public boolean visitEnter( DependencyNode node )
-    {
-        StringBuilder buffer = new StringBuilder( 128 );
-        buffer.append( indent );
-        Dependency dep = node.getDependency();
-        if ( dep != null )
-        {
-            Artifact art = dep.getArtifact();
-
-            buffer.append( art );
-            buffer.append( ':' ).append( dep.getScope() );
-
-            String premanagedScope = DependencyManagerUtils.getPremanagedScope( node );
-            if ( premanagedScope != null && !premanagedScope.equals( dep.getScope() ) )
-            {
-                buffer.append( " (scope managed from " ).append( premanagedScope ).append( ")" );
-            }
-
-            String premanagedVersion = DependencyManagerUtils.getPremanagedVersion( node );
-            if ( premanagedVersion != null && !premanagedVersion.equals( art.getVersion() ) )
-            {
-                buffer.append( " (version managed from " ).append( premanagedVersion ).append( ")" );
-            }
-        }
-        else
-        {
-            buffer.append( "Resolved Dependency Graph:" );
-        }
-
-        task.log( buffer.toString(), Project.MSG_VERBOSE );
-        indent += "   ";
-        return true;
-    }
-
-    public boolean visitLeave( DependencyNode node )
-    {
-        indent = indent.substring( 0, indent.length() - 3 );
-        return true;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Deploy.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Deploy.java b/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Deploy.java
deleted file mode 100644
index 742dbc0..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Deploy.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.apache.maven.resolver.internal.ant.tasks;
-
-/*
- * 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.
- */
-
-import org.apache.maven.resolver.internal.ant.AntRepoSys;
-import org.apache.maven.resolver.internal.ant.types.RemoteRepository;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.types.Reference;
-
-/**
- */
-public class Deploy
-    extends AbstractDistTask
-{
-
-    private RemoteRepository repository;
-
-    private RemoteRepository snapshotRepository;
-
-    @Override
-    protected void validate()
-    {
-        super.validate();
-
-        if ( repository == null )
-        {
-            throw new BuildException( "You must specify the <remoteRepo id=\"...\" url=\"...\"> element"
-                + " to denote the target repository for the deployment" );
-        }
-        else
-        {
-            repository.validate( this );
-        }
-        if ( snapshotRepository != null )
-        {
-            snapshotRepository.validate( this );
-        }
-    }
-
-    public void addRemoteRepo( RemoteRepository repository )
-    {
-        if ( this.repository != null )
-        {
-            throw new BuildException( "You must not specify multiple <remoteRepo> elements" );
-        }
-        this.repository = repository;
-    }
-
-    public void setRemoteRepoRef( Reference ref )
-    {
-        if ( repository == null )
-        {
-            repository = new RemoteRepository();
-            repository.setProject( getProject() );
-        }
-        repository.setRefid( ref );
-    }
-
-    public void addSnapshotRepo( RemoteRepository snapshotRepository )
-    {
-        if ( this.snapshotRepository != null )
-        {
-            throw new BuildException( "You must not specify multiple <snapshotRepo> elements" );
-        }
-        this.snapshotRepository = snapshotRepository;
-    }
-
-    public void setSnapshotRepoRef( Reference ref )
-    {
-        if ( snapshotRepository == null )
-        {
-            snapshotRepository = new RemoteRepository();
-            snapshotRepository.setProject( getProject() );
-        }
-        snapshotRepository.setRefid( ref );
-    }
-
-    @Override
-    public void execute()
-        throws BuildException
-    {
-        validate();
-
-        AntRepoSys.getInstance( getProject() ).deploy( this, getPom(), getArtifacts(), repository, snapshotRepository );
-    }
-
-}

Reply | Threaded
Open this post in threaded view
|

[5/9] maven-resolver git commit: moved ant tasks into subfolder

mmoser
In reply to this post by mmoser
http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Deploy/ant.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Deploy/ant.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Deploy/ant.xml
new file mode 100644
index 0000000..2ad2d7a
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Deploy/ant.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<!DOCTYPE project [
+       <!ENTITY common SYSTEM "../common.xml">
+]>
+
+<project xmlns:repo="antlib:org.apache.maven.resolver.ant">
+
+  &common;
+
+  <repo:remoterepo id="distrepo" url="${project.distrepo.url}" type="default" releases="true" snapshots="true" updates="always" checksums="fail"/>
+  
+  <target name="setUp">
+    <touch file="${project.dir}/dummy-pom.xml"/>
+    <touch file="${project.dir}/other-pom.xml"/>
+    <touch file="${project.dir}/ant.xml"/>
+  </target>
+  
+  <target name="testDeployGlobalPom" depends="setUp">
+    <repo:pom file="${project.dir}/dummy-pom.xml"/>
+    <repo:deploy remotereporef="distrepo"/>
+  </target>
+  
+  <target name="testDeployOverrideGlobalPom" depends="setUp">
+    <repo:pom file="${project.dir}/dummy-pom.xml"/>
+    <repo:deploy remotereporef="distrepo">
+      <pom file="${project.dir}/other-pom.xml"/>
+    </repo:deploy>
+  </target>
+  
+  <target name="testDeployOverrideGlobalPomByRef" depends="setUp">
+    <repo:pom file="${project.dir}/dummy-pom.xml"/>
+    <repo:pom file="${project.dir}/other-pom.xml" id="other"/>
+    <repo:deploy remotereporef="distrepo"/>
+    <repo:deploy pomref="other" remotereporef="distrepo"/>
+  </target>
+  
+  <target name="testDeployAttachedArtifact" depends="setUp">
+    <repo:pom file="${project.dir}/dummy-pom.xml"/>
+    <repo:artifact classifier="ant" file="${project.dir}/ant.xml" id="ant"/>
+    <repo:deploy remotereporef="distrepo">
+      <repo:artifact refid="ant"/>
+    </repo:deploy>
+  </target>
+
+  <target name="testInlineRepo" depends="setUp">
+    <repo:localrepo dir="${build.dir}/local-repo-custom" />
+    <repo:deploy pomref="pom" remotereporef="distrepo">
+      <repo:artifact refid="ant"/>
+    </repo:deploy>
+  </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Deploy/dummy-pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Deploy/dummy-pom.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Deploy/dummy-pom.xml
new file mode 100644
index 0000000..0041f8c
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Deploy/dummy-pom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<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>test</groupId>
+  <artifactId>dummy</artifactId>
+  <version>0.1-SNAPSHOT</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Deploy/other-pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Deploy/other-pom.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Deploy/other-pom.xml
new file mode 100644
index 0000000..626bede
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Deploy/other-pom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<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>test</groupId>
+  <artifactId>other</artifactId>
+  <version>0.1-SNAPSHOT</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Install/ant.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Install/ant.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Install/ant.xml
new file mode 100644
index 0000000..a4bd6eb
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Install/ant.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<!DOCTYPE project [
+       <!ENTITY common SYSTEM "../common.xml">
+]>
+
+<project xmlns:repo="antlib:org.apache.maven.resolver.ant">
+
+  &common;
+
+  <repo:pom file="${project.dir}/dummy-pom.xml" id="pom"/>
+  <repo:artifact classifier="ant" file="${project.dir}/ant.xml" id="ant"/>
+
+  <target name="setUp">
+    <touch file="${project.dir}/dummy-pom.xml"/>
+    <touch file="${project.dir}/other-pom.xml"/>
+    <touch file="${project.dir}/ant.xml"/>
+  </target>
+
+  <target name="testInstallGlobalPom" depends="setUp">
+    <repo:pom file="${project.dir}/dummy-pom.xml"/>
+    <repo:install/>
+  </target>
+
+  <target name="testInstallOverrideGlobalPom" depends="setUp">
+    <repo:pom file="${project.dir}/dummy-pom.xml"/>
+    <repo:install>
+      <pom file="${project.dir}/other-pom.xml"/>
+    </repo:install>
+  </target>
+
+  <target name="testInstallOverrideGlobalPomByRef" depends="setUp">
+    <repo:pom file="${project.dir}/dummy-pom.xml"/>
+    <repo:pom file="${project.dir}/other-pom.xml" id="other"/>
+    <repo:install/>
+    <repo:install pomref="other"/>
+  </target>
+
+  <target name="testDefaultRepo" depends="setUp">
+    <repo:install pomref="pom">
+      <repo:artifact refid="ant"/>
+    </repo:install>
+  </target>
+
+  <target name="testCustomRepo" depends="setUp">
+    <repo:localrepo dir="${build.dir}/local-repo-custom" />
+    <repo:install pomref="pom">
+      <repo:artifact refid="ant"/>
+    </repo:install>
+  </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Install/dummy-pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Install/dummy-pom.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Install/dummy-pom.xml
new file mode 100644
index 0000000..0041f8c
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Install/dummy-pom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<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>test</groupId>
+  <artifactId>dummy</artifactId>
+  <version>0.1-SNAPSHOT</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Install/other-pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Install/other-pom.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Install/other-pom.xml
new file mode 100644
index 0000000..626bede
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Install/other-pom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<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>test</groupId>
+  <artifactId>other</artifactId>
+  <version>0.1-SNAPSHOT</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Reactor/ant.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Reactor/ant.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Reactor/ant.xml
new file mode 100644
index 0000000..7b7976a
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Reactor/ant.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<!DOCTYPE project [
+       <!ENTITY common SYSTEM "../common.xml">
+]>
+
+<project xmlns:repo="antlib:org.apache.maven.resolver.ant">
+
+  &common;
+  
+  <target name="testPom">
+    <repo:pom file="${project.dir}/pom1.xml"/>
+  </target>
+  
+  <target name="testArtifact">
+    <repo:pom file="${project.dir}/pom1.xml" id="pom"/>
+    <repo:artifact pomref="pom" file="${project.dir}/pom1.xml"/>
+  </target>
+  
+  <target name="testArtifactInMemoryPom">
+    <repo:pom groupid="test" artifactid="test" version="0.1-SNAPSHOT" id="pom"/>
+    <repo:artifact pomref="pom" file="${project.dir}/pom1.xml"/>
+  </target>
+
+  <target name="testResolveArtifact">
+    <repo:pom file="${project.dir}/pom1.xml" id="pom"/>
+    <repo:artifact pomref="pom" file="${project.dir}/pom1.xml" type="jar"/>
+    <repo:pom file="${project.dir}/pom2.xml" id="pom2"/>
+
+    <repo:resolve>
+      <dependencies pomref="pom2"/>
+      <properties prefix="resolve"/>
+    </repo:resolve>
+  </target>
+
+  <target name="testResolveArtifactInMemoryPom">
+    <repo:pom groupid="test" artifactid="test" version="0.1-SNAPSHOT" id="pom"/>
+    <repo:artifact pomref="pom" file="${project.dir}/pom1.xml" type="jar"/>
+    <repo:pom file="${project.dir}/pom2.xml" id="pom2"/>
+
+    <repo:resolve>
+      <dependencies pomref="pom2"/>
+      <properties prefix="resolve"/>
+    </repo:resolve>
+  </target>
+
+  <target name="testResolveVersionRange">
+    <repo:pom file="${project.dir}/pom1.xml" id="pom"/>
+    <repo:artifact pomref="pom" file="${project.dir}/pom1.xml" type="jar"/>
+
+    <repo:resolve>
+      <dependencies>
+        <dependency groupId="test" artifactId="test" version="[0,)"/>
+      </dependencies>
+      <properties prefix="resolve"/>
+    </repo:resolve>
+  </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Reactor/pom1.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Reactor/pom1.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Reactor/pom1.xml
new file mode 100644
index 0000000..84496ca
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Reactor/pom1.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<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>test</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1-SNAPSHOT</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Reactor/pom2.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Reactor/pom2.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Reactor/pom2.xml
new file mode 100644
index 0000000..e0d5be6
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Reactor/pom2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<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>test</groupId>
+  <artifactId>test2</artifactId>
+  <version>0.1-SNAPSHOT</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>test</groupId>
+      <artifactId>test</artifactId>
+      <version>0.1-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/ant.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/ant.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/ant.xml
new file mode 100644
index 0000000..4565ea7
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/ant.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<!DOCTYPE project [
+       <!ENTITY common SYSTEM "../common.xml">
+]>
+
+<project xmlns:repo="antlib:org.apache.maven.resolver.ant">
+
+  &common;
+
+  <repo:remoterepo id="remote" url="http://repo1.maven.org/maven2" type="default" releases="true" snapshots="true" updates="always" checksums="fail"/>
+  <repo:remoterepos id="resolver.repositories">
+    <repo:remoterepo refid="remote"/>
+  </repo:remoterepos>
+
+  <target name="setUp">
+    <delete dir="${build.dir}/resolvetest-local-repo"/>
+  </target>
+
+  <target name="testResolveGlobalPom">
+    <repo:pom file="${project.dir}/pom.xml"/>
+    <repo:resolve>
+      <properties prefix="test.resolve.path" classpath="compile"/>
+    </repo:resolve>
+  </target>
+
+  <target name="testResolveOverrideGlobalPom">
+    <repo:pom file="${project.dir}/dummy-pom.xml"/>
+    <repo:resolve>
+      <dependencies>
+        <pom file="${project.dir}/pom.xml"/>
+      </dependencies>
+      <properties prefix="test.resolve.path" classpath="compile"/>
+    </repo:resolve>
+  </target>
+
+  <target name="testResolveGlobalPomIntoOtherLocalRepo">
+    <repo:localrepo dir="${build.dir}/local-repo-custom"/>
+    <repo:pom file="${project.dir}/pom.xml"/>
+    <repo:resolve>
+      <properties prefix="test.resolve.path" classpath="compile"/>
+    </repo:resolve>
+  </target>
+
+  <target name="testResolveCustomFileLayout">
+    <repo:pom file="${project.dir}/pom.xml"/>
+    <repo:resolve>
+      <files dir="${build.dir}/resolve-custom-layout/" layout="{groupId}/{artifactId}/{groupIdDirs}/{extension}"/>
+    </repo:resolve>
+  </target>
+
+  <target name="testResolveAttachments">
+    <repo:resolve>
+      <dependencies>
+        <dependency groupid="org.eclipse.aether" artifactid="aether-impl" version="0.9.0.v20140226" />
+      </dependencies>
+      <files dir="${build.dir}/resolve-attachments/" layout="javadoc/{groupId}-{artifactId}-{classifier}.{extension}" attachments="javadoc"/>
+      <files dir="${build.dir}/resolve-attachments/" layout="sources/{groupId}-{artifactId}-{classifier}.{extension}" attachments="sources"/>
+    </repo:resolve>
+  </target>
+
+  <target name="testResolvePath">
+    <repo:pom file="${project.dir}/pom.xml"/>
+    <repo:resolve>
+      <path refid="out" classpath="compile"/>
+    </repo:resolve>
+    <echo>${tostring:out}</echo>
+  </target>
+
+  <target name="testResolveDepsFromFile">
+    <repo:resolve>
+      <dependencies file="${project.dir}/dependencies.txt">
+        <exclusion coords="org.eclipse.aether:aether-api"/>
+      </dependencies>
+      <properties prefix="test.resolve.path" classpath="runtime"/>
+    </repo:resolve>
+  </target>
+
+  <target name="testResolveNestedDependencyCollections">
+    <repo:resolve>
+      <dependencies>
+        <dependencies>
+          <dependency groupid="org.eclipse.aether" artifactid="aether-spi" version="0.9.0.v20140226" />
+        </dependencies>
+        <dependencies>
+          <dependency groupid="org.eclipse.aether" artifactid="aether-util" version="0.9.0.v20140226" />
+        </dependencies>
+        <exclusion coords="org.eclipse.aether:aether-api"/>
+      </dependencies>
+      <properties prefix="test.resolve.path" classpath="runtime"/>
+    </repo:resolve>
+  </target>
+
+  <target name="testResolveResourceCollectionOnly">
+    <repo:resolve>
+      <dependencies>
+        <dependency groupid="org.eclipse.aether" artifactid="aether-spi" version="0.9.0.v20140226" />
+      </dependencies>
+      <files refid="files"/>
+    </repo:resolve>
+  </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/dependencies.txt
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/dependencies.txt b/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/dependencies.txt
new file mode 100644
index 0000000..8254bb3
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/dependencies.txt
@@ -0,0 +1,11 @@
+#
+# Copyright (c) 2014 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
+#
+
+# each line specifies one dependency
+org.eclipse.aether:aether-spi:0.9.0.v20140226:runtime  # a comment
+

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/dummy-pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/dummy-pom.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/dummy-pom.xml
new file mode 100644
index 0000000..75bc291
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/dummy-pom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<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>test</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1-SNAPSHOT</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/pom.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/pom.xml
new file mode 100644
index 0000000..392974d
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Resolve/pom.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<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>
+
+  <parent>
+    <groupId>org.sonatype.forge</groupId>
+    <artifactId>forge-parent</artifactId>
+    <version>10</version>
+  </parent>
+
+  <groupId>org.eclipse.aether</groupId>
+  <artifactId>aether-ant-tasks</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <aetherVersion>0.9.0.M3</aetherVersion>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.eclipse.aether</groupId>
+      <artifactId>aether-api</artifactId>
+      <version>${aetherVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.aether</groupId>
+      <artifactId>aether-system</artifactId>
+      <version>${aetherVersion}</version>
+      <type>pom</type>
+      <scope>system</scope>
+      <systemPath>${basedir}/pom.xml</systemPath>
+    </dependency>
+  </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/Settings/ant.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/Settings/ant.xml b/maven-resolver-ant-tasks/src/test/resources/ant/Settings/ant.xml
new file mode 100644
index 0000000..8c1f79a
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/Settings/ant.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<!DOCTYPE project [
+       <!ENTITY common SYSTEM "../common.xml">
+]>
+
+<project xmlns:repo="antlib:org.apache.maven.resolver.ant">
+
+  &common;
+
+  <target name="setUp">
+    <!-- touch file="${project.dir}/common.xml"/-->
+  </target>
+
+  <target name="testUserSettings" depends="setUp">
+    <repo:settings file="userSettings.xml"/>
+  </target>
+
+  <target name="testGlobalSettings" depends="setUp">
+    <repo:settings globalfile="globalSettings.xml"/>
+  </target>
+
+  <target name="testBothSettings" depends="setUp">
+    <repo:settings file="userSettings.xml" globalfile="globalSettings.xml"/>
+  </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ant/common.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ant/common.xml b/maven-resolver-ant-tasks/src/test/resources/ant/common.xml
new file mode 100644
index 0000000..02c0a57
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ant/common.xml
@@ -0,0 +1,20 @@
+<!--
+  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.
+-->
+
+<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml"/>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 85edc0d..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,364 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<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>
-
-  <parent>
-    <groupId>org.apache.maven</groupId>
-    <artifactId>maven-parent</artifactId>
-    <version>30</version>
-    <relativePath>../pom/maven/pom.xml</relativePath>
-  </parent>
-
-  <groupId>org.apache.maven.resolver</groupId>
-  <artifactId>maven-resolver-ant-tasks</artifactId>
-  <version>1.1.0-SNAPSHOT</version>
-
-  <name>Maven Artifact Resolver Ant Tasks</name>
-  <description>
-    Ant tasks handling Maven artifacts using Maven Artifact Resolver and Maven Artifact Resolver Provider.
-  </description>
-  <url>https://maven.apache.org/resolver-ant-tasks/</url>
-  <inceptionYear>2010</inceptionYear>
-
-  <scm>
-    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/maven-resolver.git</connection>
-    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/maven-resolver.git</developerConnection>
-    <url>https://github.com/apache/maven-resolver/tree/${project.scm.tag}</url>
-    <tag>ant-tasks</tag>
-  </scm>
-  <issueManagement>
-    <system>jira</system>
-    <url>https://issues.apache.org/jira/browse/MRESOLVER</url>
-  </issueManagement>
-  <ciManagement>
-    <system>Jenkins</system>
-    <url>https://builds.apache.org/job/maven-resolver-ant-tasks</url>
-  </ciManagement>
-  <distributionManagement>
-    <site>
-      <id>apache.website</id>
-      <url>scm:svn:https://svn.apache.org/repos/infra/websites/production/maven/components/${maven.site.path}</url>
-    </site>
-  </distributionManagement>
-
-  <properties>
-    <mavenVersion>3.5.0</mavenVersion>
-    <resolverVersion>1.0.3</resolverVersion>
-    <javaVersion>7</javaVersion>
-    <maven.site.path>resolver-archives/resolver-ant-tasks-LATEST</maven.site.path>
-    <checkstyle.violation.ignore>LineLength,MagicNumber</checkstyle.violation.ignore>
-  </properties>
-
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>org.codehaus.plexus</groupId>
-        <artifactId>plexus-utils</artifactId>
-        <version>3.0.24</version>
-      </dependency>
-      <dependency>
-        <groupId>org.sonatype.plexus</groupId>
-        <artifactId>plexus-cipher</artifactId>
-        <version>1.7</version>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-
-  <dependencies>
-    <dependency>
-      <!-- NOTE: The target runtime is actually Ant 1.7+ but for compilation we need some newer APIs -->
-      <groupId>org.apache.ant</groupId>
-      <artifactId>ant</artifactId>
-      <version>1.8.2</version>
-      <scope>provided</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.ant</groupId>
-          <artifactId>ant-launcher</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.resolver</groupId>
-      <artifactId>maven-resolver-api</artifactId>
-      <version>${resolverVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.resolver</groupId>
-      <artifactId>maven-resolver-util</artifactId>
-      <version>${resolverVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.resolver</groupId>
-      <artifactId>maven-resolver-impl</artifactId>
-      <version>${resolverVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.resolver</groupId>
-      <artifactId>maven-resolver-connector-basic</artifactId>
-      <version>${resolverVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.resolver</groupId>
-      <artifactId>maven-resolver-transport-classpath</artifactId>
-      <version>${resolverVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.resolver</groupId>
-      <artifactId>maven-resolver-transport-file</artifactId>
-      <version>${resolverVersion}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.resolver</groupId>
-      <artifactId>maven-resolver-transport-http</artifactId>
-      <version>${resolverVersion}</version>
-    </dependency>
-    <dependency>
-      <!-- This shuts off annoying warnings from slf4j-api -->
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-nop</artifactId>
-      <version>1.6.2</version>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-resolver-provider</artifactId>
-      <version>${mavenVersion}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.codehaus.plexus</groupId>
-          <artifactId>plexus-component-annotations</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.eclipse.sisu</groupId>
-          <artifactId>org.eclipse.sisu.plexus</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-settings-builder</artifactId>
-      <version>${mavenVersion}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.codehaus.plexus</groupId>
-          <artifactId>plexus-component-annotations</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-component-annotations</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-interpolation</artifactId>
-      <version>1.16</version>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.sisu</groupId>
-      <artifactId>org.eclipse.sisu.plexus</artifactId>
-      <version>0.1.1</version>
-      <exclusions>
-        <exclusion>
-          <groupId>com.google.guava</groupId>
-          <artifactId>guava</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>javax.enterprise</groupId>
-          <artifactId>cdi-api</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.codehaus.plexus</groupId>
-          <artifactId>plexus-classworlds</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.codehaus.plexus</groupId>
-          <artifactId>plexus-utils</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.eclipse.sisu</groupId>
-          <artifactId>org.eclipse.sisu.inject</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.sonatype.sisu</groupId>
-          <artifactId>sisu-guice</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.11</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.ant</groupId>
-      <artifactId>ant-testutil</artifactId>
-      <version>1.8.2</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.ant</groupId>
-      <artifactId>ant-launcher</artifactId>
-      <version>1.8.2</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-library</artifactId>
-      <version>1.3</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-core</artifactId>
-      <version>1.3</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.resolver</groupId>
-      <artifactId>maven-resolver-test-util</artifactId>
-      <version>${resolverVersion}</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-        <configuration>
-          <excludes combine.children="append">
-            <exclude>src/test/resources/**/*.txt</exclude>
-            <exclude>README.md</exclude>
-            <exclude>src/site/markdown/**/*.md.vm</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
-      <plugin>
-        <artifactId>maven-shade-plugin</artifactId>
-        <version>2.4.3</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <createDependencyReducedPom>false</createDependencyReducedPom>
-              <shadedArtifactAttached>true</shadedArtifactAttached>
-              <shadedClassifierName>uber</shadedClassifierName>
-              <filters>
-                <filter>
-                  <artifact>org.eclipse.sisu:org.eclipse.sisu.plexus</artifact>
-                  <includes>
-                    <include>org/codehaus/plexus/logging/*LogEnabled*</include>
-                    <include>org/codehaus/plexus/logging/Logger*</include>
-                  </includes>
-                </filter>
-                <filter>
-                  <artifact>*:*</artifact>
-                  <excludes>
-                    <exclude>licenses/**</exclude>
-                  </excludes>
-                </filter>
-              </filters>
-              <transformers>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
-              </transformers>
-              <relocations>
-                <relocation>
-                  <pattern>org.eclipse.aether</pattern>
-                  <shadedPattern>org.apache.maven.resolver.internal.ant.org.eclipse.aether</shadedPattern>
-                  <excludes>
-                    <exclude>org.eclipse.aether.ant.**</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>org.sonatype.plexus</pattern>
-                  <shadedPattern>org.apache.maven.resolver.internal.ant.org.sonatype.plexus</shadedPattern>
-                </relocation>
-                <relocation>
-                  <pattern>org.apache</pattern>
-                  <shadedPattern>org.apache.maven.resolver.internal.ant.org.apache</shadedPattern>
-                  <excludes>
-                    <exclude>org.apache.tools.**</exclude>
-                    <exclude>org.apache.maven.aether.**</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>org.codehaus</pattern>
-                  <shadedPattern>org.apache.maven.resolver.internal.ant.org.codehaus</shadedPattern>
-                </relocation>
-                <relocation>
-                  <pattern>org.slf4j</pattern>
-                  <shadedPattern>org.apache.maven.resolver.internal.ant.org.slf4j</shadedPattern>
-                </relocation>
-              </relocations>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-
-  <profiles>
-    <profile>
-      <id>run-its</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
-            <version>1.6</version>
-            <executions>
-              <execution>
-                <id>smoke-test</id>
-                <phase>integration-test</phase>
-                <goals>
-                  <goal>run</goal>
-                </goals>
-                <configuration>
-                  <target>
-                    <ant antfile="build.xml" />
-                  </target>
-                </configuration>
-              </execution>
-            </executions>
-            <dependencies>
-              <dependency>
-                <groupId>org.apache.ant</groupId>
-                <artifactId>ant-junit</artifactId>
-                <version>1.8.2</version>
-              </dependency>
-            </dependencies>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-</project>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/bin.xml b/src/main/assembly/bin.xml
deleted file mode 100644
index a2df39b..0000000
--- a/src/main/assembly/bin.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<assembly>
-  <id>bin</id>
-  <formats>
-    <format>zip</format>
-  </formats>
-  <fileSets>
-    <fileSet>
-      <directory>target</directory>
-      <outputDirectory>.</outputDirectory>
-      <includes>
-        <include>*-uber.jar</include>
-        <include>*-uber.jar.asc</include>
-      </includes>
-      <excludes>
-        <exclude>*-sources.*</exclude>
-        <exclude>*-javadoc.*</exclude>
-      </excludes>
-    </fileSet>
-    <fileSet>
-      <directory>.</directory>
-      <includes>
-        <include>*.html</include>
-      </includes>
-    </fileSet>
-  </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/AetherUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/AetherUtils.java b/src/main/java/org/apache/maven/resolver/internal/ant/AetherUtils.java
deleted file mode 100644
index 6b59f90..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/AetherUtils.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import java.io.File;
-
-import org.apache.maven.resolver.internal.ant.types.RemoteRepositories;
-import org.apache.tools.ant.Project;
-
-class AetherUtils
-{
-
-    public static File findGlobalSettings( Project project )
-    {
-        File file = new File( new File( project.getProperty( "ant.home" ), "etc" ), Names.SETTINGS_XML );
-        if ( file.isFile() )
-        {
-            return file;
-        }
-        else
-        {
-            String mavenHome = getMavenHome( project );
-            if ( mavenHome != null )
-            {
-                return new File( new File( mavenHome, "conf" ), Names.SETTINGS_XML );
-            }
-        }
-    
-        return null;
-    }
-
-    public static String getMavenHome( Project project )
-    {
-        String mavenHome = project.getProperty( "maven.home" );
-        if ( mavenHome != null )
-        {
-            return mavenHome;
-        }
-        return System.getenv( "M2_HOME" );
-    }
-
-    public static File findUserSettings( Project project )
-    {
-        File userHome = new File( project.getProperty( "user.home" ) );
-        File file = new File( new File( userHome, ".ant" ), Names.SETTINGS_XML );
-        if ( file.isFile() )
-        {
-            return file;
-        }
-        else
-        {
-            return new File( new File( userHome, ".m2" ), Names.SETTINGS_XML );
-        }
-    }
-
-    public static RemoteRepositories getDefaultRepositories( Project project )
-    {
-        Object obj = project.getReference( Names.ID_DEFAULT_REPOS );
-        if ( obj instanceof RemoteRepositories )
-        {
-            return (RemoteRepositories) obj;
-        }
-        return null;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/AntLogger.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/AntLogger.java b/src/main/java/org/apache/maven/resolver/internal/ant/AntLogger.java
deleted file mode 100644
index 711d653..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/AntLogger.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import org.apache.tools.ant.Project;
-import org.eclipse.aether.spi.log.Logger;
-
-/**
- */
-class AntLogger
-    implements Logger
-{
-
-    private Project project;
-
-    public AntLogger( Project project )
-    {
-        this.project = project;
-    }
-
-    public void debug( String msg )
-    {
-        project.log( msg, Project.MSG_DEBUG );
-    }
-
-    public void debug( String msg, Throwable error )
-    {
-        project.log( msg, error, Project.MSG_DEBUG );
-    }
-
-    public boolean isDebugEnabled()
-    {
-        return true;
-    }
-
-    public boolean isWarnEnabled()
-    {
-        return true;
-    }
-
-    public void warn( String msg )
-    {
-        project.log( msg, Project.MSG_WARN );
-    }
-
-    public void warn( String msg, Throwable error )
-    {
-        project.log( msg, error, Project.MSG_WARN );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/src/main/java/org/apache/maven/resolver/internal/ant/AntModelResolver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/maven/resolver/internal/ant/AntModelResolver.java b/src/main/java/org/apache/maven/resolver/internal/ant/AntModelResolver.java
deleted file mode 100644
index 43b64f7..0000000
--- a/src/main/java/org/apache/maven/resolver/internal/ant/AntModelResolver.java
+++ /dev/null
@@ -1,180 +0,0 @@
-package org.apache.maven.resolver.internal.ant;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.maven.model.Dependency;
-import org.apache.maven.model.Parent;
-import org.apache.maven.model.Repository;
-import org.apache.maven.model.building.FileModelSource;
-import org.apache.maven.model.building.ModelSource;
-import org.apache.maven.model.resolution.InvalidRepositoryException;
-import org.apache.maven.model.resolution.ModelResolver;
-import org.apache.maven.model.resolution.UnresolvableModelException;
-import org.eclipse.aether.RepositorySystem;
-import org.eclipse.aether.RepositorySystemSession;
-import org.eclipse.aether.artifact.Artifact;
-import org.eclipse.aether.artifact.DefaultArtifact;
-import org.eclipse.aether.impl.RemoteRepositoryManager;
-import org.eclipse.aether.repository.RemoteRepository;
-import org.eclipse.aether.repository.RepositoryPolicy;
-import org.eclipse.aether.resolution.ArtifactRequest;
-import org.eclipse.aether.resolution.ArtifactResolutionException;
-
-/**
- * A model resolver to assist building of dependency POMs. This resolver gives priority to those repositories that have
- * been initially specified and repositories discovered in dependency POMs are recessively merged into the search chain.
- *
- */
-class AntModelResolver
-    implements ModelResolver
-{
-
-    private final RepositorySystemSession session;
-
-    private final String context;
-
-    private List<org.eclipse.aether.repository.RemoteRepository> repositories;
-
-    private final RepositorySystem repoSys;
-
-    private final RemoteRepositoryManager remoteRepositoryManager;
-
-    private final Set<String> repositoryIds;
-
-    public AntModelResolver( RepositorySystemSession session, String context, RepositorySystem repoSys,
-                             RemoteRepositoryManager remoteRepositoryManager, List<RemoteRepository> repositories )
-    {
-        this.session = session;
-        this.context = context;
-        this.repoSys = repoSys;
-        this.remoteRepositoryManager = remoteRepositoryManager;
-        this.repositories = repositories;
-        this.repositoryIds = new HashSet<String>();
-    }
-
-    private AntModelResolver( AntModelResolver original )
-    {
-        this.session = original.session;
-        this.context = original.context;
-        this.repoSys = original.repoSys;
-        this.remoteRepositoryManager = original.remoteRepositoryManager;
-        this.repositories = original.repositories;
-        this.repositoryIds = new HashSet<String>( original.repositoryIds );
-    }
-
-    public void addRepository( Repository repository )
-        throws InvalidRepositoryException
-    {
-        if ( !repositoryIds.add( repository.getId() ) )
-        {
-            return;
-        }
-
-        List<RemoteRepository> newRepositories = Collections.singletonList( convert( repository ) );
-
-        this.repositories =
-            remoteRepositoryManager.aggregateRepositories( session, repositories, newRepositories, true );
-    }
-
-    static RemoteRepository convert( Repository repository )
-    {
-        RemoteRepository.Builder builder =
-            new RemoteRepository.Builder( repository.getId(), repository.getLayout(), repository.getUrl() );
-        builder.setSnapshotPolicy( convert( repository.getSnapshots() ) );
-        builder.setReleasePolicy( convert( repository.getReleases() ) );
-        return builder.build();
-    }
-
-    private static RepositoryPolicy convert( org.apache.maven.model.RepositoryPolicy policy )
-    {
-        boolean enabled = true;
-        String checksums = RepositoryPolicy.CHECKSUM_POLICY_WARN;
-        String updates = RepositoryPolicy.UPDATE_POLICY_DAILY;
-
-        if ( policy != null )
-        {
-            enabled = policy.isEnabled();
-            if ( policy.getUpdatePolicy() != null )
-            {
-                updates = policy.getUpdatePolicy();
-            }
-            if ( policy.getChecksumPolicy() != null )
-            {
-                checksums = policy.getChecksumPolicy();
-            }
-        }
-
-        return new RepositoryPolicy( enabled, updates, checksums );
-    }
-
-    public ModelResolver newCopy()
-    {
-        return new AntModelResolver( this );
-    }
-
-    public ModelSource resolveModel( String groupId, String artifactId, String version )
-        throws UnresolvableModelException
-    {
-        Artifact pomArtifact = new DefaultArtifact( groupId, artifactId, "", "pom", version );
-
-        try
-        {
-            ArtifactRequest request = new ArtifactRequest( pomArtifact, repositories, context );
-            pomArtifact = repoSys.resolveArtifact( session, request ).getArtifact();
-        }
-        catch ( ArtifactResolutionException e )
-        {
-            throw new UnresolvableModelException( "Failed to resolve POM for " + groupId + ":" + artifactId + ":"
-                + version + " due to " + e.getMessage(), groupId, artifactId, version, e );
-        }
-
-        File pomFile = pomArtifact.getFile();
-
-        return new FileModelSource( pomFile );
-    }
-
-    @Override
-    public ModelSource resolveModel( Parent parent )
-        throws UnresolvableModelException
-    {
-        return resolveModel( parent.getGroupId(), parent.getArtifactId(), parent.getVersion() );
-    }
-
-    @Override
-    public ModelSource resolveModel( Dependency dependency )
-        throws UnresolvableModelException
-    {
-        return resolveModel( dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion() );
-    }
-
-    @Override
-    public void addRepository( Repository repository, boolean replace )
-        throws InvalidRepositoryException
-    {
-        addRepository( repository );
-    }
-
-}

Reply | Threaded
Open this post in threaded view
|

[6/9] maven-resolver git commit: moved ant tasks into subfolder

mmoser
In reply to this post by mmoser
http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyEvaluator.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyEvaluator.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyEvaluator.java
new file mode 100644
index 0000000..1b76bfd
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyEvaluator.java
@@ -0,0 +1,62 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import org.apache.tools.ant.PropertyHelper;
+import org.apache.tools.ant.PropertyHelper.PropertyEvaluator;
+import org.apache.tools.ant.property.NullReturn;
+
+/**
+ */
+class PomPropertyEvaluator
+    implements PropertyEvaluator
+{
+
+    private final ModelValueExtractor extractor;
+
+    public static void register( ModelValueExtractor extractor, PropertyHelper propertyHelper )
+    {
+        propertyHelper.add( new PomPropertyEvaluator( extractor ) );
+    }
+
+    private PomPropertyEvaluator( ModelValueExtractor extractor )
+    {
+        if ( extractor == null )
+        {
+            throw new IllegalArgumentException( "no model value exractor specified" );
+        }
+        this.extractor = extractor;
+    }
+
+    public Object evaluate( String property, PropertyHelper propertyHelper )
+    {
+        Object value = extractor.getValue( property );
+        if ( value != null )
+        {
+            return value;
+        }
+        else if ( extractor.isApplicable( property ) )
+        {
+            return NullReturn.NULL;
+        }
+        return null;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyHelper.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyHelper.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyHelper.java
new file mode 100644
index 0000000..5ec23ec
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/PomPropertyHelper.java
@@ -0,0 +1,65 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import org.apache.tools.ant.PropertyHelper;
+
+/**
+ */
+@SuppressWarnings( "deprecation" )
+class PomPropertyHelper
+    extends PropertyHelper
+{
+
+    private final ModelValueExtractor extractor;
+
+    public static void register( ModelValueExtractor extractor, PropertyHelper propertyHelper )
+    {
+        PomPropertyHelper helper = new PomPropertyHelper( extractor );
+        helper.setNext( propertyHelper.getNext() );
+        propertyHelper.setNext( helper );
+    }
+
+    public PomPropertyHelper( ModelValueExtractor extractor )
+    {
+        if ( extractor == null )
+        {
+            throw new IllegalArgumentException( "no model value exractor specified" );
+        }
+        this.extractor = extractor;
+        setProject( extractor.getProject() );
+    }
+
+    @Override
+    public Object getPropertyHook( String ns, String name, boolean user )
+    {
+        Object value = extractor.getValue( name );
+        if ( value != null )
+        {
+            return value;
+        }
+        else if ( extractor.isApplicable( name ) )
+        {
+            return null;
+        }
+        return super.getPropertyHook( ns, name, user );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Proxy.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Proxy.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Proxy.java
new file mode 100644
index 0000000..6116c8e
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Proxy.java
@@ -0,0 +1,163 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.resolver.internal.ant.AntRepoSys;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public class Proxy
+    extends DataType
+{
+
+    private String host;
+
+    private int port;
+
+    private String type;
+
+    private String nonProxyHosts;
+
+    private Authentication authentication;
+
+    @Override
+    public void setProject( Project project )
+    {
+        super.setProject( project );
+
+        AntRepoSys.getInstance( project ).addProxy( this );
+    }
+
+    protected Proxy getRef()
+    {
+        return (Proxy) getCheckedRef();
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( host != null || port != 0 || type != null || nonProxyHosts != null )
+        {
+            throw tooManyAttributes();
+        }
+        if ( authentication != null )
+        {
+            throw noChildrenAllowed();
+        }
+        super.setRefid( ref );
+    }
+
+    public String getHost()
+    {
+        if ( isReference() )
+        {
+            return getRef().getHost();
+        }
+        return host;
+    }
+
+    public void setHost( String host )
+    {
+        checkAttributesAllowed();
+        this.host = host;
+    }
+
+    public int getPort()
+    {
+        if ( isReference() )
+        {
+            return getRef().getPort();
+        }
+        return port;
+    }
+
+    public void setPort( int port )
+    {
+        checkAttributesAllowed();
+        if ( port <= 0 || port > 0xFFFF )
+        {
+            throw new BuildException( "The port number must be within the range 1 - 65535" );
+        }
+        this.port = port;
+    }
+
+    public String getType()
+    {
+        if ( isReference() )
+        {
+            return getRef().getType();
+        }
+        return type;
+    }
+
+    public void setType( String type )
+    {
+        checkAttributesAllowed();
+        this.type = type;
+    }
+
+    public String getNonProxyHosts()
+    {
+        if ( isReference() )
+        {
+            return getRef().getNonProxyHosts();
+        }
+        return nonProxyHosts;
+    }
+
+    public void setNonProxyHosts( String nonProxyHosts )
+    {
+        checkAttributesAllowed();
+        this.nonProxyHosts = nonProxyHosts;
+    }
+
+    public Authentication getAuthentication()
+    {
+        if ( isReference() )
+        {
+            return getRef().getAuthentication();
+        }
+        return authentication;
+    }
+
+    public void addAuthentication( Authentication authentication )
+    {
+        checkChildrenAllowed();
+        if ( this.authentication != null )
+        {
+            throw new BuildException( "You must not specify multiple <authentication> elements" );
+        }
+        this.authentication = authentication;
+    }
+
+    public void setAuthRef( Reference ref )
+    {
+        if ( authentication == null )
+        {
+            authentication = new Authentication();
+            authentication.setProject( getProject() );
+        }
+        authentication.setRefid( ref );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositories.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositories.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositories.java
new file mode 100644
index 0000000..0b90877
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositories.java
@@ -0,0 +1,97 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public class RemoteRepositories
+    extends DataType
+    implements RemoteRepositoryContainer
+{
+
+    private List<RemoteRepositoryContainer> containers = new ArrayList<RemoteRepositoryContainer>();
+
+    protected RemoteRepositories getRef()
+    {
+        return (RemoteRepositories) getCheckedRef();
+    }
+
+    public void validate( Task task )
+    {
+        if ( isReference() )
+        {
+            getRef().validate( task );
+        }
+        else
+        {
+            for ( RemoteRepositoryContainer container : containers )
+            {
+                container.validate( task );
+            }
+        }
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( !containers.isEmpty() )
+        {
+            throw noChildrenAllowed();
+        }
+        super.setRefid( ref );
+    }
+
+    public void addRemoterepo( RemoteRepository repository )
+    {
+        checkChildrenAllowed();
+        containers.add( repository );
+    }
+
+    public void addRemoterepos( RemoteRepositories repositories )
+    {
+        checkChildrenAllowed();
+        if ( repositories == this )
+        {
+            throw circularReference();
+        }
+        containers.add( repositories );
+    }
+
+    public List<RemoteRepository> getRepositories()
+    {
+        if ( isReference() )
+        {
+            return getRef().getRepositories();
+        }
+        List<RemoteRepository> repos = new ArrayList<RemoteRepository>();
+        for ( RemoteRepositoryContainer container : containers )
+        {
+            repos.addAll( container.getRepositories() );
+        }
+        return repos;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepository.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepository.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepository.java
new file mode 100644
index 0000000..aabefd2
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepository.java
@@ -0,0 +1,351 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.maven.resolver.internal.ant.AntRepoSys;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+import org.eclipse.aether.repository.RepositoryPolicy;
+
+/**
+ */
+public class RemoteRepository
+    extends DataType
+    implements RemoteRepositoryContainer
+{
+
+    private String id;
+
+    private String url;
+
+    private String type;
+
+    private Policy releasePolicy;
+
+    private Policy snapshotPolicy;
+
+    private boolean releases = true;
+
+    private boolean snapshots = false;
+
+    private String checksums;
+
+    private String updates;
+
+    private Authentication authentication;
+
+    @Override
+    public void setProject( Project project )
+    {
+        super.setProject( project );
+
+        // NOTE: Just trigger side-effect of default initialization before this type potentially overrides central
+        AntRepoSys.getInstance( project );
+    }
+
+    protected RemoteRepository getRef()
+    {
+        return (RemoteRepository) getCheckedRef();
+    }
+
+    public void validate( Task task )
+    {
+        if ( isReference() )
+        {
+            getRef().validate( task );
+        }
+        else
+        {
+            if ( url == null || url.length() <= 0 )
+            {
+                throw new BuildException( "You must specify the 'url' for a remote repository" );
+            }
+            if ( id == null || id.length() <= 0 )
+            {
+                throw new BuildException( "You must specify the 'id' for a remote repository" );
+            }
+        }
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( id != null || url != null || type != null || checksums != null || updates != null )
+        {
+            throw tooManyAttributes();
+        }
+        if ( releasePolicy != null || snapshotPolicy != null || authentication != null )
+        {
+            throw noChildrenAllowed();
+        }
+        super.setRefid( ref );
+    }
+
+    public String getId()
+    {
+        if ( isReference() )
+        {
+            return getRef().getId();
+        }
+        return id;
+    }
+
+    public void setId( String id )
+    {
+        this.id = id;
+    }
+
+    public String getUrl()
+    {
+        if ( isReference() )
+        {
+            return getRef().getUrl();
+        }
+        return url;
+    }
+
+    public void setUrl( String url )
+    {
+        checkAttributesAllowed();
+        this.url = url;
+    }
+
+    public String getType()
+    {
+        if ( isReference() )
+        {
+            return getRef().getType();
+        }
+        return ( type != null ) ? type : "default";
+    }
+
+    public void setType( String type )
+    {
+        checkAttributesAllowed();
+        this.type = type;
+    }
+
+    public Policy getReleasePolicy()
+    {
+        if ( isReference() )
+        {
+            return getRef().getReleasePolicy();
+        }
+        return releasePolicy;
+    }
+
+    public void addReleases( Policy policy )
+    {
+        checkChildrenAllowed();
+        if ( this.releasePolicy != null )
+        {
+            throw new BuildException( "You must not specify multiple <releases> elements" );
+        }
+        this.releasePolicy = policy;
+    }
+
+    public Policy getSnapshotPolicy()
+    {
+        if ( isReference() )
+        {
+            return getRef().getSnapshotPolicy();
+        }
+        return snapshotPolicy;
+    }
+
+    public void addSnapshots( Policy policy )
+    {
+        checkChildrenAllowed();
+        if ( this.snapshotPolicy != null )
+        {
+            throw new BuildException( "You must not specify multiple <snapshots> elements" );
+        }
+        this.snapshotPolicy = policy;
+    }
+
+    public boolean isReleases()
+    {
+        if ( isReference() )
+        {
+            return getRef().isReleases();
+        }
+        return releases;
+    }
+
+    public void setReleases( boolean releases )
+    {
+        checkAttributesAllowed();
+        this.releases = releases;
+    }
+
+    public boolean isSnapshots()
+    {
+        if ( isReference() )
+        {
+            return getRef().isSnapshots();
+        }
+        return snapshots;
+    }
+
+    public void setSnapshots( boolean snapshots )
+    {
+        checkAttributesAllowed();
+        this.snapshots = snapshots;
+    }
+
+    public String getUpdates()
+    {
+        if ( isReference() )
+        {
+            return getRef().getUpdates();
+        }
+        return ( updates != null ) ? updates : RepositoryPolicy.UPDATE_POLICY_DAILY;
+    }
+
+    public void setUpdates( String updates )
+    {
+        checkAttributesAllowed();
+        checkUpdates( updates );
+        this.updates = updates;
+    }
+
+    protected static void checkUpdates( String updates )
+    {
+        if ( !RepositoryPolicy.UPDATE_POLICY_ALWAYS.equals( updates )
+            && !RepositoryPolicy.UPDATE_POLICY_DAILY.equals( updates )
+            && !RepositoryPolicy.UPDATE_POLICY_NEVER.equals( updates )
+            && !updates.startsWith( RepositoryPolicy.UPDATE_POLICY_INTERVAL ) )
+        {
+            throw new BuildException( "'" + updates + "' is not a permitted update policy" );
+        }
+    }
+
+    public String getChecksums()
+    {
+        if ( isReference() )
+        {
+            return getRef().getChecksums();
+        }
+        return ( checksums != null ) ? checksums : RepositoryPolicy.CHECKSUM_POLICY_WARN;
+    }
+
+    public void setChecksums( String checksums )
+    {
+        checkAttributesAllowed();
+        checkChecksums( checksums );
+        this.checksums = checksums;
+    }
+
+    protected static void checkChecksums( String checksums )
+    {
+        if ( !RepositoryPolicy.CHECKSUM_POLICY_FAIL.equals( checksums )
+            && !RepositoryPolicy.CHECKSUM_POLICY_WARN.equals( checksums )
+            && !RepositoryPolicy.CHECKSUM_POLICY_IGNORE.equals( checksums ) )
+        {
+            throw new BuildException( "'" + checksums + "' is not a permitted checksum policy" );
+        }
+    }
+
+    public Authentication getAuthentication()
+    {
+        if ( isReference() )
+        {
+            return getRef().getAuthentication();
+        }
+        return authentication;
+    }
+
+    public void addAuthentication( Authentication authentication )
+    {
+        checkChildrenAllowed();
+        if ( this.authentication != null )
+        {
+            throw new BuildException( "You must not specify multiple <authentication> elements" );
+        }
+        this.authentication = authentication;
+    }
+
+    public void setAuthRef( Reference ref )
+    {
+        checkAttributesAllowed();
+        if ( authentication == null )
+        {
+            authentication = new Authentication();
+            authentication.setProject( getProject() );
+        }
+        authentication.setRefid( ref );
+    }
+
+    public List<RemoteRepository> getRepositories()
+    {
+        return Collections.singletonList( this );
+    }
+
+    /**
+     */
+    public static class Policy
+    {
+
+        private boolean enabled = true;
+
+        private String checksumPolicy;
+
+        private String updatePolicy;
+
+        public boolean isEnabled()
+        {
+            return enabled;
+        }
+
+        public void setEnabled( boolean enabled )
+        {
+            this.enabled = enabled;
+        }
+
+        public String getChecksums()
+        {
+            return checksumPolicy;
+        }
+
+        public void setChecksums( String checksumPolicy )
+        {
+            checkChecksums( checksumPolicy );
+            this.checksumPolicy = checksumPolicy;
+        }
+
+        public String getUpdates()
+        {
+            return updatePolicy;
+        }
+
+        public void setUpdates( String updatePolicy )
+        {
+            checkUpdates( updatePolicy );
+            this.updatePolicy = updatePolicy;
+        }
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositoryContainer.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositoryContainer.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositoryContainer.java
new file mode 100644
index 0000000..ab84a98
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/RemoteRepositoryContainer.java
@@ -0,0 +1,35 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.util.List;
+
+import org.apache.tools.ant.Task;
+
+/**
+ */
+public interface RemoteRepositoryContainer
+{
+
+    void validate( Task task );
+
+    List<RemoteRepository> getRepositories();
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Settings.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Settings.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Settings.java
new file mode 100644
index 0000000..5c77c43
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Settings.java
@@ -0,0 +1,86 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+
+import org.apache.maven.resolver.internal.ant.AntRepoSys;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public class Settings
+    extends DataType
+{
+
+    private File file;
+
+    private File globalFile;
+
+    protected Settings getRef()
+    {
+        return (Settings) getCheckedRef();
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( file != null || globalFile != null )
+        {
+            throw tooManyAttributes();
+        }
+        super.setRefid( ref );
+    }
+
+    public File getFile()
+    {
+        if ( isReference() )
+        {
+            return getRef().getFile();
+        }
+        return file;
+    }
+
+    public void setFile( File file )
+    {
+        checkAttributesAllowed();
+        this.file = file;
+
+        AntRepoSys.getInstance( getProject() ).setUserSettings( file );
+    }
+
+    public File getGlobalFile()
+    {
+        if ( isReference() )
+        {
+            return getRef().getFile();
+        }
+        return globalFile;
+    }
+
+    public void setGlobalFile( File globalFile )
+    {
+        checkAttributesAllowed();
+        this.globalFile = globalFile;
+
+        AntRepoSys.getInstance( getProject() ).setGlobalSettings( globalFile );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/resources/org/apache/maven/resolver/ant/antlib.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/resources/org/apache/maven/resolver/ant/antlib.xml b/maven-resolver-ant-tasks/src/main/resources/org/apache/maven/resolver/ant/antlib.xml
new file mode 100644
index 0000000..0e47b30
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/resources/org/apache/maven/resolver/ant/antlib.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<antlib>
+
+  <typedef name="authentication"       classname="org.apache.maven.resolver.internal.ant.types.Authentication"/>
+  <typedef name="proxy"                classname="org.apache.maven.resolver.internal.ant.types.Proxy"/>
+  <typedef name="mirror"               classname="org.apache.maven.resolver.internal.ant.types.Mirror"/>
+  <typedef name="localrepo"            classname="org.apache.maven.resolver.internal.ant.types.LocalRepository"/>
+  <typedef name="remoterepo"           classname="org.apache.maven.resolver.internal.ant.types.RemoteRepository"/>
+  <typedef name="remoterepos"          classname="org.apache.maven.resolver.internal.ant.types.RemoteRepositories"/>
+  <typedef name="dependency"           classname="org.apache.maven.resolver.internal.ant.types.Dependency"/>
+  <typedef name="dependencies"         classname="org.apache.maven.resolver.internal.ant.types.Dependencies"/>
+  <typedef name="artifact"             classname="org.apache.maven.resolver.internal.ant.types.Artifact"/>
+  <typedef name="artifacts"            classname="org.apache.maven.resolver.internal.ant.types.Artifacts"/>
+  <typedef name="settings"             classname="org.apache.maven.resolver.internal.ant.types.Settings"/>
+
+  <taskdef name="resolve"              classname="org.apache.maven.resolver.internal.ant.tasks.Resolve"/>
+  <taskdef name="install"              classname="org.apache.maven.resolver.internal.ant.tasks.Install"/>
+  <taskdef name="deploy"               classname="org.apache.maven.resolver.internal.ant.tasks.Deploy"/>
+  <taskdef name="pom"                  classname="org.apache.maven.resolver.internal.ant.types.Pom"/>
+
+</antlib>

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/site/markdown/index.md.vm
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/site/markdown/index.md.vm b/maven-resolver-ant-tasks/src/site/markdown/index.md.vm
new file mode 100644
index 0000000..21d7689
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/site/markdown/index.md.vm
@@ -0,0 +1 @@
+#include( "../../../README.md" )

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/site/resources/download.cgi
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/site/resources/download.cgi b/maven-resolver-ant-tasks/src/site/resources/download.cgi
new file mode 100644
index 0000000..1b178d2
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/site/resources/download.cgi
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# 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.
+#
+# Just call the standard mirrors.cgi script. It will use download.html
+# as the input template.
+exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/site/site.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/site/site.xml b/maven-resolver-ant-tasks/src/site/site.xml
new file mode 100644
index 0000000..6ba57dc
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/site/site.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
+  name="Maven Resolver Ant Tasks">
+
+  <body>
+    <menu name="Overview">
+      <item name="Introduction" href="index.html"/>
+      <item name="JavaDocs" href="apidocs/index.html"/>
+      <item name="Source Xref" href="xref/index.html"/>
+      <!--item name="FAQ" href="faq.html"/-->
+      <item name="License" href="http://www.apache.org/licenses/"/>
+      <item name="Download" href="download.html"/>
+    </menu>
+    <menu name="See Also">
+      <item name="Maven Artifact Resolver" href="https://maven.apache.org/resolver/"/>
+      <item name="Maven Artifact Resolver Provider" href="https://maven.apache.org/ref/current/maven-resolver-provider/"/>
+    </menu>
+
+    <menu ref="reports"/>
+  </body>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/site/xdoc/download.xml.vm
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/site/xdoc/download.xml.vm b/maven-resolver-ant-tasks/src/site/xdoc/download.xml.vm
new file mode 100644
index 0000000..b37071a
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/site/xdoc/download.xml.vm
@@ -0,0 +1,126 @@
+<?xml version="1.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.
+-->
+
+<document>
+  <properties>
+    <title>Download ${project.name} Source</title>
+  </properties>
+  <body>
+    <section name="Download ${project.name} ${project.version} Source">
+
+      <p>${project.name} ${project.version} is distributed in source format. Use a source archive if you intend to build
+      ${project.name} yourself. Otherwise, simply use the ready-made binary artifacts from central repository.</p>
+
+      <p>You will be prompted for a mirror - if the file is not found on yours, please be patient, as it may take 24
+      hours to reach all mirrors.<p/>
+
+      <p>In order to guard against corrupted downloads/installations, it is highly recommended to
+      <a href="http://www.apache.org/dev/release-signing#verifying-signature">verify the signature</a>
+      of the release bundles against the public <a href="http://www.apache.org/dist/maven/KEYS">KEYS</a> used by the Apache Maven
+      developers.</p>
+
+      <p>${project.name} is distributed under the <a href="http://www.apache.org/licenses/">Apache License, version 2.0</a>.</p>
+
+      <p></p>We <b>strongly</b> encourage our users to configure a Maven repository mirror closer to their location, please read <a href="/guides/mini/guide-mirror-settings.html">How to Use Mirrors for Repositories</a>.</p>
+
+      <a name="mirror"/>
+      <subsection name="Mirror">
+
+        <p>
+          [if-any logo]
+          <a href="[link]">
+            <img align="right" src="[logo]" border="0"
+                 alt="logo"/>
+          </a>
+          [end]
+          The currently selected mirror is
+          <b>[preferred]</b>.
+          If you encounter a problem with this mirror,
+          please select another mirror.
+          If all mirrors are failing, there are
+          <i>backup</i>
+          mirrors
+          (at the end of the mirrors list) that should be available.
+        </p>
+
+        <form action="[location]" method="get" id="SelectMirror">
+          Other mirrors:
+          <select name="Preferred">
+            [if-any http]
+            [for http]
+            <option value="[http]">[http]</option>
+            [end]
+            [end]
+            [if-any ftp]
+            [for ftp]
+            <option value="[ftp]">[ftp]</option>
+            [end]
+            [end]
+            [if-any backup]
+            [for backup]
+            <option value="[backup]">[backup] (backup)</option>
+            [end]
+            [end]
+          </select>
+          <input type="submit" value="Change"/>
+        </form>
+
+        <p>
+          You may also consult the
+          <a href="http://www.apache.org/mirrors/">complete list of
+            mirrors.</a>
+        </p>
+
+      </subsection>
+      
+      <subsection name="${project.name} ${project.version}">
+        
+      <p>This is the current stable version of ${project.name}.</p>
+        
+      <table>
+        <thead>
+          <tr>
+            <th></th>
+            <th>Link</th>
+            <th>Checksum</th>
+            <th>Signature</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr>
+            <td>${project.name} ${project.version} (Source zip)</td>
+            <td><a href="[preferred]maven/resolver/${project.artifactId}-${project.version}-source-release.zip">maven/resolver/${project.artifactId}-${project.version}-source-release.zip</a></td>
+            <td><a href="http://www.apache.org/dist/maven/resolver/${project.artifactId}-${project.version}-source-release.zip.md5">maven/resolver/${project.artifactId}-${project.version}-source-release.zip.md5</a></td>
+            <td><a href="http://www.apache.org/dist/maven/resolver/${project.artifactId}-${project.version}-source-release.zip.asc">maven/resolver/${project.artifactId}-${project.version}-source-release.zip.asc</a></td>
+          </tr>
+        </tbody>
+      </table>
+      </subsection>
+
+      <subsection name="Previous Versions">
+        
+      <p>Older non-recommended releases can be found on our <a href="http://archive.apache.org/dist/maven/resolver/">archive site</a>.</p>
+
+      </subsection>
+    </section>
+  </body>
+</document>
+

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/AntBuildsTest.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/AntBuildsTest.java b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/AntBuildsTest.java
new file mode 100644
index 0000000..aaf73da
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/AntBuildsTest.java
@@ -0,0 +1,124 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.io.PrintStream;
+
+import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.BuildFileTest;
+import org.apache.tools.ant.DefaultLogger;
+import org.apache.tools.ant.Project;
+import org.eclipse.aether.internal.test.util.TestFileUtils;
+
+public abstract class AntBuildsTest
+    extends BuildFileTest
+{
+
+    private static final File BASE_DIR;
+
+    protected static final File BUILD_DIR;
+
+    static
+    {
+        BASE_DIR = new File( "" ).getAbsoluteFile();
+        BUILD_DIR = new File( BASE_DIR, "target/ant" );
+    }
+
+    protected File projectDir;
+
+    protected File localRepoDir;
+
+    protected File distRepoDir;
+
+    protected String getProjectDirName()
+    {
+        String name = getClass().getSimpleName();
+        if ( name.endsWith( "Test" ) )
+        {
+            name = name.substring( 0, name.length() - 4 );
+        }
+        return name;
+    }
+
+    protected void setUpProperties()
+        throws Exception
+    {
+        // hook for subclasses to set further system properties for the project to pick up
+    }
+
+    @Override
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        TestFileUtils.deleteFile( BUILD_DIR );
+
+        projectDir = new File( new File( BASE_DIR, "src/test/resources/ant" ), getProjectDirName() );
+        localRepoDir = new File( BUILD_DIR, "local-repo" );
+        distRepoDir = new File( BUILD_DIR, "dist-repo" );
+
+        System.setProperty( "project.dir", projectDir.getAbsolutePath() );
+        System.setProperty( "build.dir", BUILD_DIR.getAbsolutePath() );
+        System.setProperty( "maven.repo.local", localRepoDir.getAbsolutePath() );
+        System.setProperty( "project.distrepo.url", distRepoDir.toURI().toString() );
+        setUpProperties();
+
+        configureProject( new File( projectDir, "ant.xml" ).getAbsolutePath(), Project.MSG_VERBOSE );
+    }
+
+    @Override
+    protected void tearDown()
+        throws Exception
+    {
+        try
+        {
+            ProjectWorkspaceReader.dropInstance();
+            TestFileUtils.deleteFile( BUILD_DIR );
+        }
+        finally
+        {
+            super.tearDown();
+        }
+    }
+
+    @Override
+    public void configureProject( String filename, int logLevel )
+        throws BuildException
+    {
+        super.configureProject( filename, logLevel );
+        DefaultLogger logger = new DefaultLogger()
+        {
+            @Override
+            protected void printMessage( String message, PrintStream stream, int priority )
+            {
+                message = System.currentTimeMillis() + " " + message;
+                super.printMessage( message, stream, priority );
+            }
+        };
+        logger.setMessageOutputLevel( logLevel );
+        logger.setOutputPrintStream( System.out );
+        logger.setErrorPrintStream( System.err );
+        getProject().addBuildListener( logger );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/DeployTest.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/DeployTest.java b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/DeployTest.java
new file mode 100644
index 0000000..203bdba
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/DeployTest.java
@@ -0,0 +1,91 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import static org.hamcrest.MatcherAssert.*;
+import static org.hamcrest.Matchers.*;
+
+import java.io.File;
+import java.util.Arrays;
+
+/*
+ * still missing:
+ * - deploy snapshots/releases into correct repos
+ */
+public class DeployTest
+    extends AntBuildsTest
+{
+
+    public void testDeployGlobalPom()
+    {
+        long min = System.currentTimeMillis();
+        executeTarget( "testDeployGlobalPom" );
+        long max = System.currentTimeMillis();
+
+        assertLogContaining( "Uploading" );
+        
+        assertUpdatedFile( min, max, distRepoDir, "test/dummy/0.1-SNAPSHOT/maven-metadata.xml" );
+    }
+
+    public void testDeployOverrideGlobalPom()
+    {
+        long min = System.currentTimeMillis();
+        executeTarget( "testDeployOverrideGlobalPom" );
+        long max = System.currentTimeMillis();
+
+        assertLogContaining( "Uploading" );
+
+        assertUpdatedFile( min, max, distRepoDir, "test/other/0.1-SNAPSHOT/maven-metadata.xml" );
+    }
+
+    public void testDeployOverrideGlobalPomByRef()
+    {
+        long min = System.currentTimeMillis();
+        executeTarget( "testDeployOverrideGlobalPomByRef" );
+        long max = System.currentTimeMillis();
+
+        assertLogContaining( "Uploading" );
+
+        assertUpdatedFile( min, max, distRepoDir, "test/dummy/0.1-SNAPSHOT/maven-metadata.xml" );
+        assertUpdatedFile( min, max, distRepoDir, "test/other/0.1-SNAPSHOT/maven-metadata.xml" );
+    }
+
+    public void testDeployAttachedArtifact()
+    {
+        executeTarget( "testDeployAttachedArtifact" );
+
+        assertLogContaining( "Uploading" );
+
+        File dir = new File(distRepoDir, "test/dummy/0.1-SNAPSHOT/" );
+        String[] files = dir.list();
+        assertThat( "attached artifact not found: " + Arrays.toString( files ), files,
+                    hasItemInArray( endsWith( "-ant.xml" ) ) );
+    }
+
+    private void assertUpdatedFile( long min, long max, File repoPath, String path )
+    {
+        File file = new File( repoPath, path );
+        min = (min / 1000) * 1000;
+        max = ((max + 999) / 1000) * 1000;
+        assertThat( "File does not exist in default repo: " + file.getAbsolutePath(), file.exists() );
+        assertThat( "Files were not updated for 1s before/after timestamp", file.lastModified(),
+                    allOf( greaterThanOrEqualTo( min ), lessThanOrEqualTo( max ) ) );
+    }
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/InstallTest.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/InstallTest.java b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/InstallTest.java
new file mode 100644
index 0000000..bd3fcaa
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/InstallTest.java
@@ -0,0 +1,98 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import static org.hamcrest.MatcherAssert.*;
+import static org.hamcrest.Matchers.*;
+
+import java.io.File;
+import java.io.IOException;
+
+public class InstallTest
+    extends AntBuildsTest
+{
+
+    public void testInstallGlobalPom()
+    {
+        executeTarget( "testInstallGlobalPom" );
+        long tstamp = System.currentTimeMillis();
+
+        assertLogContaining( "Installing" );
+        
+        assertUpdatedFile( tstamp, localRepoDir, "test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT.pom" );
+    }
+
+    public void testInstallOverrideGlobalPom()
+    {
+        executeTarget( "testInstallOverrideGlobalPom" );
+        long tstamp = System.currentTimeMillis();
+
+        assertLogContaining( "Installing" );
+
+        assertUpdatedFile( tstamp, localRepoDir, "test/other/0.1-SNAPSHOT/other-0.1-SNAPSHOT.pom" );
+    }
+
+    public void testInstallOverrideGlobalPomByRef()
+    {
+        long tstamp = System.currentTimeMillis();
+        executeTarget( "testInstallOverrideGlobalPomByRef" );
+
+        assertLogContaining( "Installing" );
+
+        assertUpdatedFile( tstamp, localRepoDir, "test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT.pom" );
+        assertUpdatedFile( tstamp, localRepoDir, "test/other/0.1-SNAPSHOT/other-0.1-SNAPSHOT.pom" );
+    }
+
+    public void testDefaultRepo()
+    {
+        executeTarget( "testDefaultRepo" );
+        long tstamp = System.currentTimeMillis();
+
+        assertLogContaining( "Installing" );
+
+        assertUpdatedFile( tstamp, localRepoDir, "test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT.pom" );
+        assertUpdatedFile( tstamp, localRepoDir, "test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT-ant.xml" );
+    }
+
+    public void testCustomRepo()
+        throws IOException
+    {
+        File repoPath = new File( BUILD_DIR, "local-repo-custom" );
+
+        executeTarget( "testCustomRepo" );
+        long tstamp = System.currentTimeMillis();
+
+        System.out.println( getLog() );
+        assertLogContaining( "Installing" );
+
+        assertUpdatedFile( tstamp, repoPath, "test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT.pom" );
+        assertUpdatedFile( tstamp, repoPath, "test/dummy/0.1-SNAPSHOT/dummy-0.1-SNAPSHOT-ant.xml" );
+    }
+
+    private void assertUpdatedFile( long tstamp, File repoPath, String path )
+    {
+        File file = new File( repoPath, path );
+        assertThat( "File does not exist in default repo: " + file.getAbsolutePath(), file.exists() );
+        assertThat( "Files were not updated for 1s before/after timestamp",
+                    file.lastModified(),
+                    allOf( greaterThanOrEqualTo( ( ( tstamp - 500 ) / 1000 ) * 1000 ),
+                           lessThanOrEqualTo( tstamp + 2000 ) ) );
+    }
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReaderTest.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReaderTest.java b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReaderTest.java
new file mode 100644
index 0000000..0b7dfa3
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/ProjectWorkspaceReaderTest.java
@@ -0,0 +1,124 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+import java.io.File;
+
+import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
+import org.apache.maven.resolver.internal.ant.types.Pom;
+import org.apache.tools.ant.Project;
+import org.junit.Before;
+import org.junit.Test;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
+
+public class ProjectWorkspaceReaderTest
+{
+
+    private ProjectWorkspaceReader reader;
+
+    private Project project;
+
+    @Before
+    public void setUp()
+        throws Exception
+    {
+        this.reader = new ProjectWorkspaceReader();
+
+        this.project = new Project();
+        project.setProperty( "user.home", System.getProperty( "user.home" ) );
+    }
+
+    private Artifact artifact( String coords )
+    {
+        return new DefaultArtifact( coords );
+    }
+
+    private File getFile( String name )
+    {
+        return new File( "src/test/resources/ProjectWorkspaceReader", name );
+    }
+
+    @Test
+    public void testFindPom()
+    {
+        Pom pom = new Pom();
+        pom.setProject( project );
+        pom.setFile( getFile( "dummy-pom.xml" ) );
+
+        reader.addPom( pom );
+
+        assertEquals( pom.getFile(), reader.findArtifact( artifact( "test:dummy:pom:0.1-SNAPSHOT" ) ) );
+        assertNull( reader.findArtifact( artifact( "unavailable:test:pom:0.1-SNAPSHOT" ) ) );
+    }
+
+    @Test
+    public void testFindArtifact()
+    {
+        Pom pom = new Pom();
+        pom.setProject( project );
+        pom.setFile( getFile( "dummy-pom.xml" ) );
+
+        reader.addPom( pom );
+
+        org.apache.maven.resolver.internal.ant.types.Artifact artifact = new org.apache.maven.resolver.internal.ant.types.Artifact();
+        artifact.setProject( project );
+        artifact.addPom( pom );
+        artifact.setFile( getFile( "dummy-file.txt" ) );
+
+        reader.addArtifact( artifact );
+
+        assertEquals( artifact.getFile(), reader.findArtifact( artifact( "test:dummy:txt:0.1-SNAPSHOT" ) ) );
+        assertNull( reader.findArtifact( artifact( "unavailable:test:jar:0.1-SNAPSHOT" ) ) );
+    }
+
+    @Test
+    public void testFindVersions()
+    {
+        Pom pom1 = new Pom();
+        pom1.setProject( project );
+        pom1.setCoords( "test:dummy:1-SNAPSHOT" );
+
+        org.apache.maven.resolver.internal.ant.types.Artifact artifact1 = new org.apache.maven.resolver.internal.ant.types.Artifact();
+        artifact1.setProject( project );
+        artifact1.addPom( pom1 );
+        artifact1.setFile( getFile( "dummy-file.txt" ) );
+
+        reader.addArtifact( artifact1 );
+
+        Pom pom2 = new Pom();
+        pom2.setProject( project );
+        pom2.setCoords( "test:dummy:2-SNAPSHOT" );
+
+        org.apache.maven.resolver.internal.ant.types.Artifact artifact2 = new org.apache.maven.resolver.internal.ant.types.Artifact();
+        artifact2.setProject( project );
+        artifact2.addPom( pom2 );
+        artifact2.setFile( getFile( "dummy-file.txt" ) );
+
+        reader.addArtifact( artifact2 );
+
+        assertThat( reader.findVersions( artifact( "test:dummy:txt:[0,)" ) ),
+                    containsInAnyOrder( "1-SNAPSHOT", "2-SNAPSHOT" ) );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/ReactorTest.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/ReactorTest.java b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/ReactorTest.java
new file mode 100644
index 0000000..6b33710
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/ReactorTest.java
@@ -0,0 +1,100 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
+
+public class ReactorTest
+    extends AntBuildsTest
+{
+
+    private Artifact artifact( String coords )
+    {
+        return new DefaultArtifact( coords );
+    }
+
+    public void testPom()
+        throws IOException
+    {
+        executeTarget( "testPom" );
+        ProjectWorkspaceReader reader = ProjectWorkspaceReader.getInstance();
+        File found = reader.findArtifact( artifact( "test:test:pom:0.1-SNAPSHOT" ) );
+        assertNotNull( found );
+        assertEquals( new File( projectDir, "pom1.xml" ), found.getAbsoluteFile() );
+    }
+
+    public void testArtifact()
+        throws IOException
+    {
+        executeTarget( "testArtifact" );
+        ProjectWorkspaceReader reader = ProjectWorkspaceReader.getInstance();
+        File found = reader.findArtifact( artifact( "test:test:pom:0.1-SNAPSHOT" ) );
+        assertNotNull( found );
+        assertEquals( new File( projectDir, "pom1.xml" ), found.getAbsoluteFile() );
+
+        found = reader.findArtifact( artifact( "test:test:xml:0.1-SNAPSHOT" ) );
+        assertNotNull( found );
+        assertEquals( new File( projectDir, "pom1.xml" ), found.getAbsoluteFile() );
+    }
+
+    public void testArtifactInMemoryPom()
+        throws IOException
+    {
+        executeTarget( "testArtifactInMemoryPom" );
+        ProjectWorkspaceReader reader = ProjectWorkspaceReader.getInstance();
+        File found = reader.findArtifact( artifact( "test:test:pom:0.1-SNAPSHOT" ) );
+        assertNull( found );
+
+        found = reader.findArtifact( artifact( "test:test:xml:0.1-SNAPSHOT" ) );
+        assertNotNull( found );
+        assertEquals( new File( projectDir, "pom1.xml" ), found.getAbsoluteFile() );
+    }
+
+    public void testResolveArtifact()
+        throws IOException
+    {
+        executeTarget( "testResolveArtifact" );
+        String prop = project.getProperty( "resolve.test:test:jar" );
+        assertEquals( new File( projectDir, "pom1.xml" ).getAbsolutePath(), prop );
+    }
+
+    public void testResolveArtifactInMemoryPom()
+        throws IOException
+    {
+        executeTarget( "testResolveArtifactInMemoryPom" );
+        String prop = project.getProperty( "resolve.test:test:jar" );
+        assertEquals( new File( projectDir, "pom1.xml" ).getAbsolutePath(), prop );
+        assertLogContaining( "The POM for test:test:jar:0.1-SNAPSHOT is missing, no dependency information available" );
+    }
+
+    public void testResolveVersionRange()
+        throws IOException
+    {
+        executeTarget( "testResolveVersionRange" );
+        String prop = project.getProperty( "resolve.test:test:jar" );
+        assertEquals( new File( projectDir, "pom1.xml" ).getAbsolutePath(), prop );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/ResolveTest.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/ResolveTest.java b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/ResolveTest.java
new file mode 100644
index 0000000..a736a74
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/ResolveTest.java
@@ -0,0 +1,150 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import static org.hamcrest.MatcherAssert.*;
+import static org.hamcrest.Matchers.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.ResourceCollection;
+import org.apache.tools.ant.types.resources.FileResource;
+
+public class ResolveTest
+    extends AntBuildsTest
+{
+
+    public void testResolveGlobalPom()
+    {
+        executeTarget( "testResolveGlobalPom" );
+
+        String prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-api:jar" );
+        assertThat( "aether-api was not resolved as a property", prop, notNullValue() );
+        assertThat( "aether-api was not resolved to default local repository", prop,
+                    allOf( containsString( "aether-api" ), endsWith( ".jar" ) ) );
+    }
+
+    public void testResolveOverrideGlobalPom()
+    {
+        executeTarget( "testResolveOverrideGlobalPom" );
+
+        String prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-api:jar" );
+        assertThat( "aether-api was not resolved as a property", prop, notNullValue() );
+        assertThat( "aether-api was not resolved to default local repository", prop,
+                    allOf( containsString( "aether-api" ), endsWith( ".jar" ) ) );
+    }
+
+    public void testResolveGlobalPomIntoOtherLocalRepo()
+    {
+        executeTarget( "testResolveGlobalPomIntoOtherLocalRepo" );
+
+        String prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-api:jar" );
+        assertThat( "aether-api was not resolved as a property", prop, notNullValue() );
+        assertThat( "aether-api was not resolved to default local repository", prop.replace( '\\', '/' ),
+                    endsWith( "local-repo-custom/org/eclipse/aether/aether-api/0.9.0.M3/aether-api-0.9.0.M3.jar" ) );
+    }
+
+    public void testResolveCustomFileLayout()
+        throws IOException
+    {
+        File dir = new File( BUILD_DIR, "resolve-custom-layout" );
+        executeTarget( "testResolveCustomFileLayout" );
+
+        assertThat( "aether-api was not saved with custom file layout",
+                    new File( dir, "org.eclipse.aether/aether-api/org/eclipse/aether/jar" ).exists() );
+    }
+
+    public void testResolveAttachments()
+        throws IOException
+    {
+        File dir = new File( BUILD_DIR, "resolve-attachments" );
+        executeTarget( "testResolveAttachments" );
+        
+        File jdocDir = new File(dir, "javadoc");
+        
+        assertThat( "aether-api-javadoc was not saved with custom file layout",
+                    new File( jdocDir, "org.eclipse.aether-aether-api-javadoc.jar" ).exists() );
+
+        assertThat( "found non-javadoc files", Arrays.asList( jdocDir.list() ), everyItem( endsWith( "javadoc.jar" ) ) );
+
+        File sourcesDir = new File( dir, "sources" );
+        assertThat( "aether-api-sources was not saved with custom file layout",
+                    new File( sourcesDir, "org.eclipse.aether-aether-api-sources.jar" ).exists() );
+        assertThat( "found non-sources files", Arrays.asList( sourcesDir.list() ),
+                    everyItem( endsWith( "sources.jar" ) ) );
+    }
+
+    public void testResolvePath()
+    {
+        executeTarget( "testResolvePath" );
+        Map<?, ?> refs = getProject().getReferences();
+        Object obj = refs.get( "out" );
+        assertThat( "ref 'out' is no path", obj, instanceOf( Path.class ) );
+        Path path = (Path) obj;
+        String[] elements = path.list();
+        assertThat( "no aether-api on classpath", elements,
+                    hasItemInArray( allOf( containsString( "aether-api" ), endsWith( ".jar" ) ) ) );
+    }
+
+    public void testResolveDepsFromFile()
+    {
+        executeTarget( "testResolveDepsFromFile" );
+
+        String prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-spi:jar" );
+        assertThat( "aether-spi was not resolved as a property", prop, notNullValue() );
+        assertThat( "aether-spi was not resolved to default local repository", prop,
+                    allOf( containsString( "aether-spi" ), endsWith( ".jar" ) ) );
+        prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-api:jar" );
+        assertThat( "aether-api was resolved as a property", prop, nullValue() );
+    }
+
+    public void testResolveNestedDependencyCollections()
+    {
+        executeTarget( "testResolveNestedDependencyCollections" );
+
+        String prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-spi:jar" );
+        assertThat( "aether-spi was not resolved as a property", prop, notNullValue() );
+        prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-util:jar" );
+        assertThat( "aether-util was not resolved as a property", prop, notNullValue() );
+        prop = getProject().getProperty( "test.resolve.path.org.eclipse.aether:aether-api:jar" );
+        assertThat( "aether-api was resolved as a property", prop, nullValue() );
+    }
+
+    public void testResolveResourceCollectionOnly()
+    {
+        executeTarget( "testResolveResourceCollectionOnly" );
+
+        ResourceCollection resources = (ResourceCollection) getProject().getReference( "files" );
+        assertThat( resources, is( notNullValue() ) );
+        assertThat( resources.size(), is( 2 ) );
+        assertThat( resources.isFilesystemOnly(), is( true ) );
+        Iterator<?> it = resources.iterator();
+        FileResource file = (FileResource) it.next();
+        assertThat( file.getFile().getName(), is( "aether-spi-0.9.0.v20140226.jar" ) );
+        file = (FileResource) it.next();
+        assertThat( file.getFile().getName(), is( "aether-api-0.9.0.v20140226.jar" ) );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/SettingsTest.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/SettingsTest.java b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/SettingsTest.java
new file mode 100644
index 0000000..a22d573
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/SettingsTest.java
@@ -0,0 +1,65 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import static org.hamcrest.MatcherAssert.*;
+import static org.hamcrest.Matchers.*;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.resolver.internal.ant.AntRepoSys;
+
+public class SettingsTest
+    extends AntBuildsTest
+{
+
+    public void testUserSettings()
+    {
+        executeTarget( "testUserSettings" );
+        assertThat( "user settings not set", AntRepoSys.getInstance( getProject() ).getUserSettings().getName(),
+                    equalTo( "userSettings.xml" ) );
+    }
+
+    public void testGlobalSettings()
+    {
+        executeTarget( "testGlobalSettings" );
+        assertThat( "global settings not set", AntRepoSys.getInstance( getProject() ).getGlobalSettings().getName(),
+                    equalTo( "globalSettings.xml" ) );
+    }
+
+    public void testBothSettings()
+    {
+        executeTarget( "testBothSettings" );
+        assertThat( "global settings not set", AntRepoSys.getInstance( getProject() ).getGlobalSettings().getName(),
+                    equalTo( "globalSettings.xml" ) );
+        assertThat( "user settings not set", AntRepoSys.getInstance( getProject() ).getUserSettings().getName(),
+                    equalTo( "userSettings.xml" ) );
+    }
+
+    public void testFallback()
+        throws IOException
+    {
+        executeTarget("setUp");
+        assertThat( "no fallback to local settings",
+                    AntRepoSys.getInstance( getProject() ).getUserSettings().getAbsolutePath(), endsWith( ".m2"
+                        + File.separator + "settings.xml" ) );
+    }
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/tasks/LayoutTest.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/tasks/LayoutTest.java b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/tasks/LayoutTest.java
new file mode 100644
index 0000000..f79729b
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/tasks/LayoutTest.java
@@ -0,0 +1,55 @@
+package org.apache.maven.resolver.internal.ant.tasks;
+
+/*
+ * 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.
+ */
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.maven.resolver.internal.ant.tasks.Layout;
+import org.apache.tools.ant.BuildException;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.junit.Test;
+
+/**
+ */
+public class LayoutTest
+{
+
+    @Test( expected = BuildException.class )
+    public void testUnknownVariable()
+    {
+        new Layout( "{unknown}" );
+    }
+
+    @Test
+    public void testGetPath()
+    {
+        Layout layout;
+
+        layout =
+            new Layout( "{groupIdDirs}/{artifactId}/{baseVersion}/{artifactId}-{version}-{classifier}.{extension}" );
+        assertEquals( "org/apache/maven/maven-model/3.0-SNAPSHOT/maven-model-3.0-20100720.132618-1.jar",
+                      layout.getPath( new DefaultArtifact( "org.apache.maven:maven-model:3.0-20100720.132618-1" ) ) );
+
+        layout = new Layout( "{groupId}/{artifactId}-{version}-{classifier}.{extension}" );
+        assertEquals( "org.apache.maven/maven-model-3.0-sources.jar",
+                      layout.getPath( new DefaultArtifact( "org.apache.maven:maven-model:jar:sources:3.0" ) ) );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/types/DependencyTest.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/types/DependencyTest.java b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/types/DependencyTest.java
new file mode 100644
index 0000000..10ca42b
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/types/DependencyTest.java
@@ -0,0 +1,88 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import static org.junit.Assert.*;
+
+import org.apache.maven.resolver.internal.ant.types.Dependency;
+import org.junit.Test;
+
+/**
+ */
+public class DependencyTest
+{
+
+    @Test
+    public void testSetCoordsGidAidVer()
+    {
+        Dependency dep = new Dependency();
+        dep.setCoords( "gid:aid:ver" );
+
+        assertEquals( "gid", dep.getGroupId() );
+        assertEquals( "aid", dep.getArtifactId() );
+        assertEquals( "ver", dep.getVersion() );
+        assertEquals( "jar", dep.getType() );
+        assertEquals( "", dep.getClassifier() );
+        assertEquals( "compile", dep.getScope() );
+    }
+
+    @Test
+    public void testSetCoordsGidAidVerScope()
+    {
+        Dependency dep = new Dependency();
+        dep.setCoords( "gid:aid:ver:scope" );
+
+        assertEquals( "gid", dep.getGroupId() );
+        assertEquals( "aid", dep.getArtifactId() );
+        assertEquals( "ver", dep.getVersion() );
+        assertEquals( "jar", dep.getType() );
+        assertEquals( "", dep.getClassifier() );
+        assertEquals( "scope", dep.getScope() );
+    }
+
+    @Test
+    public void testSetCoordsGidAidVerTypeScope()
+    {
+        Dependency dep = new Dependency();
+        dep.setCoords( "gid:aid:ver:type:scope" );
+
+        assertEquals( "gid", dep.getGroupId() );
+        assertEquals( "aid", dep.getArtifactId() );
+        assertEquals( "ver", dep.getVersion() );
+        assertEquals( "type", dep.getType() );
+        assertEquals( "", dep.getClassifier() );
+        assertEquals( "scope", dep.getScope() );
+    }
+
+    @Test
+    public void testSetCoordsGidAidVerTypeClsScope()
+    {
+        Dependency dep = new Dependency();
+        dep.setCoords( "gid:aid:ver:type:cls:scope" );
+
+        assertEquals( "gid", dep.getGroupId() );
+        assertEquals( "aid", dep.getArtifactId() );
+        assertEquals( "ver", dep.getVersion() );
+        assertEquals( "type", dep.getType() );
+        assertEquals( "cls", dep.getClassifier() );
+        assertEquals( "scope", dep.getScope() );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/types/ExclusionTest.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/types/ExclusionTest.java b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/types/ExclusionTest.java
new file mode 100644
index 0000000..64d510f
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/types/ExclusionTest.java
@@ -0,0 +1,88 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import static org.junit.Assert.*;
+
+import org.apache.maven.resolver.internal.ant.types.Exclusion;
+import org.junit.Test;
+
+/**
+ */
+public class ExclusionTest
+{
+
+    @Test
+    public void testSetCoordsGid()
+    {
+        Exclusion ex = new Exclusion();
+        ex.setCoords( "gid" );
+
+        assertEquals( "gid", ex.getGroupId() );
+        assertEquals( "*", ex.getArtifactId() );
+        assertEquals( "*", ex.getExtension() );
+        assertEquals( "*", ex.getClassifier() );
+    }
+
+    @Test
+    public void testSetCoordsGidAid()
+    {
+        Exclusion ex = new Exclusion();
+        ex.setCoords( "gid:aid" );
+
+        assertEquals( "gid", ex.getGroupId() );
+        assertEquals( "aid", ex.getArtifactId() );
+        assertEquals( "*", ex.getExtension() );
+        assertEquals( "*", ex.getClassifier() );
+    }
+
+    @Test
+    public void testSetCoordsGidAidExt()
+    {
+        Exclusion ex = new Exclusion();
+        ex.setCoords( "gid:aid:ext" );
+
+        assertEquals( "gid", ex.getGroupId() );
+        assertEquals( "aid", ex.getArtifactId() );
+        assertEquals( "ext", ex.getExtension() );
+        assertEquals( "*", ex.getClassifier() );
+    }
+
+    @Test
+    public void testSetCoordsGidAidExtCls()
+    {
+        Exclusion ex = new Exclusion();
+        ex.setCoords( "gid:aid:ext:cls" );
+
+        assertEquals( "gid", ex.getGroupId() );
+        assertEquals( "aid", ex.getArtifactId() );
+        assertEquals( "ext", ex.getExtension() );
+        assertEquals( "cls", ex.getClassifier() );
+
+        ex = new Exclusion();
+        ex.setCoords( "gid:aid:ext:" );
+
+        assertEquals( "gid", ex.getGroupId() );
+        assertEquals( "aid", ex.getArtifactId() );
+        assertEquals( "ext", ex.getExtension() );
+        assertEquals( "", ex.getClassifier() );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/types/PomTest.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/types/PomTest.java b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/types/PomTest.java
new file mode 100644
index 0000000..35131b1
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/java/org/apache/maven/resolver/internal/ant/types/PomTest.java
@@ -0,0 +1,43 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import static org.junit.Assert.*;
+
+import org.apache.maven.resolver.internal.ant.types.Pom;
+import org.junit.Test;
+
+/**
+ */
+public class PomTest
+{
+
+    @Test
+    public void testSetCoordsGid()
+    {
+        Pom pom = new Pom();
+        pom.setCoords( "gid:aid:ver" );
+
+        assertEquals( "gid", pom.getGroupId() );
+        assertEquals( "aid", pom.getArtifactId() );
+        assertEquals( "ver", pom.getVersion() );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ProjectWorkspaceReader/dummy-file.txt
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ProjectWorkspaceReader/dummy-file.txt b/maven-resolver-ant-tasks/src/test/resources/ProjectWorkspaceReader/dummy-file.txt
new file mode 100644
index 0000000..b8a5cfa
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ProjectWorkspaceReader/dummy-file.txt
@@ -0,0 +1 @@
+A test artifact.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/test/resources/ProjectWorkspaceReader/dummy-pom.xml
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/test/resources/ProjectWorkspaceReader/dummy-pom.xml b/maven-resolver-ant-tasks/src/test/resources/ProjectWorkspaceReader/dummy-pom.xml
new file mode 100644
index 0000000..0041f8c
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/test/resources/ProjectWorkspaceReader/dummy-pom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<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>test</groupId>
+  <artifactId>dummy</artifactId>
+  <version>0.1-SNAPSHOT</version>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>

Reply | Threaded
Open this post in threaded view
|

[7/9] maven-resolver git commit: moved ant tasks into subfolder

mmoser
In reply to this post by mmoser
http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Install.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Install.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Install.java
new file mode 100644
index 0000000..b79716b
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Install.java
@@ -0,0 +1,41 @@
+package org.apache.maven.resolver.internal.ant.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.resolver.internal.ant.AntRepoSys;
+
+import org.apache.tools.ant.BuildException;
+
+/**
+ */
+public class Install
+    extends AbstractDistTask
+{
+
+    @Override
+    public void execute()
+        throws BuildException
+    {
+        validate();
+
+        AntRepoSys.getInstance( getProject() ).install( this, getPom(), getArtifacts() );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Layout.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Layout.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Layout.java
new file mode 100644
index 0000000..995c00f
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Layout.java
@@ -0,0 +1,131 @@
+package org.apache.maven.resolver.internal.ant.tasks;
+
+/*
+ * 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.
+ */
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.TreeSet;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.BuildException;
+import org.eclipse.aether.artifact.Artifact;
+
+/**
+ */
+class Layout
+{
+
+    public static final String GID = "{groupId}";
+
+    public static final String GID_DIRS = "{groupIdDirs}";
+
+    public static final String AID = "{artifactId}";
+
+    public static final String VER = "{version}";
+
+    public static final String BVER = "{baseVersion}";
+
+    public static final String EXT = "{extension}";
+
+    public static final String CLS = "{classifier}";
+
+    private String[] tokens;
+
+    public Layout( String layout )
+        throws BuildException
+    {
+        Collection<String> valid = new HashSet<String>( Arrays.asList( GID, GID_DIRS, AID, VER, BVER, EXT, CLS ) );
+        List<String> tokens = new ArrayList<String>();
+        Matcher m = Pattern.compile( "(\\{[^}]*\\})|([^{]+)" ).matcher( layout );
+        while ( m.find() )
+        {
+            if ( m.group( 1 ) != null && !valid.contains( m.group( 1 ) ) )
+            {
+                throw new BuildException( "Invalid variable '" + m.group() + "' in layout, supported variables are "
+                    + new TreeSet<String>( valid ) );
+            }
+            tokens.add( m.group() );
+        }
+        this.tokens = tokens.toArray( new String[tokens.size()] );
+    }
+
+    public String getPath( Artifact artifact )
+    {
+        StringBuilder buffer = new StringBuilder( 128 );
+
+        for ( int i = 0; i < tokens.length; i++ )
+        {
+            String token = tokens[i];
+            if ( GID.equals( token ) )
+            {
+                buffer.append( artifact.getGroupId() );
+            }
+            else if ( GID_DIRS.equals( token ) )
+            {
+                buffer.append( artifact.getGroupId().replace( '.', '/' ) );
+            }
+            else if ( AID.equals( token ) )
+            {
+                buffer.append( artifact.getArtifactId() );
+            }
+            else if ( VER.equals( token ) )
+            {
+                buffer.append( artifact.getVersion() );
+            }
+            else if ( BVER.equals( token ) )
+            {
+                buffer.append( artifact.getBaseVersion() );
+            }
+            else if ( CLS.equals( token ) )
+            {
+                if ( artifact.getClassifier().length() <= 0 )
+                {
+                    if ( i > 0 )
+                    {
+                        String lt = tokens[i - 1];
+                        if ( lt.length() > 0 && "-_".indexOf( lt.charAt( lt.length() - 1 ) ) >= 0 )
+                        {
+                            buffer.setLength( buffer.length() - 1 );
+                        }
+                    }
+                }
+                else
+                {
+                    buffer.append( artifact.getClassifier() );
+                }
+            }
+            else if ( EXT.equals( token ) )
+            {
+                buffer.append( artifact.getExtension() );
+            }
+            else
+            {
+                buffer.append( token );
+            }
+        }
+
+        return buffer.toString();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/RefTask.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/RefTask.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/RefTask.java
new file mode 100644
index 0000000..02e7083
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/RefTask.java
@@ -0,0 +1,98 @@
+package org.apache.maven.resolver.internal.ant.tasks;
+
+/*
+ * 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.
+ */
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.ComponentHelper;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public abstract class RefTask
+    extends Task
+{
+
+    private Reference ref;
+
+    public boolean isReference()
+    {
+        return ref != null;
+    }
+
+    public void setRefid( final Reference ref )
+    {
+        this.ref = ref;
+    }
+
+    protected void checkAttributesAllowed()
+    {
+        if ( isReference() )
+        {
+            throw tooManyAttributes();
+        }
+    }
+
+    protected void checkChildrenAllowed()
+    {
+        if ( isReference() )
+        {
+            throw noChildrenAllowed();
+        }
+    }
+
+    protected BuildException tooManyAttributes()
+    {
+        return new BuildException( "You must not specify more than one " + "attribute when using refid" );
+    }
+
+    protected BuildException noChildrenAllowed()
+    {
+        return new BuildException( "You must not specify nested elements " + "when using refid" );
+    }
+
+    protected String getDataTypeName()
+    {
+        return ComponentHelper.getElementName( getProject(), this, true );
+    }
+
+    protected Object getCheckedRef()
+    {
+        return getCheckedRef( getClass(), getDataTypeName(), getProject() );
+    }
+
+    protected Object getCheckedRef( final Class<?> requiredClass, final String dataTypeName, final Project project )
+    {
+        if ( project == null )
+        {
+            throw new BuildException( "No Project specified" );
+        }
+        Object o = ref.getReferencedObject( project );
+        if ( !( requiredClass.isAssignableFrom( o.getClass() ) ) )
+        {
+            log( "Class " + o.getClass() + " is not a subclass of " + requiredClass, Project.MSG_VERBOSE );
+            String msg = ref.getRefId() + " doesn\'t denote a " + dataTypeName;
+            throw new BuildException( msg );
+        }
+        return o;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Resolve.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Resolve.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Resolve.java
new file mode 100644
index 0000000..da37563
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/tasks/Resolve.java
@@ -0,0 +1,585 @@
+package org.apache.maven.resolver.internal.ant.tasks;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.maven.resolver.internal.ant.AntRepoSys;
+import org.apache.maven.resolver.internal.ant.Names;
+import org.apache.maven.resolver.internal.ant.types.Dependencies;
+import org.apache.maven.resolver.internal.ant.types.Pom;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.ProjectComponent;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.Reference;
+import org.apache.tools.ant.types.resources.FileResource;
+import org.apache.tools.ant.types.resources.Resources;
+import org.apache.tools.ant.util.FileUtils;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.graph.DependencyFilter;
+import org.eclipse.aether.graph.DependencyNode;
+import org.eclipse.aether.resolution.ArtifactRequest;
+import org.eclipse.aether.resolution.ArtifactResolutionException;
+import org.eclipse.aether.resolution.ArtifactResult;
+import org.eclipse.aether.util.artifact.SubArtifact;
+import org.eclipse.aether.util.filter.ScopeDependencyFilter;
+
+/**
+ */
+public class Resolve
+    extends AbstractResolvingTask
+{
+
+    private List<ArtifactConsumer> consumers = new ArrayList<ArtifactConsumer>();
+
+    private boolean failOnMissingAttachments;
+
+    public void setFailOnMissingAttachments( boolean failOnMissingAttachments )
+    {
+        this.failOnMissingAttachments = failOnMissingAttachments;
+    }
+
+    public Path createPath()
+    {
+        Path path = new Path();
+        consumers.add( path );
+        return path;
+    }
+
+    public Files createFiles()
+    {
+        Files files = new Files();
+        consumers.add( files );
+        return files;
+    }
+
+    public Props createProperties()
+    {
+        Props props = new Props();
+        consumers.add( props );
+        return props;
+    }
+
+    private void validate()
+    {
+        for ( ArtifactConsumer consumer : consumers )
+        {
+            consumer.validate();
+        }
+
+        Pom pom = AntRepoSys.getInstance( getProject() ).getDefaultPom();
+        if ( dependencies == null && pom != null )
+        {
+            log( "Using default pom for dependency resolution (" + pom.toString() + ")", Project.MSG_INFO );
+            dependencies = new Dependencies();
+            dependencies.setProject( getProject() );
+            getProject().addReference( Names.ID_DEFAULT_POM, pom );
+            dependencies.setPomRef( new Reference( getProject(), Names.ID_DEFAULT_POM ) );
+        }
+
+        if ( dependencies != null )
+        {
+            dependencies.validate( this );
+        }
+        else
+        {
+            throw new BuildException( "No <dependencies> set for resolution" );
+        }
+    }
+
+    @Override
+    public void execute()
+        throws BuildException
+    {
+        validate();
+
+
+        AntRepoSys sys = AntRepoSys.getInstance( getProject() );
+
+        RepositorySystemSession session = sys.getSession( this, localRepository );
+        RepositorySystem system = sys.getSystem();
+        log( "Using local repository " + session.getLocalRepository(), Project.MSG_VERBOSE );
+
+        DependencyNode root = collectDependencies().getRoot();
+        root.accept( new DependencyGraphLogger( this ) );
+
+        Map<String, Group> groups = new HashMap<String, Group>();
+        for ( ArtifactConsumer consumer : consumers )
+        {
+            String classifier = consumer.getClassifier();
+            Group group = groups.get( classifier );
+            if ( group == null )
+            {
+                group = new Group( classifier );
+                groups.put( classifier, group );
+            }
+            group.add( consumer );
+        }
+
+        for ( Group group : groups.values() )
+        {
+            group.createRequests( root );
+        }
+
+        log( "Resolving artifacts", Project.MSG_INFO );
+
+        for ( Group group : groups.values() )
+        {
+            List<ArtifactResult> results;
+            try
+            {
+                results = system.resolveArtifacts( session, group.getRequests() );
+            }
+            catch ( ArtifactResolutionException e )
+            {
+                if ( !group.isAttachments() || failOnMissingAttachments )
+                {
+                    throw new BuildException( "Could not resolve artifacts: " + e.getMessage(), e );
+                }
+                results = e.getResults();
+                for ( ArtifactResult result : results )
+                {
+                    if ( result.isMissing() )
+                    {
+                        log( "Ignoring missing attachment " + result.getRequest().getArtifact(), Project.MSG_VERBOSE );
+                    }
+                    else if ( !result.isResolved() )
+                    {
+                        throw new BuildException( "Could not resolve artifacts: " + e.getMessage(), e );
+                    }
+                }
+            }
+
+            group.processResults( results, session );
+        }
+    }
+
+    /**
+     */
+    public abstract static class ArtifactConsumer
+        extends ProjectComponent
+    {
+
+        private DependencyFilter filter;
+
+        public boolean accept( org.eclipse.aether.graph.DependencyNode node, List<DependencyNode> parents )
+        {
+            return filter == null || filter.accept( node, parents );
+        }
+
+        public String getClassifier()
+        {
+            return null;
+        }
+
+        public void validate()
+        {
+
+        }
+
+        public abstract void process( Artifact artifact, RepositorySystemSession session );
+
+        public void setScopes( String scopes )
+        {
+            if ( filter != null )
+            {
+                throw new BuildException( "You must not specify both 'scopes' and 'classpath'" );
+            }
+
+            Collection<String> included = new HashSet<String>();
+            Collection<String> excluded = new HashSet<String>();
+
+            String[] split = scopes.split( "[, ]" );
+            for ( String scope : split )
+            {
+                scope = scope.trim();
+                Collection<String> dst;
+                if ( scope.startsWith( "-" ) || scope.startsWith( "!" ) )
+                {
+                    dst = excluded;
+                    scope = scope.substring( 1 );
+                }
+                else
+                {
+                    dst = included;
+                }
+                if ( scope.length() > 0 )
+                {
+                    dst.add( scope );
+                }
+            }
+
+            filter = new ScopeDependencyFilter( included, excluded );
+        }
+
+        public void setClasspath( String classpath )
+        {
+            if ( "compile".equals( classpath ) )
+            {
+                setScopes( "provided,system,compile" );
+            }
+            else if ( "runtime".equals( classpath ) )
+            {
+                setScopes( "compile,runtime" );
+            }
+            else if ( "test".equals( classpath ) )
+            {
+                setScopes( "provided,system,compile,runtime,test" );
+            }
+            else
+            {
+                throw new BuildException( "The classpath '" + classpath + "' is not defined"
+                    + ", must be one of 'compile', 'runtime' or 'test'" );
+            }
+        }
+
+    }
+
+    /**
+     */
+    public class Path
+        extends ArtifactConsumer
+    {
+
+        private String refid;
+
+        private org.apache.tools.ant.types.Path path;
+
+        public void setRefId( String refId )
+        {
+            this.refid = refId;
+        }
+
+        public void validate()
+        {
+            if ( refid == null )
+            {
+                throw new BuildException( "You must specify the 'refid' for the path" );
+            }
+        }
+
+        public void process( Artifact artifact, RepositorySystemSession session )
+        {
+            if ( path == null )
+            {
+                path = new org.apache.tools.ant.types.Path( getProject() );
+                getProject().addReference( refid, path );
+            }
+            path.setLocation( artifact.getFile() );
+        }
+
+    }
+
+    /**
+     */
+    public class Files
+        extends ArtifactConsumer
+    {
+
+        private static final String DEFAULT_LAYOUT = Layout.GID_DIRS + "/" + Layout.AID + "/" + Layout.BVER + "/"
+            + Layout.AID + "-" + Layout.VER + "-" + Layout.CLS + "." + Layout.EXT;
+
+        private String refid;
+
+        private String classifier;
+
+        private File dir;
+
+        private Layout layout;
+
+        private FileSet fileset;
+
+        private Resources resources;
+
+        public void setRefId( String refId )
+        {
+            this.refid = refId;
+        }
+
+        public String getClassifier()
+        {
+            return classifier;
+        }
+
+        public void setAttachments( String attachments )
+        {
+            if ( "sources".equals( attachments ) )
+            {
+                classifier = "*-sources";
+            }
+            else if ( "javadoc".equals( attachments ) )
+            {
+                classifier = "*-javadoc";
+            }
+            else
+            {
+                throw new BuildException( "The attachment type '" + attachments
+                    + "' is not defined, must be one of 'sources' or 'javadoc'" );
+            }
+        }
+
+        public void setDir( File dir )
+        {
+            this.dir = dir;
+            if ( dir != null && layout == null )
+            {
+                layout = new Layout( DEFAULT_LAYOUT );
+            }
+        }
+
+        public void setLayout( String layout )
+        {
+            this.layout = new Layout( layout );
+        }
+
+        public void validate()
+        {
+            if ( refid == null && dir == null )
+            {
+                throw new BuildException( "You must either specify the 'refid' for the resource collection"
+                    + " or a 'dir' to copy the files to" );
+            }
+            if ( dir == null && layout != null )
+            {
+                throw new BuildException( "You must not specify a 'layout' unless 'dir' is also specified" );
+            }
+        }
+
+        public void process( Artifact artifact, RepositorySystemSession session )
+        {
+            if ( dir != null )
+            {
+                if ( refid != null && fileset == null )
+                {
+                    fileset = new FileSet();
+                    fileset.setProject( getProject() );
+                    fileset.setDir( dir );
+                    getProject().addReference( refid, fileset );
+                }
+
+                String path = layout.getPath( artifact );
+
+                if ( fileset != null )
+                {
+                    fileset.createInclude().setName( path );
+                }
+
+                File src = artifact.getFile();
+                File dst = new File( dir, path );
+
+                if ( src.lastModified() != dst.lastModified() || src.length() != dst.length() )
+                {
+                    try
+                    {
+                        Resolve.this.log( "Copy " + src + " to " + dst, Project.MSG_VERBOSE );
+                        FileUtils.getFileUtils().copyFile( src, dst, null, true, true );
+                    }
+                    catch ( IOException e )
+                    {
+                        throw new BuildException( "Failed to copy artifact file " + src + " to " + dst + ": "
+                            + e.getMessage(), e );
+                    }
+                }
+                else
+                {
+                    Resolve.this.log( "Omit to copy " + src + " to " + dst + ", seems unchanged", Project.MSG_VERBOSE );
+                }
+            }
+            else
+            {
+                if ( resources == null )
+                {
+                    resources = new Resources();
+                    resources.setProject( getProject() );
+                    getProject().addReference( refid, resources );
+                }
+
+                FileResource resource = new FileResource( artifact.getFile() );
+                resource.setBaseDir( session.getLocalRepository().getBasedir() );
+                resource.setProject( getProject() );
+                resources.add( resource );
+            }
+        }
+
+    }
+
+    /**
+     */
+    public class Props
+        extends ArtifactConsumer
+    {
+
+        private String prefix;
+
+        private String classifier;
+
+        public void setPrefix( String prefix )
+        {
+            this.prefix = prefix;
+        }
+
+        public String getClassifier()
+        {
+            return classifier;
+        }
+
+        public void setAttachments( String attachments )
+        {
+            if ( "sources".equals( attachments ) )
+            {
+                classifier = "*-sources";
+            }
+            else if ( "javadoc".equals( attachments ) )
+            {
+                classifier = "*-javadoc";
+            }
+            else
+            {
+                throw new BuildException( "The attachment type '" + attachments
+                    + "' is not defined, must be one of 'sources' or 'javadoc'" );
+            }
+        }
+
+        public void process( Artifact artifact, RepositorySystemSession session )
+        {
+            StringBuilder buffer = new StringBuilder( 256 );
+            if ( prefix != null && prefix.length() > 0 )
+            {
+                buffer.append( prefix );
+                if ( !prefix.endsWith( "." ) )
+                {
+                    buffer.append( '.' );
+                }
+            }
+            buffer.append( artifact.getGroupId() );
+            buffer.append( ':' );
+            buffer.append( artifact.getArtifactId() );
+            buffer.append( ':' );
+            buffer.append( artifact.getExtension() );
+            if ( artifact.getClassifier().length() > 0 )
+            {
+                buffer.append( ':' );
+                buffer.append( artifact.getClassifier() );
+            }
+
+            String path = artifact.getFile().getAbsolutePath();
+
+            getProject().setProperty( buffer.toString(), path );
+        }
+
+    }
+
+    private static class Group
+    {
+
+        private String classifier;
+
+        private List<ArtifactConsumer> consumers = new ArrayList<ArtifactConsumer>();
+
+        private List<ArtifactRequest> requests = new ArrayList<ArtifactRequest>();
+
+        public Group( String classifier )
+        {
+            this.classifier = classifier;
+        }
+
+        public boolean isAttachments()
+        {
+            return classifier != null;
+        }
+
+        public void add( ArtifactConsumer consumer )
+        {
+            consumers.add( consumer );
+        }
+
+        public void createRequests( DependencyNode node )
+        {
+            createRequests( node, new LinkedList<DependencyNode>() );
+        }
+
+        private void createRequests( DependencyNode node, LinkedList<DependencyNode> parents )
+        {
+            if ( node.getDependency() != null )
+            {
+                for ( ArtifactConsumer consumer : consumers )
+                {
+                    if ( consumer.accept( node, parents ) )
+                    {
+                        ArtifactRequest request = new ArtifactRequest( node );
+                        if ( classifier != null )
+                        {
+                            request.setArtifact( new SubArtifact( request.getArtifact(), classifier, "jar" ) );
+                        }
+                        requests.add( request );
+                        break;
+                    }
+                }
+            }
+
+            parents.addFirst( node );
+
+            for ( DependencyNode child : node.getChildren() )
+            {
+                createRequests( child, parents );
+            }
+
+            parents.removeFirst();
+        }
+
+        public List<ArtifactRequest> getRequests()
+        {
+            return requests;
+        }
+
+        public void processResults( List<ArtifactResult> results, RepositorySystemSession session )
+        {
+            for ( ArtifactResult result : results )
+            {
+                if ( !result.isResolved() )
+                {
+                    continue;
+                }
+                for ( ArtifactConsumer consumer : consumers )
+                {
+                    if ( consumer.accept( result.getRequest().getDependencyNode(),
+                                          Collections.<DependencyNode>emptyList() ) )
+                    {
+                        consumer.process( result.getArtifact(), session );
+                    }
+                }
+            }
+        }
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifact.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifact.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifact.java
new file mode 100644
index 0000000..7a5d054
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifact.java
@@ -0,0 +1,181 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
+import org.apache.maven.resolver.internal.ant.tasks.RefTask;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public class Artifact
+    extends RefTask
+    implements ArtifactContainer
+{
+
+    private File file;
+
+    private String type;
+
+    private String classifier;
+
+    private Pom pom;
+
+    protected Artifact getRef()
+    {
+        return (Artifact) getCheckedRef();
+    }
+
+    public void validate( Task task )
+    {
+        if ( isReference() )
+        {
+            getRef().validate( task );
+        }
+        else
+        {
+            if ( file == null )
+            {
+                throw new BuildException( "You must specify the 'file' for the artifact" );
+            }
+            else if ( !file.isFile() )
+            {
+                throw new BuildException( "The artifact file " + file + " does not exist" );
+            }
+            if ( type == null || type.length() <= 0 )
+            {
+                throw new BuildException( "You must specify the 'type' for the artifact" );
+            }
+        }
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( file != null || type != null || classifier != null )
+        {
+            throw tooManyAttributes();
+        }
+        super.setRefid( ref );
+    }
+
+    public File getFile()
+    {
+        if ( isReference() )
+        {
+            return getRef().getFile();
+        }
+        return file;
+    }
+
+    public void setFile( File file )
+    {
+        checkAttributesAllowed();
+        this.file = file;
+
+        if ( file != null && type == null )
+        {
+            String name = file.getName();
+            int period = name.lastIndexOf( '.' );
+            if ( period >= 0 )
+            {
+                type = name.substring( period + 1 );
+            }
+        }
+    }
+
+    public String getType()
+    {
+        if ( isReference() )
+        {
+            return getRef().getType();
+        }
+        return ( type != null ) ? type : "jar";
+    }
+
+    public void setType( String type )
+    {
+        checkAttributesAllowed();
+        this.type = type;
+    }
+
+    public String getClassifier()
+    {
+        if ( isReference() )
+        {
+            return getRef().getClassifier();
+        }
+        return ( classifier != null ) ? classifier : "";
+    }
+
+    public void setClassifier( String classifier )
+    {
+        checkAttributesAllowed();
+        this.classifier = classifier;
+    }
+
+    public void setPomRef( Reference ref )
+    {
+        checkAttributesAllowed();
+        Pom pom = new Pom();
+        pom.setProject( getProject() );
+        pom.setRefid( ref );
+        this.pom = pom;
+    }
+
+    public void addPom( Pom pom )
+    {
+        checkChildrenAllowed();
+        this.pom = pom;
+    }
+
+    public Pom getPom()
+    {
+        if ( isReference() )
+        {
+            return getRef().getPom();
+        }
+        return pom;
+    }
+
+    public List<Artifact> getArtifacts()
+    {
+        return Collections.singletonList( this );
+    }
+
+    @Override
+    public void execute()
+        throws BuildException
+    {
+        ProjectWorkspaceReader.getInstance().addArtifact( this );
+    }
+
+    public String toString()
+    {
+        String pomRepr = getPom() != null ? "(" + getPom().toString() + ":)" : "";
+        return String.format( pomRepr + "%s:%s", getType(), getClassifier() );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/ArtifactContainer.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/ArtifactContainer.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/ArtifactContainer.java
new file mode 100644
index 0000000..d447808
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/ArtifactContainer.java
@@ -0,0 +1,35 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.util.List;
+
+import org.apache.tools.ant.Task;
+
+/**
+ */
+public interface ArtifactContainer
+{
+
+    void validate( Task task );
+
+    List<Artifact> getArtifacts();
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifacts.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifacts.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifacts.java
new file mode 100644
index 0000000..85f8b78
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Artifacts.java
@@ -0,0 +1,97 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public class Artifacts
+    extends DataType
+    implements ArtifactContainer
+{
+
+    private List<ArtifactContainer> containers = new ArrayList<ArtifactContainer>();
+
+    protected Artifacts getRef()
+    {
+        return (Artifacts) getCheckedRef();
+    }
+
+    public void validate( Task task )
+    {
+        if ( isReference() )
+        {
+            getRef().validate( task );
+        }
+        else
+        {
+            for ( ArtifactContainer container : containers )
+            {
+                container.validate( task );
+            }
+        }
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( !containers.isEmpty() )
+        {
+            throw noChildrenAllowed();
+        }
+        super.setRefid( ref );
+    }
+
+    public void addArtifact( Artifact artifact )
+    {
+        checkChildrenAllowed();
+        containers.add( artifact );
+    }
+
+    public void addArtifacts( Artifacts artifacts )
+    {
+        checkChildrenAllowed();
+        if ( artifacts == this )
+        {
+            throw circularReference();
+        }
+        containers.add( artifacts );
+    }
+
+    public List<Artifact> getArtifacts()
+    {
+        if ( isReference() )
+        {
+            return getRef().getArtifacts();
+        }
+        List<Artifact> artifacts = new ArrayList<Artifact>();
+        for ( ArtifactContainer container : containers )
+        {
+            artifacts.addAll( container.getArtifacts() );
+        }
+        return artifacts;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Authentication.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Authentication.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Authentication.java
new file mode 100644
index 0000000..6d212fc
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Authentication.java
@@ -0,0 +1,152 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.maven.resolver.internal.ant.AntRepoSys;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public class Authentication
+    extends DataType
+{
+
+    private String username;
+
+    private String password;
+
+    private String privateKeyFile;
+
+    private String passphrase;
+
+    private List<String> servers = new ArrayList<String>();
+
+    @Override
+    public void setProject( Project project )
+    {
+        super.setProject( project );
+
+        AntRepoSys.getInstance( project ).addAuthentication( this );
+    }
+
+    protected Authentication getRef()
+    {
+        return (Authentication) getCheckedRef();
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( username != null || password != null || privateKeyFile != null || passphrase != null )
+        {
+            throw tooManyAttributes();
+        }
+        super.setRefid( ref );
+    }
+
+    public String getUsername()
+    {
+        if ( isReference() )
+        {
+            return getRef().getUsername();
+        }
+        return username;
+    }
+
+    public void setUsername( String username )
+    {
+        checkAttributesAllowed();
+        this.username = username;
+    }
+
+    public String getPassword()
+    {
+        if ( isReference() )
+        {
+            return getRef().getPassword();
+        }
+        return password;
+    }
+
+    public void setPassword( String password )
+    {
+        checkAttributesAllowed();
+        this.password = password;
+    }
+
+    public String getPrivateKeyFile()
+    {
+        if ( isReference() )
+        {
+            return getRef().getPrivateKeyFile();
+        }
+        return privateKeyFile;
+    }
+
+    public void setPrivateKeyFile( String privateKeyFile )
+    {
+        checkAttributesAllowed();
+        this.privateKeyFile = privateKeyFile;
+    }
+
+    public String getPassphrase()
+    {
+        if ( isReference() )
+        {
+            return getRef().getPassphrase();
+        }
+        return passphrase;
+    }
+
+    public void setPassphrase( String passphrase )
+    {
+        checkAttributesAllowed();
+        this.passphrase = passphrase;
+    }
+
+    public List<String> getServers()
+    {
+        if ( isReference() )
+        {
+            return getRef().getServers();
+        }
+        return servers;
+    }
+
+    public void setServers( String servers )
+    {
+        checkAttributesAllowed();
+        this.servers.clear();
+        String[] split = servers.split( "[;:]" );
+        for ( String server : split )
+        {
+            server = server.trim();
+            if ( server.length() > 0 )
+            {
+                this.servers.add( server );
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependencies.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependencies.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependencies.java
new file mode 100644
index 0000000..5e1ea3c
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependencies.java
@@ -0,0 +1,197 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public class Dependencies
+    extends DataType
+    implements DependencyContainer
+{
+
+    private File file;
+
+    private Pom pom;
+
+    private List<DependencyContainer> containers = new ArrayList<DependencyContainer>();
+
+    private List<Exclusion> exclusions = new ArrayList<Exclusion>();
+
+    private boolean nestedDependencies;
+
+    protected Dependencies getRef()
+    {
+        return (Dependencies) getCheckedRef();
+    }
+
+    public void validate( Task task )
+    {
+        if ( isReference() )
+        {
+            getRef().validate( task );
+        }
+        else
+        {
+            if ( getPom() != null && getPom().getFile() == null )
+            {
+                throw new BuildException( "A <pom> used for dependency resolution has to be backed by a pom.xml file" );
+            }
+            Map<String, String> ids = new HashMap<String, String>();
+            for ( DependencyContainer container : containers )
+            {
+                container.validate( task );
+                if ( container instanceof Dependency )
+                {
+                    Dependency dependency = (Dependency) container;
+                    String id = dependency.getVersionlessKey();
+                    String collision = ids.put( id, dependency.getVersion() );
+                    if ( collision != null )
+                    {
+                        throw new BuildException( "You must not declare multiple <dependency> elements"
+                            + " with the same coordinates but got " + id + " -> " + collision + " vs "
+                            + dependency.getVersion() );
+                    }
+                }
+            }
+        }
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( pom != null || !exclusions.isEmpty() || !containers.isEmpty() )
+        {
+            throw noChildrenAllowed();
+        }
+        super.setRefid( ref );
+    }
+
+    public void setFile( File file )
+    {
+        checkAttributesAllowed();
+        this.file = file;
+        checkExternalSources();
+    }
+
+    public File getFile()
+    {
+        if ( isReference() )
+        {
+            return getRef().getFile();
+        }
+        return file;
+    }
+
+    public void addPom( Pom pom )
+    {
+        checkChildrenAllowed();
+        if ( this.pom != null )
+        {
+            throw new BuildException( "You must not specify multiple <pom> elements" );
+        }
+        this.pom = pom;
+        checkExternalSources();
+    }
+
+    public Pom getPom()
+    {
+        if ( isReference() )
+        {
+            return getRef().getPom();
+        }
+        return pom;
+    }
+
+    public void setPomRef( Reference ref )
+    {
+        if ( pom == null )
+        {
+            pom = new Pom();
+            pom.setProject( getProject() );
+        }
+        pom.setRefid( ref );
+        checkExternalSources();
+    }
+
+    private void checkExternalSources()
+    {
+        if ( file != null && pom != null )
+        {
+            throw new BuildException( "You must not specify both a text file and a POM to list dependencies" );
+        }
+        if ( ( file != null || pom != null ) && nestedDependencies )
+        {
+            throw new BuildException( "You must not specify both a file/POM and nested dependency collections" );
+        }
+    }
+
+    public void addDependency( Dependency dependency )
+    {
+        checkChildrenAllowed();
+        containers.add( dependency );
+    }
+
+    public void addDependencies( Dependencies dependencies )
+    {
+        checkChildrenAllowed();
+        if ( dependencies == this )
+        {
+            throw circularReference();
+        }
+        containers.add( dependencies );
+        nestedDependencies = true;
+        checkExternalSources();
+    }
+
+    public List<DependencyContainer> getDependencyContainers()
+    {
+        if ( isReference() )
+        {
+            return getRef().getDependencyContainers();
+        }
+        return containers;
+    }
+
+    public void addExclusion( Exclusion exclusion )
+    {
+        checkChildrenAllowed();
+        this.exclusions.add( exclusion );
+    }
+
+    public List<Exclusion> getExclusions()
+    {
+        if ( isReference() )
+        {
+            return getRef().getExclusions();
+        }
+        return exclusions;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependency.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependency.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependency.java
new file mode 100644
index 0000000..9299a5f
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Dependency.java
@@ -0,0 +1,329 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public class Dependency
+    extends DataType
+    implements DependencyContainer
+{
+
+    private String groupId;
+
+    private String artifactId;
+
+    private String version;
+
+    private String classifier;
+
+    private String type;
+
+    private String scope;
+
+    private File systemPath;
+
+    private List<Exclusion> exclusions = new ArrayList<Exclusion>();
+
+    protected Dependency getRef()
+    {
+        return (Dependency) getCheckedRef();
+    }
+
+    public void validate( Task task )
+    {
+        if ( isReference() )
+        {
+            getRef().validate( task );
+        }
+        else
+        {
+            if ( groupId == null || groupId.length() <= 0 )
+            {
+                throw new BuildException( "You must specify the 'groupId' for a dependency" );
+            }
+            if ( artifactId == null || artifactId.length() <= 0 )
+            {
+                throw new BuildException( "You must specify the 'artifactId' for a dependency" );
+            }
+            if ( version == null || version.length() <= 0 )
+            {
+                throw new BuildException( "You must specify the 'version' for a dependency" );
+            }
+
+            if ( "system".equals( scope ) )
+            {
+                if ( systemPath == null )
+                {
+                    throw new BuildException( "You must specify 'systemPath' for dependencies with scope=system" );
+                }
+            }
+            else if ( systemPath != null )
+            {
+                throw new BuildException( "You may only specify 'systemPath' for dependencies with scope=system" );
+            }
+
+            if ( scope != null && !"compile".equals( scope ) && !"provided".equals( scope ) && !"system".equals( scope )
+                && !"runtime".equals( scope ) && !"test".equals( scope ) )
+            {
+                task.log( "Unknown scope '" + scope + "' for dependency", Project.MSG_WARN );
+            }
+
+            for ( Exclusion exclusion : exclusions )
+            {
+                exclusion.validate( task );
+            }
+        }
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( groupId != null || artifactId != null || type != null || classifier != null || version != null
+            || scope != null || systemPath != null )
+        {
+            throw tooManyAttributes();
+        }
+        if ( !exclusions.isEmpty() )
+        {
+            throw noChildrenAllowed();
+        }
+        super.setRefid( ref );
+    }
+
+    public String getGroupId()
+    {
+        if ( isReference() )
+        {
+            return getRef().getGroupId();
+        }
+        return groupId;
+    }
+
+    public void setGroupId( String groupId )
+    {
+        checkAttributesAllowed();
+        if ( this.groupId != null )
+        {
+            throw ambiguousCoords();
+        }
+        this.groupId = groupId;
+    }
+
+    public String getArtifactId()
+    {
+        if ( isReference() )
+        {
+            return getRef().getArtifactId();
+        }
+        return artifactId;
+    }
+
+    public void setArtifactId( String artifactId )
+    {
+        checkAttributesAllowed();
+        if ( this.artifactId != null )
+        {
+            throw ambiguousCoords();
+        }
+        this.artifactId = artifactId;
+    }
+
+    public String getVersion()
+    {
+        if ( isReference() )
+        {
+            return getRef().getVersion();
+        }
+        return version;
+    }
+
+    public void setVersion( String version )
+    {
+        checkAttributesAllowed();
+        if ( this.version != null )
+        {
+            throw ambiguousCoords();
+        }
+        this.version = version;
+    }
+
+    public String getClassifier()
+    {
+        if ( isReference() )
+        {
+            return getRef().getClassifier();
+        }
+        return classifier;
+    }
+
+    public void setClassifier( String classifier )
+    {
+        checkAttributesAllowed();
+        if ( this.classifier != null )
+        {
+            throw ambiguousCoords();
+        }
+        this.classifier = classifier;
+    }
+
+    public String getType()
+    {
+        if ( isReference() )
+        {
+            return getRef().getType();
+        }
+        return ( type != null ) ? type : "jar";
+    }
+
+    public void setType( String type )
+    {
+        checkAttributesAllowed();
+        if ( this.type != null )
+        {
+            throw ambiguousCoords();
+        }
+        this.type = type;
+    }
+
+    public String getScope()
+    {
+        if ( isReference() )
+        {
+            return getRef().getScope();
+        }
+        return ( scope != null ) ? scope : "compile";
+    }
+
+    public void setScope( String scope )
+    {
+        checkAttributesAllowed();
+        if ( this.scope != null )
+        {
+            throw ambiguousCoords();
+        }
+        this.scope = scope;
+    }
+
+    public void setCoords( String coords )
+    {
+        checkAttributesAllowed();
+        if ( groupId != null || artifactId != null || version != null || type != null || classifier != null
+            || scope != null )
+        {
+            throw ambiguousCoords();
+        }
+        Pattern p = Pattern.compile( "([^: ]+):([^: ]+):([^: ]+)((:([^: ]+)(:([^: ]+))?)?:([^: ]+))?" );
+        Matcher m = p.matcher( coords );
+        if ( !m.matches() )
+        {
+            throw new BuildException( "Bad dependency coordinates '" + coords
+                + "', expected format is <groupId>:<artifactId>:<version>[[:<type>[:<classifier>]]:<scope>]" );
+        }
+        groupId = m.group( 1 );
+        artifactId = m.group( 2 );
+        version = m.group( 3 );
+        type = m.group( 6 );
+        if ( type == null || type.length() <= 0 )
+        {
+            type = "jar";
+        }
+        classifier = m.group( 8 );
+        if ( classifier == null )
+        {
+            classifier = "";
+        }
+        scope = m.group( 9 );
+    }
+
+    public void setSystemPath( File systemPath )
+    {
+        checkAttributesAllowed();
+        this.systemPath = systemPath;
+    }
+
+    public File getSystemPath()
+    {
+        if ( isReference() )
+        {
+            return getRef().getSystemPath();
+        }
+        return systemPath;
+    }
+
+    public String getVersionlessKey()
+    {
+        if ( isReference() )
+        {
+            return getRef().getVersionlessKey();
+        }
+        StringBuilder key = new StringBuilder( 128 );
+        if ( groupId != null )
+        {
+            key.append( groupId );
+        }
+        key.append( ':' );
+        if ( artifactId != null )
+        {
+            key.append( artifactId );
+        }
+        key.append( ':' );
+        key.append( ( type != null ) ? type : "jar" );
+        if ( classifier != null && classifier.length() > 0 )
+        {
+            key.append( ':' );
+            key.append( classifier );
+        }
+        return key.toString();
+    }
+
+    public void addExclusion( Exclusion exclusion )
+    {
+        checkChildrenAllowed();
+        this.exclusions.add( exclusion );
+    }
+
+    public List<Exclusion> getExclusions()
+    {
+        if ( isReference() )
+        {
+            return getRef().getExclusions();
+        }
+        return exclusions;
+    }
+
+    private BuildException ambiguousCoords()
+    {
+        return new BuildException( "You must not specify both 'coords' and "
+            + "('groupId', 'artifactId', 'version', 'extension', 'classifier', 'scope')" );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/DependencyContainer.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/DependencyContainer.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/DependencyContainer.java
new file mode 100644
index 0000000..bcca972
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/DependencyContainer.java
@@ -0,0 +1,31 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import org.apache.tools.ant.Task;
+
+/**
+ */
+public interface DependencyContainer
+{
+
+    void validate( Task task );
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Exclusion.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Exclusion.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Exclusion.java
new file mode 100644
index 0000000..ea0e06e
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Exclusion.java
@@ -0,0 +1,190 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public class Exclusion
+    extends DataType
+{
+
+    private static final String WILDCARD = "*";
+
+    private String groupId;
+
+    private String artifactId;
+
+    private String classifier;
+
+    private String extension;
+
+    protected Exclusion getRef()
+    {
+        return (Exclusion) getCheckedRef();
+    }
+
+    public void validate( Task task )
+    {
+        if ( isReference() )
+        {
+            getRef().validate( task );
+        }
+        else
+        {
+            if ( groupId == null && artifactId == null && classifier == null && extension == null )
+            {
+                throw new BuildException( "You must specify at least one of "
+                    + "'groupId', 'artifactId', 'classifier' or 'extension'" );
+            }
+        }
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( groupId != null || artifactId != null || extension != null || classifier != null )
+        {
+            throw tooManyAttributes();
+        }
+        super.setRefid( ref );
+    }
+
+    public String getGroupId()
+    {
+        if ( isReference() )
+        {
+            return getRef().getGroupId();
+        }
+        return ( groupId != null ) ? groupId : WILDCARD;
+    }
+
+    public void setGroupId( String groupId )
+    {
+        checkAttributesAllowed();
+        if ( this.groupId != null )
+        {
+            throw ambiguousCoords();
+        }
+        this.groupId = groupId;
+    }
+
+    public String getArtifactId()
+    {
+        if ( isReference() )
+        {
+            return getRef().getArtifactId();
+        }
+        return ( artifactId != null ) ? artifactId : WILDCARD;
+    }
+
+    public void setArtifactId( String artifactId )
+    {
+        checkAttributesAllowed();
+        if ( this.artifactId != null )
+        {
+            throw ambiguousCoords();
+        }
+        this.artifactId = artifactId;
+    }
+
+    public String getClassifier()
+    {
+        if ( isReference() )
+        {
+            return getRef().getClassifier();
+        }
+        return ( classifier != null ) ? classifier : WILDCARD;
+    }
+
+    public void setClassifier( String classifier )
+    {
+        checkAttributesAllowed();
+        if ( this.classifier != null )
+        {
+            throw ambiguousCoords();
+        }
+        this.classifier = classifier;
+    }
+
+    public String getExtension()
+    {
+        if ( isReference() )
+        {
+            return getRef().getExtension();
+        }
+        return ( extension != null ) ? extension : WILDCARD;
+    }
+
+    public void setExtension( String extension )
+    {
+        checkAttributesAllowed();
+        if ( this.extension != null )
+        {
+            throw ambiguousCoords();
+        }
+        this.extension = extension;
+    }
+
+    public void setCoords( String coords )
+    {
+        checkAttributesAllowed();
+        if ( groupId != null || artifactId != null || extension != null || classifier != null )
+        {
+            throw ambiguousCoords();
+        }
+        Pattern p = Pattern.compile( "([^: ]+)(:([^: ]+)(:([^: ]+)(:([^: ]*))?)?)?" );
+        Matcher m = p.matcher( coords );
+        if ( !m.matches() )
+        {
+            throw new BuildException( "Bad exclusion coordinates '" + coords
+                + "', expected format is <groupId>[:<artifactId>[:<extension>[:<classifier>]]]" );
+        }
+        groupId = m.group( 1 );
+        artifactId = m.group( 3 );
+        if ( artifactId == null )
+        {
+            artifactId = "*";
+        }
+        extension = m.group( 5 );
+        if ( extension == null )
+        {
+            extension = "*";
+        }
+        classifier = m.group( 7 );
+        if ( classifier == null )
+        {
+            classifier = "*";
+        }
+    }
+
+    private BuildException ambiguousCoords()
+    {
+        return new BuildException( "You must not specify both 'coords' and "
+            + "('groupId', 'artifactId', 'extension', 'classifier')" );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/LocalRepository.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/LocalRepository.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/LocalRepository.java
new file mode 100644
index 0000000..8847e54
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/LocalRepository.java
@@ -0,0 +1,90 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+
+import org.apache.maven.resolver.internal.ant.AntRepoSys;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public class LocalRepository
+    extends DataType
+{
+
+    private final Task task;
+
+    private File dir;
+
+    public LocalRepository()
+    {
+        this( null );
+    }
+
+    public LocalRepository( Task task )
+    {
+        this.task = task;
+    }
+
+    @Override
+    public void setProject( Project project )
+    {
+        super.setProject( project );
+
+        if ( task == null )
+        {
+            AntRepoSys.getInstance( project ).setLocalRepository( this );
+        }
+    }
+
+    protected LocalRepository getRef()
+    {
+        return (LocalRepository) getCheckedRef();
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( dir != null )
+        {
+            throw tooManyAttributes();
+        }
+        super.setRefid( ref );
+    }
+
+    public File getDir()
+    {
+        if ( isReference() )
+        {
+            return getRef().getDir();
+        }
+        return dir;
+    }
+
+    public void setDir( File dir )
+    {
+        checkAttributesAllowed();
+        this.dir = dir;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Mirror.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Mirror.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Mirror.java
new file mode 100644
index 0000000..21534e8
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Mirror.java
@@ -0,0 +1,154 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.resolver.internal.ant.AntRepoSys;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public class Mirror
+    extends DataType
+{
+
+    private String id;
+
+    private String url;
+
+    private String type;
+
+    private String mirrorOf;
+
+    private Authentication authentication;
+
+    @Override
+    public void setProject( Project project )
+    {
+        super.setProject( project );
+
+        AntRepoSys.getInstance( project ).addMirror( this );
+    }
+
+    protected Mirror getRef()
+    {
+        return (Mirror) getCheckedRef();
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( id != null || url != null || mirrorOf != null || type != null )
+        {
+            throw tooManyAttributes();
+        }
+        super.setRefid( ref );
+    }
+
+    public String getId()
+    {
+        if ( isReference() )
+        {
+            return getRef().getId();
+        }
+        return id;
+    }
+
+    public void setId( String id )
+    {
+        this.id = id;
+    }
+
+    public String getUrl()
+    {
+        if ( isReference() )
+        {
+            return getRef().getUrl();
+        }
+        return url;
+    }
+
+    public void setUrl( String url )
+    {
+        checkAttributesAllowed();
+        this.url = url;
+    }
+
+    public String getType()
+    {
+        if ( isReference() )
+        {
+            return getRef().getType();
+        }
+        return ( type != null ) ? type : "default";
+    }
+
+    public void setType( String type )
+    {
+        checkAttributesAllowed();
+        this.type = type;
+    }
+
+    public String getMirrorOf()
+    {
+        if ( isReference() )
+        {
+            return getRef().getMirrorOf();
+        }
+        return mirrorOf;
+    }
+
+    public void setMirrorOf( String mirrorOf )
+    {
+        checkAttributesAllowed();
+        this.mirrorOf = mirrorOf;
+    }
+
+    public void addAuthentication( Authentication authentication )
+    {
+        checkChildrenAllowed();
+        if ( this.authentication != null )
+        {
+            throw new BuildException( "You must not specify multiple <authentication> elements" );
+        }
+        this.authentication = authentication;
+    }
+
+    public Authentication getAuthentication()
+    {
+        if ( isReference() )
+        {
+            getRef().getAuthentication();
+        }
+        return authentication;
+    }
+
+    public void setAuthRef( Reference ref )
+    {
+        if ( authentication == null )
+        {
+            authentication = new Authentication();
+            authentication.setProject( getProject() );
+        }
+        authentication.setRefid( ref );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/ModelValueExtractor.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/ModelValueExtractor.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/ModelValueExtractor.java
new file mode 100644
index 0000000..c1ab45c
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/ModelValueExtractor.java
@@ -0,0 +1,99 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.model.Model;
+import org.apache.tools.ant.Project;
+import org.codehaus.plexus.interpolation.reflection.ReflectionValueExtractor;
+
+/**
+ */
+class ModelValueExtractor
+{
+
+    private static final String PREFIX_PROPERTIES = "properties.";
+
+    private final String prefix;
+
+    private final Project project;
+
+    private final Model model;
+
+    public ModelValueExtractor( String prefix, Model model, Project project )
+    {
+        if ( model == null )
+        {
+            throw new IllegalArgumentException( "reference to Maven POM has not been specified" );
+        }
+        if ( project == null )
+        {
+            throw new IllegalArgumentException( "reference to Ant project has not been specified" );
+        }
+        if ( prefix == null || prefix.length() <= 0 )
+        {
+            prefix = "pom.";
+        }
+        else if ( !prefix.endsWith( "." ) )
+        {
+            prefix += '.';
+        }
+        this.prefix = prefix;
+        this.model = model;
+        this.project = project;
+    }
+
+    public Project getProject()
+    {
+        return project;
+    }
+
+    public boolean isApplicable( String expression )
+    {
+        return expression.startsWith( prefix );
+    }
+
+    public Object getValue( String expression )
+    {
+        if ( expression.startsWith( prefix ) )
+        {
+            String expr = expression.substring( prefix.length() );
+            try
+            {
+                if ( expr.startsWith( PREFIX_PROPERTIES ) )
+                {
+                    String key = expr.substring( PREFIX_PROPERTIES.length() );
+                    return model.getProperties().getProperty( key );
+                }
+
+                return ReflectionValueExtractor.evaluate( expr, model, false );
+            }
+            catch ( Exception e )
+            {
+                project.log( "Could not retrieve '" + expression + "' from POM: " + e.getMessage(), e, Project.MSG_WARN );
+                return null;
+            }
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Pom.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Pom.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Pom.java
new file mode 100644
index 0000000..62ca308
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/types/Pom.java
@@ -0,0 +1,352 @@
+package org.apache.maven.resolver.internal.ant.types;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.maven.model.Model;
+import org.apache.maven.resolver.internal.ant.AntRepoSys;
+import org.apache.maven.resolver.internal.ant.ProjectWorkspaceReader;
+import org.apache.maven.resolver.internal.ant.tasks.RefTask;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.PropertyHelper;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.Reference;
+
+/**
+ */
+public class Pom
+    extends RefTask
+{
+
+    private Model model;
+
+    private String id;
+
+    private File file;
+
+    private String groupId;
+
+    private String artifactId;
+
+    private String version;
+
+    private String packaging = "jar";
+
+    private RemoteRepositories remoteRepositories;
+
+    private String coords;
+
+    protected Pom getRef()
+    {
+        return (Pom) getCheckedRef();
+    }
+
+    public void validate()
+    {
+        if ( isReference() )
+        {
+            getRef().validate();
+        }
+        else
+        {
+            if ( file == null )
+            {
+                if ( groupId == null )
+                {
+                    throw new BuildException( "You must specify the 'groupId' for the POM" );
+                }
+                if ( artifactId == null )
+                {
+                    throw new BuildException( "You must specify the 'artifactId' for the POM" );
+                }
+                if ( version == null )
+                {
+                    throw new BuildException( "You must specify the 'version' for the POM" );
+                }
+            }
+        }
+
+    }
+
+    public void setRefid( Reference ref )
+    {
+        if ( id != null || file != null || groupId != null || artifactId != null || version != null )
+        {
+            throw tooManyAttributes();
+        }
+        if ( remoteRepositories != null )
+        {
+            throw noChildrenAllowed();
+        }
+        super.setRefid( ref );
+    }
+
+    public void setId( String id )
+    {
+        checkAttributesAllowed();
+        this.id = id;
+    }
+
+    public File getFile()
+    {
+        if ( isReference() )
+        {
+            return getRef().getFile();
+        }
+        return file;
+    }
+
+    public void setFile( File file )
+    {
+        checkAttributesAllowed();
+        if ( groupId != null || artifactId != null || version != null )
+        {
+            throw ambiguousSource();
+        }
+
+        this.file = file;
+
+    }
+
+    public String getGroupId()
+    {
+        if ( isReference() )
+        {
+            return getRef().getGroupId();
+        }
+        return groupId;
+    }
+
+    public void setGroupId( String groupId )
+    {
+        checkAttributesAllowed();
+        if ( this.groupId != null )
+        {
+            throw ambiguousCoords();
+        }
+        if ( file != null )
+        {
+            throw ambiguousSource();
+        }
+        this.groupId = groupId;
+    }
+
+    public String getArtifactId()
+    {
+        if ( isReference() )
+        {
+            return getRef().getArtifactId();
+        }
+        return artifactId;
+    }
+
+    public void setArtifactId( String artifactId )
+    {
+        checkAttributesAllowed();
+        if ( this.artifactId != null )
+        {
+            throw ambiguousCoords();
+        }
+        if ( file != null )
+        {
+            throw ambiguousSource();
+        }
+        this.artifactId = artifactId;
+    }
+
+    public String getVersion()
+    {
+        if ( isReference() )
+        {
+            return getRef().getVersion();
+        }
+        return version;
+    }
+
+    public void setVersion( String version )
+    {
+        checkAttributesAllowed();
+        if ( this.version != null )
+        {
+            throw ambiguousCoords();
+        }
+        if ( file != null )
+        {
+            throw ambiguousSource();
+        }
+        this.version = version;
+    }
+
+    public String getCoords()
+    {
+        if ( isReference() )
+        {
+            return getRef().getCoords();
+        }
+        return coords;
+    }
+
+    public void setCoords( String coords )
+    {
+        checkAttributesAllowed();
+        if ( file != null )
+        {
+            throw ambiguousSource();
+        }
+        if ( groupId != null || artifactId != null || version != null )
+        {
+            throw ambiguousCoords();
+        }
+        Pattern p = Pattern.compile( "([^: ]+):([^: ]+):([^: ]+)" );
+        Matcher m = p.matcher( coords );
+        if ( !m.matches() )
+        {
+            throw new BuildException( "Bad POM coordinates, expected format is <groupId>:<artifactId>:<version>" );
+        }
+        groupId = m.group( 1 );
+        artifactId = m.group( 2 );
+        version = m.group( 3 );
+    }
+
+    private BuildException ambiguousCoords()
+    {
+        return new BuildException( "You must not specify both 'coords' and ('groupId', 'artifactId', 'version')" );
+    }
+
+    private BuildException ambiguousSource()
+    {
+        return new BuildException( "You must not specify both 'file' and "
+            + "('coords', 'groupId', 'artifactId', 'version')" );
+    }
+
+    public String getPackaging()
+    {
+        if ( isReference() )
+        {
+            return getRef().getPackaging();
+        }
+        return packaging;
+    }
+
+    public void setPackaging( String packaging )
+    {
+        checkAttributesAllowed();
+        if ( file != null )
+        {
+            throw ambiguousSource();
+        }
+        this.packaging = packaging;
+    }
+
+    private RemoteRepositories getRemoteRepos()
+    {
+        if ( remoteRepositories == null )
+        {
+            remoteRepositories = new RemoteRepositories();
+            remoteRepositories.setProject( getProject() );
+        }
+        return remoteRepositories;
+    }
+
+    public void addRemoteRepo( RemoteRepository repository )
+    {
+        getRemoteRepos().addRemoterepo( repository );
+    }
+
+    public void addRemoteRepos( RemoteRepositories repositories )
+    {
+        getRemoteRepos().addRemoterepos( repositories );
+    }
+
+    public void setRemoteReposRef( Reference ref )
+    {
+        RemoteRepositories repos = new RemoteRepositories();
+        repos.setProject( getProject() );
+        repos.setRefid( ref );
+        getRemoteRepos().addRemoterepos( repos );
+    }
+
+    public Model getModel( Task task )
+    {
+        if ( isReference() )
+        {
+            return getRef().getModel( task );
+        }
+        synchronized ( this )
+        {
+            if ( model == null )
+            {
+                if ( file != null )
+                {
+                    model = AntRepoSys.getInstance( getProject() ).loadModel( task, file, true, remoteRepositories );
+                }
+            }
+            return model;
+        }
+    }
+
+    @Override
+    public void execute()
+    {
+        validate();
+
+        if ( file != null && ( id == null || AntRepoSys.getInstance( getProject() ).getDefaultPom() == null ) )
+        {
+            AntRepoSys.getInstance( getProject() ).setDefaultPom( this );
+        }
+
+        ProjectWorkspaceReader.getInstance().addPom( this );
+
+        Model model = getModel( this );
+
+        if ( model == null )
+        {
+            coords = getGroupId() + ":" + getArtifactId() + ":" + getVersion();
+            return;
+        }
+
+        coords = model.getGroupId() + ":" + model.getArtifactId() + ":" + model.getVersion();
+
+        ModelValueExtractor extractor = new ModelValueExtractor( id, model, getProject() );
+
+        PropertyHelper propHelper = PropertyHelper.getPropertyHelper( getProject() );
+
+        try
+        {
+            // Ant 1.8.0 delegate
+            PomPropertyEvaluator.register( extractor, propHelper );
+        }
+        catch ( LinkageError e )
+        {
+            // Ant 1.6 - 1.7.1 interceptor chaining
+            PomPropertyHelper.register( extractor, propHelper );
+        }
+
+    }
+
+    public String toString()
+    {
+        return coords + " (" + super.toString() + ")";
+    }
+
+}

Reply | Threaded
Open this post in threaded view
|

[8/9] maven-resolver git commit: moved ant tasks into subfolder

mmoser
In reply to this post by mmoser
http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java
new file mode 100644
index 0000000..3b158e4
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntRepoSys.java
@@ -0,0 +1,825 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.apache.maven.model.Model;
+import org.apache.maven.model.building.DefaultModelBuilderFactory;
+import org.apache.maven.model.building.DefaultModelBuildingRequest;
+import org.apache.maven.model.building.FileModelSource;
+import org.apache.maven.model.building.ModelBuilder;
+import org.apache.maven.model.building.ModelBuildingException;
+import org.apache.maven.model.building.ModelBuildingRequest;
+import org.apache.maven.model.resolution.ModelResolver;
+import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
+import org.apache.maven.resolver.internal.ant.types.Artifact;
+import org.apache.maven.resolver.internal.ant.types.Artifacts;
+import org.apache.maven.resolver.internal.ant.types.Authentication;
+import org.apache.maven.resolver.internal.ant.types.Dependencies;
+import org.apache.maven.resolver.internal.ant.types.Dependency;
+import org.apache.maven.resolver.internal.ant.types.DependencyContainer;
+import org.apache.maven.resolver.internal.ant.types.Exclusion;
+import org.apache.maven.resolver.internal.ant.types.LocalRepository;
+import org.apache.maven.resolver.internal.ant.types.Mirror;
+import org.apache.maven.resolver.internal.ant.types.Pom;
+import org.apache.maven.resolver.internal.ant.types.Proxy;
+import org.apache.maven.resolver.internal.ant.types.RemoteRepositories;
+import org.apache.maven.resolver.internal.ant.types.RemoteRepository;
+import org.apache.maven.settings.Server;
+import org.apache.maven.settings.Settings;
+import org.apache.maven.settings.building.DefaultSettingsBuilderFactory;
+import org.apache.maven.settings.building.DefaultSettingsBuildingRequest;
+import org.apache.maven.settings.building.SettingsBuilder;
+import org.apache.maven.settings.building.SettingsBuildingException;
+import org.apache.maven.settings.crypto.DefaultSettingsDecryptionRequest;
+import org.apache.maven.settings.crypto.SettingsDecrypter;
+import org.apache.maven.settings.crypto.SettingsDecryptionResult;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.condition.Os;
+import org.apache.tools.ant.types.Reference;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.eclipse.aether.ConfigurationProperties;
+import org.eclipse.aether.DefaultRepositoryCache;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.eclipse.aether.collection.CollectRequest;
+import org.eclipse.aether.collection.CollectResult;
+import org.eclipse.aether.collection.DependencyCollectionException;
+import org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory;
+import org.eclipse.aether.deployment.DeployRequest;
+import org.eclipse.aether.deployment.DeploymentException;
+import org.eclipse.aether.impl.DefaultServiceLocator;
+import org.eclipse.aether.impl.RemoteRepositoryManager;
+import org.eclipse.aether.installation.InstallRequest;
+import org.eclipse.aether.installation.InstallationException;
+import org.eclipse.aether.repository.AuthenticationSelector;
+import org.eclipse.aether.repository.LocalRepositoryManager;
+import org.eclipse.aether.repository.MirrorSelector;
+import org.eclipse.aether.repository.ProxySelector;
+import org.eclipse.aether.spi.connector.RepositoryConnectorFactory;
+import org.eclipse.aether.spi.connector.transport.TransporterFactory;
+import org.eclipse.aether.spi.log.Logger;
+import org.eclipse.aether.transport.classpath.ClasspathTransporterFactory;
+import org.eclipse.aether.transport.file.FileTransporterFactory;
+import org.eclipse.aether.transport.http.HttpTransporterFactory;
+import org.eclipse.aether.util.repository.AuthenticationBuilder;
+import org.eclipse.aether.util.repository.ConservativeAuthenticationSelector;
+import org.eclipse.aether.util.repository.DefaultAuthenticationSelector;
+import org.eclipse.aether.util.repository.DefaultMirrorSelector;
+import org.eclipse.aether.util.repository.DefaultProxySelector;
+
+/**
+ */
+public class AntRepoSys
+{
+
+    private static final boolean OS_WINDOWS = Os.isFamily( "windows" );
+
+    private static final ModelBuilder MODEL_BUILDER = new DefaultModelBuilderFactory().newInstance();
+
+    private static final SettingsBuilder SETTINGS_BUILDER = new DefaultSettingsBuilderFactory().newInstance();
+
+    private static final SettingsDecrypter SETTINGS_DECRYPTER = new AntSettingsDecryptorFactory().newInstance();
+
+    private final Project project;
+
+    private final DefaultServiceLocator locator;
+
+    private RepositorySystem repoSys;
+
+    private RemoteRepositoryManager remoteRepoMan;
+
+    private File userSettings;
+
+    private File globalSettings;
+
+    private Settings settings;
+
+    private final List<Mirror> mirrors = new CopyOnWriteArrayList<Mirror>();
+
+    private final List<Proxy> proxies = new CopyOnWriteArrayList<Proxy>();
+
+    private final List<Authentication> authentications = new CopyOnWriteArrayList<Authentication>();
+
+    private LocalRepository localRepository;
+
+    private Pom defaultPom;
+
+    private static <T> boolean eq( T o1, T o2 )
+    {
+        return ( o1 == null ) ? o2 == null : o1.equals( o2 );
+    }
+
+    public static synchronized AntRepoSys getInstance( Project project )
+    {
+        Object obj = project.getReference( Names.ID );
+        if ( obj instanceof AntRepoSys )
+        {
+            return (AntRepoSys) obj;
+        }
+        AntRepoSys instance = new AntRepoSys( project );
+        project.addReference( Names.ID, instance );
+        instance.initDefaults();
+        return instance;
+    }
+
+    private AntRepoSys( Project project )
+    {
+        this.project = project;
+
+        locator = MavenRepositorySystemUtils.newServiceLocator();
+        locator.setErrorHandler( new AntServiceLocatorErrorHandler( project ) );
+        locator.setServices( Logger.class, new AntLogger( project ) );
+        locator.setServices( ModelBuilder.class, MODEL_BUILDER );
+        locator.addService( RepositoryConnectorFactory.class, BasicRepositoryConnectorFactory.class );
+        locator.addService( TransporterFactory.class, FileTransporterFactory.class );
+        locator.addService( TransporterFactory.class, HttpTransporterFactory.class );
+        locator.addService( TransporterFactory.class, ClasspathTransporterFactory.class );
+    }
+
+    private void initDefaults()
+    {
+        RemoteRepository repo = new RemoteRepository();
+        repo.setProject( project );
+        repo.setId( "central" );
+        repo.setUrl( "http://repo1.maven.org/maven2/" );
+        project.addReference( Names.ID_CENTRAL, repo );
+
+        repo = new RemoteRepository();
+        repo.setProject( project );
+        repo.setRefid( new Reference( project, Names.ID_CENTRAL ) );
+        RemoteRepositories repos = new RemoteRepositories();
+        repos.setProject( project );
+        repos.addRemoterepo( repo );
+        project.addReference( Names.ID_DEFAULT_REPOS, repos );
+    }
+
+    public synchronized RepositorySystem getSystem()
+    {
+        if ( repoSys == null )
+        {
+            repoSys = locator.getService( RepositorySystem.class );
+            if ( repoSys == null )
+            {
+                throw new BuildException( "The repository system could not be initialized" );
+            }
+        }
+        return repoSys;
+    }
+
+    private synchronized RemoteRepositoryManager getRemoteRepoMan()
+    {
+        if ( remoteRepoMan == null )
+        {
+            remoteRepoMan = locator.getService( RemoteRepositoryManager.class );
+            if ( remoteRepoMan == null )
+            {
+                throw new BuildException( "The repository system could not be initialized" );
+            }
+        }
+        return remoteRepoMan;
+    }
+
+    public RepositorySystemSession getSession( Task task, LocalRepository localRepo )
+    {
+        DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
+
+        Map<Object, Object> configProps = new LinkedHashMap<Object, Object>();
+        configProps.put( ConfigurationProperties.USER_AGENT, getUserAgent() );
+        configProps.putAll( (Map<?, ?>) project.getProperties() );
+        processServerConfiguration( configProps );
+        session.setConfigProperties( configProps );
+
+        session.setOffline( isOffline() );
+        session.setUserProperties( project.getUserProperties() );
+
+        session.setProxySelector( getProxySelector() );
+        session.setMirrorSelector( getMirrorSelector() );
+        session.setAuthenticationSelector( getAuthSelector() );
+
+        session.setCache( new DefaultRepositoryCache() );
+
+        session.setRepositoryListener( new AntRepositoryListener( task ) );
+        session.setTransferListener( new AntTransferListener( task ) );
+
+        session.setLocalRepositoryManager( getLocalRepoMan( session, localRepo ) );
+
+        session.setWorkspaceReader( ProjectWorkspaceReader.getInstance() );
+
+        return session;
+    }
+
+    private String getUserAgent()
+    {
+        StringBuilder buffer = new StringBuilder( 128 );
+
+        buffer.append( "Apache-Ant/" ).append( project.getProperty( "ant.version" ) );
+        buffer.append( " (" );
+        buffer.append( "Java " ).append( System.getProperty( "java.version" ) );
+        buffer.append( "; " );
+        buffer.append( System.getProperty( "os.name" ) ).append( " " ).append( System.getProperty( "os.version" ) );
+        buffer.append( ")" );
+        buffer.append( " Aether" );
+
+        return buffer.toString();
+    }
+
+    private boolean isOffline()
+    {
+        String prop = project.getProperty( Names.PROPERTY_OFFLINE );
+        if ( prop != null )
+        {
+            return Boolean.parseBoolean( prop );
+        }
+        return getSettings().isOffline();
+    }
+
+    private void processServerConfiguration( Map<Object, Object> configProps )
+    {
+        Settings settings = getSettings();
+        for ( Server server : settings.getServers() )
+        {
+            if ( server.getConfiguration() != null )
+            {
+                Xpp3Dom dom = (Xpp3Dom) server.getConfiguration();
+                for ( int i = dom.getChildCount() - 1; i >= 0; i-- )
+                {
+                    Xpp3Dom child = dom.getChild( i );
+                    if ( "wagonProvider".equals( child.getName() ) )
+                    {
+                        dom.removeChild( i );
+                    }
+                    else if ( "httpHeaders".equals( child.getName() ) )
+                    {
+                        configProps.put( ConfigurationProperties.HTTP_HEADERS + "." + server.getId(),
+                                         getHttpHeaders( child ) );
+                    }
+                }
+
+                configProps.put( "aether.connector.wagon.config." + server.getId(), dom );
+            }
+
+            configProps.put( "aether.connector.perms.fileMode." + server.getId(), server.getFilePermissions() );
+            configProps.put( "aether.connector.perms.dirMode." + server.getId(), server.getDirectoryPermissions() );
+        }
+    }
+
+    private Map<String, String> getHttpHeaders( Xpp3Dom dom )
+    {
+        Map<String, String> headers = new HashMap<String, String>();
+        for ( int i = 0; i < dom.getChildCount(); i++ )
+        {
+            Xpp3Dom child = dom.getChild( i );
+            Xpp3Dom name = child.getChild( "name" );
+            Xpp3Dom value = child.getChild( "value" );
+            if ( name != null && name.getValue() != null )
+            {
+                headers.put( name.getValue(), ( value != null ) ? value.getValue() : null );
+            }
+        }
+        return Collections.unmodifiableMap( headers );
+    }
+
+    private File getDefaultLocalRepoDir()
+    {
+        String dir = project.getProperty( "maven.repo.local" );
+        if ( dir != null )
+        {
+            return project.resolveFile( dir );
+        }
+
+        Settings settings = getSettings();
+        if ( settings.getLocalRepository() != null )
+        {
+            return new File( settings.getLocalRepository() );
+        }
+
+        return new File( new File( project.getProperty( "user.home" ), ".m2" ), "repository" );
+    }
+
+    private LocalRepositoryManager getLocalRepoMan( RepositorySystemSession session, LocalRepository localRepo )
+    {
+        if ( localRepo == null )
+        {
+            localRepo = localRepository;
+        }
+
+        File repoDir;
+        if ( localRepo != null && localRepo.getDir() != null )
+        {
+            repoDir = localRepo.getDir();
+        }
+        else
+        {
+            repoDir = getDefaultLocalRepoDir();
+        }
+
+        org.eclipse.aether.repository.LocalRepository repo =
+            new org.eclipse.aether.repository.LocalRepository( repoDir );
+
+        return getSystem().newLocalRepositoryManager( session, repo );
+    }
+
+    private synchronized Settings getSettings()
+    {
+        if ( settings == null )
+        {
+            DefaultSettingsBuildingRequest request = new DefaultSettingsBuildingRequest();
+            request.setUserSettingsFile( getUserSettings() );
+            request.setGlobalSettingsFile( getGlobalSettings() );
+            request.setSystemProperties( getSystemProperties() );
+            request.setUserProperties( getUserProperties() );
+
+            try
+            {
+                settings = SETTINGS_BUILDER.build( request ).getEffectiveSettings();
+            }
+            catch ( SettingsBuildingException e )
+            {
+                project.log( "Could not process settings.xml: " + e.getMessage(), e, Project.MSG_WARN );
+            }
+
+            SettingsDecryptionResult result =
+                SETTINGS_DECRYPTER.decrypt( new DefaultSettingsDecryptionRequest( settings ) );
+            settings.setServers( result.getServers() );
+            settings.setProxies( result.getProxies() );
+        }
+        return settings;
+    }
+
+    private ProxySelector getProxySelector()
+    {
+        DefaultProxySelector selector = new DefaultProxySelector();
+
+        for ( Proxy proxy : proxies )
+        {
+            selector.add( ConverterUtils.toProxy( proxy ), proxy.getNonProxyHosts() );
+        }
+
+        Settings settings = getSettings();
+        for ( org.apache.maven.settings.Proxy proxy : settings.getProxies() )
+        {
+            AuthenticationBuilder auth = new AuthenticationBuilder();
+            auth.addUsername( proxy.getUsername() ).addPassword( proxy.getPassword() );
+            selector.add( new org.eclipse.aether.repository.Proxy( proxy.getProtocol(), proxy.getHost(),
+                                                                   proxy.getPort(), auth.build() ),
+                          proxy.getNonProxyHosts() );
+        }
+
+        return selector;
+    }
+
+    private MirrorSelector getMirrorSelector()
+    {
+        DefaultMirrorSelector selector = new DefaultMirrorSelector();
+
+        for ( Mirror mirror : mirrors )
+        {
+            selector.add( mirror.getId(), mirror.getUrl(), mirror.getType(), false, mirror.getMirrorOf(), null );
+        }
+
+        Settings settings = getSettings();
+        for ( org.apache.maven.settings.Mirror mirror : settings.getMirrors() )
+        {
+            selector.add( String.valueOf( mirror.getId() ), mirror.getUrl(), mirror.getLayout(), false,
+                          mirror.getMirrorOf(), mirror.getMirrorOfLayouts() );
+        }
+
+        return selector;
+    }
+
+    private AuthenticationSelector getAuthSelector()
+    {
+        DefaultAuthenticationSelector selector = new DefaultAuthenticationSelector();
+
+        Collection<String> ids = new HashSet<String>();
+        for ( Authentication auth : authentications )
+        {
+            List<String> servers = auth.getServers();
+            if ( !servers.isEmpty() )
+            {
+                org.eclipse.aether.repository.Authentication a = ConverterUtils.toAuthentication( auth );
+                for ( String server : servers )
+                {
+                    if ( ids.add( server ) )
+                    {
+                        selector.add( server, a );
+                    }
+                }
+            }
+        }
+
+        Settings settings = getSettings();
+        for ( Server server : settings.getServers() )
+        {
+            AuthenticationBuilder auth = new AuthenticationBuilder();
+            auth.addUsername( server.getUsername() ).addPassword( server.getPassword() );
+            auth.addPrivateKey( server.getPrivateKey(), server.getPassphrase() );
+            selector.add( server.getId(), auth.build() );
+        }
+
+        return new ConservativeAuthenticationSelector( selector );
+    }
+
+    public synchronized void setUserSettings( File file )
+    {
+        if ( !eq( this.userSettings, file ) )
+        {
+            settings = null;
+        }
+        this.userSettings = file;
+    }
+
+    /* UT */File getUserSettings()
+    {
+        if ( userSettings == null )
+        {
+            userSettings = AetherUtils.findUserSettings( project );
+        }
+        return userSettings;
+    }
+
+    public void setGlobalSettings( File file )
+    {
+        if ( !eq( this.globalSettings, file ) )
+        {
+            settings = null;
+        }
+        this.globalSettings = file;
+    }
+
+    /* UT */File getGlobalSettings()
+    {
+        if ( globalSettings == null )
+        {
+            globalSettings = AetherUtils.findGlobalSettings( project );
+        }
+        return globalSettings;
+    }
+
+    public void addProxy( Proxy proxy )
+    {
+        proxies.add( proxy );
+    }
+
+    public void addMirror( Mirror mirror )
+    {
+        mirrors.add( mirror );
+    }
+
+    public void addAuthentication( Authentication authentication )
+    {
+        authentications.add( authentication );
+    }
+
+    public void setLocalRepository( LocalRepository localRepository )
+    {
+        this.localRepository = localRepository;
+    }
+
+    public Model loadModel( Task task, File pomFile, boolean local, RemoteRepositories remoteRepositories )
+    {
+        RepositorySystemSession session = getSession( task, null );
+
+        remoteRepositories =
+            remoteRepositories == null ? AetherUtils.getDefaultRepositories( project ) : remoteRepositories;
+
+        List<org.eclipse.aether.repository.RemoteRepository> repositories =
+            ConverterUtils.toRepositories( task.getProject(), session, remoteRepositories, getRemoteRepoMan() );
+
+        ModelResolver modelResolver =
+            new AntModelResolver( session, "project", getSystem(), getRemoteRepoMan(), repositories );
+
+        Settings settings = getSettings();
+
+        try
+        {
+            DefaultModelBuildingRequest request = new DefaultModelBuildingRequest();
+            request.setLocationTracking( true );
+            request.setProcessPlugins( false );
+            if ( local )
+            {
+                request.setPomFile( pomFile );
+                request.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_STRICT );
+            }
+            else
+            {
+                request.setModelSource( new FileModelSource( pomFile ) );
+                request.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL );
+            }
+            request.setSystemProperties( getSystemProperties() );
+            request.setUserProperties( getUserProperties() );
+            request.setProfiles( SettingsUtils.convert( settings.getProfiles() ) );
+            request.setActiveProfileIds( settings.getActiveProfiles() );
+            request.setModelResolver( modelResolver );
+            return MODEL_BUILDER.build( request ).getEffectiveModel();
+        }
+        catch ( ModelBuildingException e )
+        {
+            throw new BuildException( "Could not load POM " + pomFile + ": " + e.getMessage(), e );
+        }
+    }
+
+    private Properties getSystemProperties()
+    {
+        Properties props = new Properties();
+        getEnvProperties( props );
+        props.putAll( System.getProperties() );
+        ConverterUtils.addProperties( props, project.getProperties() );
+        return props;
+    }
+
+    private Properties getEnvProperties( Properties props )
+    {
+        if ( props == null )
+        {
+            props = new Properties();
+        }
+        boolean envCaseInsensitive = OS_WINDOWS;
+        for ( Map.Entry<String, String> entry : System.getenv().entrySet() )
+        {
+            String key = entry.getKey();
+            if ( envCaseInsensitive )
+            {
+                key = key.toUpperCase( Locale.ENGLISH );
+            }
+            key = "env." + key;
+            props.put( key, entry.getValue() );
+        }
+        return props;
+    }
+
+    private Properties getUserProperties()
+    {
+        return ConverterUtils.addProperties( null, project.getUserProperties() );
+    }
+
+    /**
+     * Sets the default POM.
+     */
+    public void setDefaultPom( Pom pom )
+    {
+        this.defaultPom = pom;
+    }
+
+    /**
+     * Returns the current default POM.
+     */
+    public Pom getDefaultPom()
+    {
+        return defaultPom;
+    }
+
+    public CollectResult collectDependencies( Task task, Dependencies dependencies, LocalRepository localRepository,
+                                              RemoteRepositories remoteRepositories )
+    {
+        RepositorySystemSession session = getSession( task, localRepository );
+
+        remoteRepositories =
+            remoteRepositories == null ? AetherUtils.getDefaultRepositories( project ) : remoteRepositories;
+
+        List<org.eclipse.aether.repository.RemoteRepository> repos =
+            ConverterUtils.toRepositories( project, session, remoteRepositories, getRemoteRepoMan() );
+
+        CollectRequest collectRequest = new CollectRequest();
+        collectRequest.setRequestContext( "project" );
+
+        for ( org.eclipse.aether.repository.RemoteRepository repo : repos )
+        {
+            task.getProject().log( "Using remote repository " + repo, Project.MSG_VERBOSE );
+            collectRequest.addRepository( repo );
+        }
+
+        if ( dependencies != null )
+        {
+            populateCollectRequest( collectRequest, task, session, dependencies, Collections.<Exclusion>emptyList() );
+        }
+
+        task.getProject().log( "Collecting dependencies", Project.MSG_VERBOSE );
+
+        CollectResult result;
+        try
+        {
+            result = getSystem().collectDependencies( session, collectRequest );
+        }
+        catch ( DependencyCollectionException e )
+        {
+            throw new BuildException( "Could not collect dependencies: " + e.getMessage(), e );
+        }
+
+        return result;
+    }
+
+    private void populateCollectRequest( CollectRequest collectRequest, Task task, RepositorySystemSession session,
+                                         Dependencies dependencies, List<Exclusion> exclusions )
+    {
+        List<Exclusion> globalExclusions = exclusions;
+        if ( !dependencies.getExclusions().isEmpty() )
+        {
+            globalExclusions = new ArrayList<Exclusion>( exclusions );
+            globalExclusions.addAll( dependencies.getExclusions() );
+        }
+
+        Collection<String> ids = new HashSet<String>();
+
+        for ( DependencyContainer container : dependencies.getDependencyContainers() )
+        {
+            if ( container instanceof Dependency )
+            {
+                Dependency dep = (Dependency) container;
+                ids.add( dep.getVersionlessKey() );
+                collectRequest.addDependency( ConverterUtils.toDependency( dep, globalExclusions, session ) );
+            }
+            else
+            {
+                populateCollectRequest( collectRequest, task, session, (Dependencies) container, globalExclusions );
+            }
+        }
+
+        if ( dependencies.getPom() != null )
+        {
+            Model model = dependencies.getPom().getModel( task );
+            for ( org.apache.maven.model.Dependency dep : model.getDependencies() )
+            {
+                Dependency dependency = new Dependency();
+                dependency.setArtifactId( dep.getArtifactId() );
+                dependency.setClassifier( dep.getClassifier() );
+                dependency.setGroupId( dep.getGroupId() );
+                dependency.setScope( dep.getScope() );
+                dependency.setType( dep.getType() );
+                dependency.setVersion( dep.getVersion() );
+                if ( ids.contains( dependency.getVersionlessKey() ) )
+                {
+                    project.log( "Ignoring dependency " + dependency.getVersionlessKey() + " from " + model.getId()
+                        + ", already declared locally", Project.MSG_VERBOSE );
+                    continue;
+                }
+                if ( dep.getSystemPath() != null && dep.getSystemPath().length() > 0 )
+                {
+                    dependency.setSystemPath( task.getProject().resolveFile( dep.getSystemPath() ) );
+                }
+                for ( org.apache.maven.model.Exclusion exc : dep.getExclusions() )
+                {
+                    Exclusion exclusion = new Exclusion();
+                    exclusion.setGroupId( exc.getGroupId() );
+                    exclusion.setArtifactId( exc.getArtifactId() );
+                    exclusion.setClassifier( "*" );
+                    exclusion.setExtension( "*" );
+                    dependency.addExclusion( exclusion );
+                }
+                collectRequest.addDependency( ConverterUtils.toDependency( dependency, globalExclusions, session ) );
+            }
+        }
+
+        if ( dependencies.getFile() != null )
+        {
+            List<Dependency> deps = readDependencies( dependencies.getFile() );
+            for ( Dependency dependency : deps )
+            {
+                if ( ids.contains( dependency.getVersionlessKey() ) )
+                {
+                    project.log( "Ignoring dependency " + dependency.getVersionlessKey() + " from "
+                                     + dependencies.getFile() + ", already declared locally", Project.MSG_VERBOSE );
+                    continue;
+                }
+                collectRequest.addDependency( ConverterUtils.toDependency( dependency, globalExclusions, session ) );
+            }
+        }
+    }
+
+    private List<Dependency> readDependencies( File file )
+    {
+        List<Dependency> dependencies = new ArrayList<Dependency>();
+        try
+        {
+            BufferedReader reader = new BufferedReader( new InputStreamReader( new FileInputStream( file ), "UTF-8" ) );
+            try
+            {
+                for ( String line = reader.readLine(); line != null; line = reader.readLine() )
+                {
+                    int comment = line.indexOf( '#' );
+                    if ( comment >= 0 )
+                    {
+                        line = line.substring( 0, comment );
+                    }
+                    line = line.trim();
+                    if ( line.length() <= 0 )
+                    {
+                        continue;
+                    }
+                    Dependency dependency = new Dependency();
+                    dependency.setCoords( line );
+                    dependencies.add( dependency );
+                }
+            }
+            finally
+            {
+                reader.close();
+            }
+        }
+        catch ( IOException e )
+        {
+            throw new BuildException( "Cannot read " + file, e );
+        }
+        return dependencies;
+    }
+
+    public void install( Task task, Pom pom, Artifacts artifacts )
+    {
+        RepositorySystemSession session = getSession( task, null );
+
+        InstallRequest request = new InstallRequest();
+        request.setArtifacts( toArtifacts( task, session, pom, artifacts ) );
+
+        try
+        {
+            getSystem().install( session, request );
+        }
+        catch ( InstallationException e )
+        {
+            throw new BuildException( "Could not install artifacts: " + e.getMessage(), e );
+        }
+    }
+
+    public void deploy( Task task, Pom pom, Artifacts artifacts, RemoteRepository releaseRepository,
+                        RemoteRepository snapshotRepository )
+    {
+        RepositorySystemSession session = getSession( task, null );
+
+        DeployRequest request = new DeployRequest();
+        request.setArtifacts( toArtifacts( task, session, pom, artifacts ) );
+        boolean snapshot = request.getArtifacts().iterator().next().isSnapshot();
+        RemoteRepository distRepo = ( snapshot && snapshotRepository != null ) ? snapshotRepository : releaseRepository;
+        request.setRepository( ConverterUtils.toDistRepository( distRepo, session ) );
+
+        try
+        {
+            getSystem().deploy( session, request );
+        }
+        catch ( DeploymentException e )
+        {
+            throw new BuildException( "Could not deploy artifacts: " + e.getMessage(), e );
+        }
+    }
+
+    private List<org.eclipse.aether.artifact.Artifact> toArtifacts( Task task, RepositorySystemSession session,
+                                                                    Pom pom, Artifacts artifacts )
+    {
+        Model model = pom.getModel( task );
+        File pomFile = pom.getFile();
+
+        List<org.eclipse.aether.artifact.Artifact> results = new ArrayList<org.eclipse.aether.artifact.Artifact>();
+
+        org.eclipse.aether.artifact.Artifact pomArtifact =
+            new DefaultArtifact( model.getGroupId(), model.getArtifactId(), "pom", model.getVersion() ).setFile( pomFile );
+        results.add( pomArtifact );
+
+        for ( Artifact artifact : artifacts.getArtifacts() )
+        {
+            org.eclipse.aether.artifact.Artifact buildArtifact =
+                new DefaultArtifact( model.getGroupId(), model.getArtifactId(), artifact.getClassifier(),
+                                     artifact.getType(), model.getVersion() ).setFile( artifact.getFile() );
+            results.add( buildArtifact );
+        }
+
+        return results;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntRepositoryListener.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntRepositoryListener.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntRepositoryListener.java
new file mode 100644
index 0000000..f850357
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntRepositoryListener.java
@@ -0,0 +1,123 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import java.io.FileNotFoundException;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.eclipse.aether.AbstractRepositoryListener;
+import org.eclipse.aether.RepositoryEvent;
+import org.eclipse.aether.transfer.MetadataNotFoundException;
+
+/**
+ * Logs repository events like installed and unresolved artifacts and metadata.
+ */
+class AntRepositoryListener
+    extends AbstractRepositoryListener
+{
+
+    private Task task;
+
+    public AntRepositoryListener( Task task )
+    {
+        this.task = task;
+    }
+
+    @Override
+    public void artifactInstalling( RepositoryEvent event )
+    {
+        task.log( "Installing " + event.getArtifact().getFile() + " to " + event.getFile() );
+    }
+
+    @Override
+    public void metadataInstalling( RepositoryEvent event )
+    {
+        task.log( "Installing " + event.getMetadata() + " to " + event.getFile() );
+    }
+
+    @Override
+    public void metadataResolved( RepositoryEvent event )
+    {
+        Exception e = event.getException();
+        if ( e != null )
+        {
+            if ( e instanceof MetadataNotFoundException )
+            {
+                task.log( e.getMessage(), Project.MSG_DEBUG );
+            }
+            else
+            {
+                task.log( e.getMessage(), e, Project.MSG_WARN );
+            }
+        }
+    }
+
+    @Override
+    public void metadataInvalid( RepositoryEvent event )
+    {
+        Exception exception = event.getException();
+
+        StringBuilder buffer = new StringBuilder( 256 );
+        buffer.append( "The metadata " );
+        if ( event.getMetadata().getFile() != null )
+        {
+            buffer.append( event.getMetadata().getFile() );
+        }
+        else
+        {
+            buffer.append( event.getMetadata() );
+        }
+
+        if ( exception instanceof FileNotFoundException )
+        {
+            buffer.append( " is inaccessible" );
+        }
+        else
+        {
+            buffer.append( " is invalid" );
+        }
+
+        if ( exception != null )
+        {
+            buffer.append( ": " );
+            buffer.append( exception.getMessage() );
+        }
+
+        task.log( buffer.toString(), exception, Project.MSG_WARN );
+    }
+
+    @Override
+    public void artifactDescriptorInvalid( RepositoryEvent event )
+    {
+        task.log( "The POM for " + event.getArtifact() + " is invalid"
+                      + ", transitive dependencies (if any) will not be available: "
+                      + event.getException().getMessage(),
+                  event.getException(), Project.MSG_WARN );
+    };
+
+    @Override
+    public void artifactDescriptorMissing( RepositoryEvent event )
+    {
+        task.log( "The POM for " + event.getArtifact() + " is missing, no dependency information available",
+                  Project.MSG_WARN );
+    };
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntSecDispatcher.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntSecDispatcher.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntSecDispatcher.java
new file mode 100644
index 0000000..0852f86
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntSecDispatcher.java
@@ -0,0 +1,45 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import org.sonatype.plexus.components.cipher.DefaultPlexusCipher;
+import org.sonatype.plexus.components.cipher.PlexusCipherException;
+import org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher;
+
+/**
+ */
+class AntSecDispatcher
+    extends DefaultSecDispatcher
+{
+
+    public AntSecDispatcher()
+    {
+        _configurationFile = "~/.m2/settings-security.xml";
+        try
+        {
+            _cipher = new DefaultPlexusCipher();
+        }
+        catch ( PlexusCipherException e )
+        {
+            e.printStackTrace();
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntServiceLocatorErrorHandler.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntServiceLocatorErrorHandler.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntServiceLocatorErrorHandler.java
new file mode 100644
index 0000000..1621285
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntServiceLocatorErrorHandler.java
@@ -0,0 +1,50 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import org.apache.tools.ant.Project;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.impl.DefaultServiceLocator;
+
+/**
+ */
+class AntServiceLocatorErrorHandler
+    extends DefaultServiceLocator.ErrorHandler
+{
+
+    private Project project;
+
+    public AntServiceLocatorErrorHandler( Project project )
+    {
+        this.project = project;
+    }
+
+    public void serviceCreationFailed( Class<?> type, Class<?> impl, Throwable exception )
+    {
+        String msg = "Could not initialize repository system";
+        if ( !RepositorySystem.class.equals( type ) )
+        {
+            msg += ", service " + type.getName() + " (" + impl.getName() + ") failed to initialize";
+        }
+        msg += ": " + exception.getMessage();
+        project.log( msg, exception, Project.MSG_ERR );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
new file mode 100644
index 0000000..39ef960
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntSettingsDecryptorFactory.java
@@ -0,0 +1,51 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import java.lang.reflect.Field;
+
+import org.apache.maven.settings.crypto.DefaultSettingsDecrypter;
+
+/**
+ */
+class AntSettingsDecryptorFactory
+{
+
+    public DefaultSettingsDecrypter newInstance()
+    {
+        AntSecDispatcher secDispatcher = new AntSecDispatcher();
+
+        DefaultSettingsDecrypter decrypter = new DefaultSettingsDecrypter();
+
+        try
+        {
+            Field field = decrypter.getClass().getDeclaredField( "securityDispatcher" );
+            field.setAccessible( true );
+            field.set( decrypter, secDispatcher );
+        }
+        catch ( Exception e )
+        {
+            throw new IllegalStateException( e );
+        }
+
+        return decrypter;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntTransferListener.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntTransferListener.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntTransferListener.java
new file mode 100644
index 0000000..6844d22
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/AntTransferListener.java
@@ -0,0 +1,91 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.util.Locale;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.eclipse.aether.transfer.AbstractTransferListener;
+import org.eclipse.aether.transfer.TransferCancelledException;
+import org.eclipse.aether.transfer.TransferEvent;
+import org.eclipse.aether.transfer.TransferResource;
+
+/**
+ * Logs up- and downloads.
+ */
+class AntTransferListener
+    extends AbstractTransferListener
+{
+
+    private Task task;
+
+    public AntTransferListener( Task task )
+    {
+        this.task = task;
+    }
+
+    @Override
+    public void transferInitiated( TransferEvent event )
+        throws TransferCancelledException
+    {
+        String msg = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploading" : "Downloading";
+        msg += " " + event.getResource().getRepositoryUrl() + event.getResource().getResourceName();
+        task.log( msg );
+    }
+
+    @Override
+    public void transferCorrupted( TransferEvent event )
+        throws TransferCancelledException
+    {
+        TransferResource resource = event.getResource();
+
+        task.log( event.getException().getMessage() + " for " + resource.getRepositoryUrl()
+                      + resource.getResourceName(), Project.MSG_WARN );
+    }
+
+    @Override
+    public void transferSucceeded( TransferEvent event )
+    {
+        String msg = event.getRequestType() == TransferEvent.RequestType.PUT ? "Uploaded" : "Downloaded";
+        msg += " " + event.getResource().getRepositoryUrl() + event.getResource().getResourceName();
+
+        long contentLength = event.getTransferredBytes();
+        if ( contentLength >= 0 )
+        {
+            String len = contentLength >= 1024 ? ( ( contentLength + 1023 ) / 1024 ) + " KB" : contentLength + " B";
+
+            String throughput = "";
+            long duration = System.currentTimeMillis() - event.getResource().getTransferStartTime();
+            if ( duration > 0 )
+            {
+                DecimalFormat format = new DecimalFormat( "0.0", new DecimalFormatSymbols( Locale.ENGLISH ) );
+                double kbPerSec = ( contentLength / 1024.0 ) / ( duration / 1000.0 );
+                throughput = " at " + format.format( kbPerSec ) + " KB/sec";
+            }
+
+            msg += " (" + len + throughput + ")";
+        }
+        task.log( msg );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/maven-resolver/blob/a088cdfc/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
----------------------------------------------------------------------
diff --git a/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
new file mode 100644
index 0000000..6452ec1
--- /dev/null
+++ b/maven-resolver-ant-tasks/src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java
@@ -0,0 +1,227 @@
+package org.apache.maven.resolver.internal.ant;
+
+/*
+ * 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.
+ */
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.maven.resolver.internal.ant.types.Authentication;
+import org.apache.maven.resolver.internal.ant.types.Dependency;
+import org.apache.maven.resolver.internal.ant.types.Exclusion;
+import org.apache.maven.resolver.internal.ant.types.Proxy;
+import org.apache.maven.resolver.internal.ant.types.RemoteRepositories;
+import org.apache.maven.resolver.internal.ant.types.RemoteRepository;
+import org.apache.tools.ant.Project;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.ArtifactProperties;
+import org.eclipse.aether.artifact.ArtifactType;
+import org.eclipse.aether.artifact.ArtifactTypeRegistry;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.eclipse.aether.artifact.DefaultArtifactType;
+import org.eclipse.aether.impl.RemoteRepositoryManager;
+import org.eclipse.aether.repository.RepositoryPolicy;
+import org.eclipse.aether.util.repository.AuthenticationBuilder;
+
+/**
+ * Utility methods to convert between Aether and Ant objects.
+ */
+class ConverterUtils
+{
+
+    private static org.eclipse.aether.artifact.Artifact toArtifact( Dependency dependency, ArtifactTypeRegistry types )
+    {
+        ArtifactType type = types.get( dependency.getType() );
+        if ( type == null )
+        {
+            type = new DefaultArtifactType( dependency.getType() );
+        }
+
+        Map<String, String> props = null;
+        if ( "system".equals( dependency.getScope() ) && dependency.getSystemPath() != null )
+        {
+            props = Collections.singletonMap( ArtifactProperties.LOCAL_PATH, dependency.getSystemPath().getPath() );
+