-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renaming of
ArtifactCoordinate.getVersion()
+ documentation (#1662)
* Rename ArtifactCoordinate.getVersion() as getVersionConstraint(). * Introduce DownloadedArtifact, DownloadedDependency and ProducedArtifact. * Rename coordinate -> coordinates. * Add documentation on Artifact, ArtifactCoordinates, Dependency and DependencyCoordinates and other classes. * Remove `LATEST` and `SNAPSHOT` from documentation since they are deprecated. * Opportunistic addition of some missing `@Override` annotations. --------- Co-authored-by: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
- Loading branch information
1 parent
6a5580f
commit 30dc812
Showing
74 changed files
with
1,331 additions
and
563 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
api/maven-api-core/src/main/java/org/apache/maven/api/DependencyCoordinates.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.maven.api; | ||
|
||
import java.util.Collection; | ||
|
||
import org.apache.maven.api.annotations.Experimental; | ||
import org.apache.maven.api.annotations.Immutable; | ||
import org.apache.maven.api.annotations.Nonnull; | ||
import org.apache.maven.api.annotations.Nullable; | ||
|
||
/** | ||
* {@code ArtifactCoordinates} completed with information about how the artifact will be used. | ||
* This information include the dependency type (main classes, test classes, <i>etc.</i>), | ||
* a scope (compile-time, run-time <i>etc.</i>), an obligation (whether the dependency | ||
* is optional or mandatory), and possible exclusions for transitive dependencies. | ||
* The {@linkplain #getVersionConstraint() version} and the {@linkplain #getOptional() obligation} | ||
* may not be defined precisely. | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
@Experimental | ||
@Immutable | ||
public interface DependencyCoordinates extends ArtifactCoordinates { | ||
/** | ||
* {@return the type of the dependency}. A dependency can be a <abbr>JAR</abbr> file, | ||
* a modular-<abbr>JAR</abbr> if it is intended to be placed on the module-path, | ||
* a <abbr>JAR</abbr> containing test classes, <i>etc.</i> | ||
*/ | ||
@Nonnull | ||
Type getType(); | ||
|
||
/** | ||
* {@return the time at which the dependency will be used}. | ||
* If may be, for example, at compile time only, at run time or at test time. | ||
*/ | ||
@Nonnull | ||
DependencyScope getScope(); | ||
|
||
/** | ||
* Returns whether the dependency is optional, mandatory or of unspecified obligation. | ||
* | ||
* @return the obligation, or {@code null} if unspecified | ||
*/ | ||
@Nullable | ||
Boolean getOptional(); | ||
|
||
/** | ||
* {@return transitive dependencies to exclude}. | ||
*/ | ||
@Nonnull | ||
Collection<Exclusion> getExclusions(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.