1 package org.apache.maven.shared.transfer.dependencies;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 /**
23 * <p>
24 * Represents any instance which may contain Maven Dependencies, both explicit or implicit to (transitively) resolve
25 * and calculate its path for either a local or remote Maven repository.
26 * </p>
27 * <p>
28 * The version can be a version range. Based on the groupId and artifactId it will be resolved to the actual version.
29 * </p>
30 * <p>
31 * The type will be translated to an extension based on the artifact descriptor ({@code pom.xml} matching the groupId,
32 * artifactId and version.
33 * </p>
34 * A MavenProject is not considered a DependableCoordinate because it should never have a versionRange, and it has
35 * packaging instead of type.
36 *
37 * @author Robert Scholte
38 */
39 public interface DependableCoordinate
40 {
41 /**
42 * @return the groupId of the coordinate
43 */
44 String getGroupId();
45
46 /**
47 *
48 * @return the artifact of the coordinate
49 */
50 String getArtifactId();
51
52 /**
53 * A version or versionRange
54 *
55 * @return the version
56 */
57 String getVersion();
58
59 /**
60 *
61 * @return the type of the coordinate
62 */
63 String getType();
64
65 /**
66 *
67 * @return the classifier or {@code null}
68 */
69 String getClassifier();
70 }