001/**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.xbean.classpath.maven;
018
019import java.net.URL;
020
021/**
022 * Transitively resolves dependencies using Maven.
023 *
024 * @author Dain Sundstrom
025 * @version $Id$
026 * @since 1.0
027 */
028public class MavenResolver {
029//    private final ArtifactFactory artifactFactory;
030//    private final Set artifacts = new HashSet();
031
032    /**
033     * Creates a new resolver.
034     */
035    public MavenResolver() {
036//        artifactFactory = new DefaultArtifactFactory();
037    }
038
039    /**
040     * Add an artifact to resolve.
041     * @param groupId the id of the group to which the dependency belongs
042     * @param artifactId the id of the artifact to resolve
043     * @param version the version of the artifact
044     */
045    public void addArtifact(String groupId, String artifactId, String version) {
046        addArtifact(groupId, artifactId, version, "jar");
047    }
048
049    /**
050     * Add an artifact to resolve.
051     * @param groupId the id of the group to which the dependency belongs
052     * @param artifactId the id of the artifact to resolve
053     * @param version the version of the artifact
054     * @param type the type of the artifact
055     */
056    public void addArtifact(String groupId, String artifactId, String version, String type) {
057//        Artifact artifact = artifactFactory.createArtifact( groupId, artifactId, version, "runtime", type );
058//        artifacts.add(artifact);
059    }
060
061    /**
062     * Downloads all of the artificts, all of the artificts they depend on and so on.
063     * @return the URLs to all artifacts
064     */
065    public URL[] resolve() {
066        return null;
067    }
068}