This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/master by this push:
new c2cf6c36fe [API] Add noun-style accessors to @Immutable API interfaces
(deprecate getXxx()) (#14068)
c2cf6c36fe is described below
commit c2cf6c36fe6150a46c7f3b6241e356a46b8ed3e0
Author: Guillaume Nodet <[email protected]>
AuthorDate: Mon Nov 23 10:22:15 2026 +0100
[API] Add noun-style accessors to @Immutable API interfaces (deprecate
getXxx()) (#14068)
Extend the noun-style accessor pattern (established in Repository.java
since 4.1.0) to remaining hand-written @Immutable API interfaces in
maven-api-core and maven-api-cli.
For each old getXxx()/isXxx() method:
- Add a new abstract noun-style method (xxx())
- Convert the old method to a @Deprecated default delegating to it
Interfaces updated: Request, Result, BuilderProblem, Artifact (snapshot),
Dependency (optional), Type, Packaging, RepositoryAwareRequest,
SettingsBuilderRequest, ProjectBuilderRequest, ModelBuilderRequest,
ArtifactCoordinatesFactoryRequest, ArtifactFactoryRequest,
ArtifactDeployerRequest, ArtifactInstallerRequest, ArtifactResolverRequest,
DependencyCoordinatesFactoryRequest, DependencyResolverRequest,
XmlReaderRequest, and CIInfo.
All in-tree implementations updated to override the new noun-style methods.
Deprecated defaults ensure binary compatibility for external consumers.
---------
Co-authored-by: Guillaume Nodet <[email protected]>
---
.../org/apache/maven/api/cli/InvokerRequest.java | 2 +-
.../org/apache/maven/api/cli/cisupport/CIInfo.java | 10 +-
.../main/java/org/apache/maven/api/Artifact.java | 14 +-
.../org/apache/maven/api/ArtifactCoordinates.java | 10 +-
.../main/java/org/apache/maven/api/Dependency.java | 17 ++-
.../apache/maven/api/DependencyCoordinates.java | 8 +-
.../org/apache/maven/api/DownloadedArtifact.java | 2 +-
.../src/main/java/org/apache/maven/api/Event.java | 10 +-
.../main/java/org/apache/maven/api/Exclusion.java | 4 +-
.../java/org/apache/maven/api/LocalRepository.java | 2 +-
.../java/org/apache/maven/api/MojoExecution.java | 14 +-
.../src/main/java/org/apache/maven/api/Node.java | 10 +-
.../main/java/org/apache/maven/api/Packaging.java | 2 +-
.../main/java/org/apache/maven/api/Project.java | 42 ++---
.../org/apache/maven/api/RemoteRepository.java | 4 +-
.../main/java/org/apache/maven/api/Repository.java | 4 +-
.../src/main/java/org/apache/maven/api/Type.java | 66 ++++++--
.../org/apache/maven/api/VersionConstraint.java | 4 +-
.../java/org/apache/maven/api/VersionRange.java | 6 +-
.../api/services/ArtifactCoordinatesFactory.java | 16 +-
.../ArtifactCoordinatesFactoryRequest.java | 86 ++++++++---
.../api/services/ArtifactDeployerRequest.java | 46 ++++--
.../apache/maven/api/services/ArtifactFactory.java | 24 +--
.../maven/api/services/ArtifactFactoryRequest.java | 74 ++++++---
.../api/services/ArtifactInstallerRequest.java | 17 ++-
.../api/services/ArtifactResolverRequest.java | 19 ++-
.../org/apache/maven/api/services/BaseRequest.java | 4 +-
.../apache/maven/api/services/BuilderProblem.java | 88 +++++++++--
.../api/services/DependencyCoordinatesFactory.java | 16 +-
.../DependencyCoordinatesFactoryRequest.java | 55 ++++---
.../api/services/DependencyResolverRequest.java | 151 ++++++++++++++----
.../maven/api/services/ModelBuilderRequest.java | 170 ++++++++++++++++-----
.../maven/api/services/ProjectBuilderRequest.java | 79 +++++-----
.../maven/api/services/RepositoryAwareRequest.java | 22 +--
.../org/apache/maven/api/services/Request.java | 28 +++-
.../java/org/apache/maven/api/services/Result.java | 14 +-
.../maven/api/services/SettingsBuilderRequest.java | 55 ++++---
.../api/services/VersionRangeResolverRequest.java | 2 +-
.../maven/api/services/VersionResolverRequest.java | 2 +-
.../maven/api/services/xml/XmlReaderRequest.java | 126 ++++++++++++---
.../maven/api/services/model/ModelProcessor.java | 2 +-
.../repository/internal/type/DefaultType.java | 14 +-
.../cling/invoker/cisupport/GithubCIDetector.java | 2 +-
.../cling/invoker/cisupport/TravisCIDetector.java | 2 +-
.../invoker/cisupport/CIDetectorHelperRunner.java | 2 +-
.../maven/internal/impl/DefaultPluginManager.java | 21 +--
.../maven/internal/impl/DefaultProjectBuilder.java | 28 ++--
.../maven/project/DefaultProjectBuilderTest.java | 2 +-
.../apache/maven/impl/DefaultBuilderProblem.java | 14 +-
.../org/apache/maven/impl/DefaultDependency.java | 2 +-
.../impl/DefaultDependencyResolverResult.java | 2 +-
.../apache/maven/impl/DefaultSettingsBuilder.java | 2 +-
.../maven/impl/DefaultToolchainsBuilder.java | 2 +-
.../maven/impl/DefaultTransportProvider.java | 4 +-
.../maven/impl/DefaultVersionRangeResolver.java | 2 +-
.../apache/maven/impl/DefaultVersionResolver.java | 2 +-
.../maven/impl/model/DefaultModelBuilder.java | 8 +-
.../impl/model/DefaultModelBuilderResult.java | 2 +-
.../maven/impl/model/DefaultModelProblem.java | 14 +-
.../maven/impl/resolver/type/DefaultType.java | 14 +-
.../maven/impl/cache/AbstractRequestCacheTest.java | 12 +-
.../maven/impl/cache/CacheConfigurationTest.java | 28 ++--
.../maven/testing/plugin/stubs/ProjectStub.java | 10 +-
63 files changed, 1060 insertions(+), 456 deletions(-)
diff --git
a/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/InvokerRequest.java
b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/InvokerRequest.java
index e63a515bb9..24872cc464 100644
---
a/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/InvokerRequest.java
+++
b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/InvokerRequest.java
@@ -206,6 +206,6 @@ default Optional<OutputStream> stdErr() {
*/
default boolean effectiveVerbose() {
return options().isPresent() &&
options().orElseThrow().verbose().orElse(false)
- || ciInfo().isPresent() && ciInfo().orElseThrow().isVerbose();
+ || ciInfo().isPresent() && ciInfo().orElseThrow().verbose();
}
}
diff --git
a/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/cisupport/CIInfo.java
b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/cisupport/CIInfo.java
index ced54f8373..57303bed00 100644
---
a/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/cisupport/CIInfo.java
+++
b/api/maven-api-cli/src/main/java/org/apache/maven/api/cli/cisupport/CIInfo.java
@@ -43,7 +43,15 @@ default String message() {
/**
* Some CI systems may allow running jobs in "debug" (or some equivalent)
mode.
*/
- default boolean isVerbose() {
+ default boolean verbose() {
return false;
}
+
+ /**
+ * @deprecated Use {@link #verbose()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default boolean isVerbose() {
+ return verbose();
+ }
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/Artifact.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/Artifact.java
index 603761f326..4c864495a5 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/Artifact.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Artifact.java
@@ -64,7 +64,7 @@ default String key() {
* @see ArtifactCoordinates#getGroupId()
* @deprecated Use {@link #groupId()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default String getGroupId() {
return groupId();
@@ -84,7 +84,7 @@ default String getGroupId() {
* @see ArtifactCoordinates#getArtifactId()
* @deprecated Use {@link #artifactId()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default String getArtifactId() {
return artifactId();
@@ -112,7 +112,7 @@ default String getArtifactId() {
* @see ArtifactCoordinates#getVersionConstraint()
* @deprecated Use {@link #version()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Version getVersion() {
return version();
@@ -135,7 +135,7 @@ default Version getVersion() {
*
* @deprecated Use {@link #baseVersion()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Version getBaseVersion() {
return baseVersion();
@@ -157,7 +157,7 @@ default Version getBaseVersion() {
* @see ArtifactCoordinates#getClassifier()
* @deprecated Use {@link #classifier()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default String getClassifier() {
return classifier();
@@ -181,7 +181,7 @@ default String getClassifier() {
* @see ArtifactCoordinates#getExtension()
* @deprecated Use {@link #extension()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default String getExtension() {
return extension();
@@ -203,7 +203,7 @@ default String getExtension() {
* @see org.apache.maven.api.Session#isVersionSnapshot(String)
* @deprecated Use {@link #snapshot()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default boolean isSnapshot() {
return snapshot();
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/ArtifactCoordinates.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/ArtifactCoordinates.java
index 51b00fc0b8..0e0da5e28a 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/ArtifactCoordinates.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/ArtifactCoordinates.java
@@ -43,7 +43,7 @@ public interface ArtifactCoordinates {
*
* @deprecated Use {@link #groupId()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default String getGroupId() {
return groupId();
@@ -60,7 +60,7 @@ default String getGroupId() {
*
* @deprecated Use {@link #artifactId()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default String getArtifactId() {
return artifactId();
@@ -80,7 +80,7 @@ default String getArtifactId() {
* @return the classifier or an empty string if none, never {@code null}
* @deprecated Use {@link #classifier()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default String getClassifier() {
return classifier();
@@ -99,7 +99,7 @@ default String getClassifier() {
*
* @deprecated Use {@link #versionConstraint()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default VersionConstraint getVersionConstraint() {
return versionConstraint();
@@ -121,7 +121,7 @@ default VersionConstraint getVersionConstraint() {
* @return the file extension or an empty string if none, never {@code
null}
* @deprecated Use {@link #extension()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default String getExtension() {
return extension();
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java
index 90eed3a9e9..dade57b2f8 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Dependency.java
@@ -58,7 +58,7 @@ public interface Dependency extends Artifact {
* @see DependencyCoordinates#getType()
* @deprecated Use {@link #type()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Type getType() {
return type();
@@ -80,7 +80,7 @@ default Type getType() {
* @see DependencyCoordinates#getScope()
* @deprecated Use {@link #scope()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default DependencyScope getScope() {
return scope();
@@ -94,7 +94,18 @@ default DependencyScope getScope() {
* @return {@code true} if the dependency is optional, or {@code false} if
mandatory
* @see DependencyCoordinates#optional()
*/
- boolean isOptional();
+ boolean optional();
+
+ /**
+ * Returns whether the dependency is optional or mandatory.
+ *
+ * @return {@code true} if the dependency is optional, or {@code false} if
mandatory
+ * @deprecated Use {@link #optional()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default boolean isOptional() {
+ return optional();
+ }
/**
* Returns the transitive dependencies excluded by this dependency.
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/DependencyCoordinates.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/DependencyCoordinates.java
index 0602d2ada8..3e4a81436f 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/DependencyCoordinates.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/DependencyCoordinates.java
@@ -55,7 +55,7 @@ public interface DependencyCoordinates extends
ArtifactCoordinates {
*
* @deprecated Use {@link #type()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Type getType() {
return type();
@@ -74,7 +74,7 @@ default Type getType() {
*
* @deprecated Use {@link #scope()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default DependencyScope getScope() {
return scope();
@@ -94,7 +94,7 @@ default DependencyScope getScope() {
* @return {@code Boolean.TRUE} and {@code Boolean.FALSE} if optional, or
{@code null} if unspecified
* @deprecated Use {@link #optional()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nullable
default Boolean getOptional() {
return optional();
@@ -111,7 +111,7 @@ default Boolean getOptional() {
*
* @deprecated Use {@link #exclusions()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Collection<Exclusion> getExclusions() {
return exclusions();
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/DownloadedArtifact.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/DownloadedArtifact.java
index bd25760a0d..8edcf357d4 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/DownloadedArtifact.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/DownloadedArtifact.java
@@ -42,7 +42,7 @@ public interface DownloadedArtifact extends Artifact {
*
* @deprecated Use {@link #path()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default Path getPath() {
return path();
}
diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Event.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/Event.java
index f86f00638e..82c2b9bb74 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/Event.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Event.java
@@ -52,7 +52,7 @@ public interface Event {
* @return the current session, never {@code null}
* @deprecated Use {@link #session()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Session getSession() {
return session();
@@ -65,7 +65,7 @@ default Session getSession() {
* @throws UnsupportedOperationException if this event is not an {@link
ExecutionEvent}
* @deprecated Use {@link ExecutionEvent#type()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default EventType getType() {
if (this instanceof ExecutionEvent ee) {
@@ -80,7 +80,7 @@ default EventType getType() {
* @return the current project or {@code empty()} if not applicable
* @deprecated Use {@link ExecutionEvent#project()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Optional<Project> getProject() {
if (this instanceof ExecutionEvent ee) {
@@ -95,7 +95,7 @@ default Optional<Project> getProject() {
* @return the current mojo execution or {@code empty()} if not applicable
* @deprecated Use {@link ExecutionEvent#mojoExecution()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Optional<MojoExecution> getMojoExecution() {
if (this instanceof ExecutionEvent ee) {
@@ -110,7 +110,7 @@ default Optional<MojoExecution> getMojoExecution() {
* @return the exception or {@code empty()} if none
* @deprecated Use {@link ExecutionEvent#exception()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default Optional<Exception> getException() {
if (this instanceof ExecutionEvent ee) {
return ee.exception();
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/Exclusion.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/Exclusion.java
index f2b41f0175..a5dfd05607 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/Exclusion.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Exclusion.java
@@ -38,7 +38,7 @@ public interface Exclusion {
/**
* @deprecated Use {@link #groupId()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nullable
default String getGroupId() {
return groupId();
@@ -53,7 +53,7 @@ default String getGroupId() {
/**
* @deprecated Use {@link #artifactId()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nullable
default String getArtifactId() {
return artifactId();
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/LocalRepository.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/LocalRepository.java
index 2b3fc29f75..da43addfb8 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/LocalRepository.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/LocalRepository.java
@@ -60,7 +60,7 @@ public interface LocalRepository extends Repository {
* @return the path, never {@code null}
* @deprecated Use {@link #path()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Path getPath() {
return path();
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/MojoExecution.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/MojoExecution.java
index 74883dc8f1..0f9fcee38e 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/MojoExecution.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/MojoExecution.java
@@ -52,7 +52,7 @@ public interface MojoExecution {
*
* @deprecated Use {@link #plugin()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Plugin getPlugin() {
return plugin();
@@ -77,7 +77,7 @@ default Plugin getPlugin() {
*
* @deprecated Use {@link #model()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nullable
default PluginExecution getModel() {
return model().orElse(null);
@@ -92,7 +92,7 @@ default PluginExecution getModel() {
*
* @deprecated Use {@link #descriptor()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default MojoDescriptor getDescriptor() {
return descriptor();
@@ -110,7 +110,7 @@ default MojoDescriptor getDescriptor() {
*
* @deprecated Use {@link #executionId()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nullable
default String getExecutionId() {
return executionId().orElse(null);
@@ -125,7 +125,7 @@ default String getExecutionId() {
*
* @deprecated Use {@link #goal()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default String getGoal() {
return goal();
@@ -140,7 +140,7 @@ default String getGoal() {
*
* @deprecated Use {@link #lifecyclePhase()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nullable
default String getLifecyclePhase() {
return lifecyclePhase().orElse(null);
@@ -155,7 +155,7 @@ default String getLifecyclePhase() {
*
* @deprecated Use {@link #configuration()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Optional<XmlNode> getConfiguration() {
return configuration();
diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Node.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/Node.java
index edda07ae55..1b5bb16dc6 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/Node.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Node.java
@@ -130,7 +130,7 @@ public interface Node {
* @deprecated Use {@link #artifact()} instead.
*/
@Nullable
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default Artifact getArtifact() {
return artifact();
}
@@ -140,7 +140,7 @@ default Artifact getArtifact() {
* @deprecated Use {@link #dependency()} instead.
*/
@Nullable
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default Dependency getDependency() {
return dependency();
}
@@ -152,7 +152,7 @@ default Dependency getDependency() {
* @deprecated Use {@link #children()} instead.
*/
@Nonnull
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default List<Node> getChildren() {
return children();
}
@@ -162,7 +162,7 @@ default List<Node> getChildren() {
* @deprecated Use {@link #remoteRepositories()} instead.
*/
@Nonnull
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default List<RemoteRepository> getRemoteRepositories() {
return remoteRepositories();
}
@@ -173,7 +173,7 @@ default List<RemoteRepository> getRemoteRepositories() {
* @deprecated Use {@link #repository()} instead.
*/
@Nonnull
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default Optional<RemoteRepository> getRepository() {
return repository();
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/Packaging.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/Packaging.java
index 02aea114a9..12e6d24014 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/Packaging.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Packaging.java
@@ -74,7 +74,7 @@ public interface Packaging extends ExtensibleEnum {
*/
@Nonnull
default Language language() {
- return type().getLanguage();
+ return type().language();
}
/**
diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Project.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/Project.java
index 5cf46cf122..b1360349b7 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/Project.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Project.java
@@ -61,7 +61,7 @@ public interface Project {
*
* @deprecated Use {@link #groupId()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default String getGroupId() {
return groupId();
@@ -78,7 +78,7 @@ default String getGroupId() {
*
* @deprecated Use {@link #artifactId()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default String getArtifactId() {
return artifactId();
@@ -95,7 +95,7 @@ default String getArtifactId() {
*
* @deprecated Use {@link #version()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default String getVersion() {
return version();
@@ -123,7 +123,7 @@ default String getVersion() {
* @see #getArtifacts()
* @deprecated Use {@link #packaging()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Packaging getPackaging() {
return packaging();
@@ -145,7 +145,7 @@ default Language language() {
* @see #getPackaging()
* @deprecated Use {@link #language()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Language getLanguage() {
return language();
@@ -169,7 +169,7 @@ default ProducedArtifact pomArtifact() {
* @see org.apache.maven.api.services.ArtifactManager#getPath(Artifact)
* @deprecated Use {@link #pomArtifact()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default ProducedArtifact getPomArtifact() {
return pomArtifact();
@@ -196,7 +196,7 @@ default Optional<ProducedArtifact> mainArtifact() {
* @see org.apache.maven.api.services.ArtifactManager#getPath(Artifact)
* @deprecated Use {@link #mainArtifact()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Optional<ProducedArtifact> getMainArtifact() {
return mainArtifact();
@@ -245,7 +245,7 @@ default boolean producesMainArtifact() {
* @see org.apache.maven.api.services.ArtifactManager#getPath(Artifact)
* @deprecated Use {@link #artifacts()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default List<ProducedArtifact> getArtifacts() {
return artifacts();
@@ -262,7 +262,7 @@ default List<ProducedArtifact> getArtifacts() {
*
* @deprecated Use {@link #model()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Model getModel() {
return model();
@@ -285,7 +285,7 @@ default Build build() {
* @return the build element of the project model
* @deprecated Use {@link #build()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Build getBuild() {
return build();
@@ -321,7 +321,7 @@ default Build getBuild() {
* @see #getBasedir()
* @deprecated Use {@link #pomPath()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Path getPomPath() {
return pomPath();
@@ -345,7 +345,7 @@ default Path getPomPath() {
* @return the path of the directory containing the project
* @deprecated Use {@link #basedir()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Path getBasedir() {
return basedir();
@@ -477,7 +477,7 @@ default Path outputDirectory(@Nullable ProjectScope scope) {
* @return the absolute path to the output directory for the given scope
* @deprecated Use {@link #outputDirectory(ProjectScope)} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Path getOutputDirectory(@Nullable ProjectScope scope) {
return outputDirectory(scope);
@@ -494,7 +494,7 @@ default Path getOutputDirectory(@Nullable ProjectScope
scope) {
*
* @deprecated Use {@link #dependencies()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default List<DependencyCoordinates> getDependencies() {
return dependencies();
@@ -511,7 +511,7 @@ default List<DependencyCoordinates> getDependencies() {
*
* @deprecated Use {@link #managedDependencies()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default List<DependencyCoordinates> getManagedDependencies() {
return managedDependencies();
@@ -568,7 +568,7 @@ default String getId() {
* @see Session#getRootDirectory()
* @deprecated Use {@link #rootDirectory()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Path getRootDirectory() {
return rootDirectory();
@@ -598,7 +598,7 @@ default Path getRootDirectory() {
* @see Model#getParent()
* @deprecated Use {@link #parent()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default Optional<Project> getParent() {
return parent();
@@ -628,7 +628,7 @@ default Optional<Project> getParent() {
* @see #getEffectiveProfiles()
* @deprecated Use {@link #declaredProfiles()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default List<Profile> getDeclaredProfiles() {
return declaredProfiles();
@@ -660,7 +660,7 @@ default List<Profile> getDeclaredProfiles() {
* @see #getDeclaredProfiles()
* @deprecated Use {@link #effectiveProfiles()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default List<Profile> getEffectiveProfiles() {
return effectiveProfiles();
@@ -706,7 +706,7 @@ default List<Profile> getEffectiveProfiles() {
* @see #getEffectiveActiveProfiles()
* @deprecated Use {@link #declaredActiveProfiles()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default List<Profile> getDeclaredActiveProfiles() {
return declaredActiveProfiles();
@@ -744,7 +744,7 @@ default List<Profile> getDeclaredActiveProfiles() {
* @see #getDeclaredActiveProfiles()
* @deprecated Use {@link #effectiveActiveProfiles()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
default List<Profile> getEffectiveActiveProfiles() {
return effectiveActiveProfiles();
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/RemoteRepository.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/RemoteRepository.java
index 7750fa924d..46e3360ed3 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/RemoteRepository.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/RemoteRepository.java
@@ -79,7 +79,7 @@ public interface RemoteRepository extends Repository {
* @deprecated Use {@link #url()} instead.
*/
@Nonnull
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default String getUrl() {
return url();
}
@@ -91,7 +91,7 @@ default String getUrl() {
* @deprecated Use {@link #protocol()} instead.
*/
@Nonnull
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default String getProtocol() {
return protocol();
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/Repository.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/Repository.java
index 9d35cc33bf..48520ba36d 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/Repository.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Repository.java
@@ -81,7 +81,7 @@ public interface Repository {
* @deprecated Use {@link #id()} instead.
*/
@Nonnull
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default String getId() {
return id();
}
@@ -93,7 +93,7 @@ default String getId() {
* @deprecated Use {@link #type()} instead.
*/
@Nonnull
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default String getType() {
return type();
}
diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Type.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/Type.java
index 98861483ff..7acf4d1fcf 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/Type.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Type.java
@@ -24,7 +24,6 @@
import org.apache.maven.api.annotations.Immutable;
import org.apache.maven.api.annotations.Nonnull;
import org.apache.maven.api.annotations.Nullable;
-import org.apache.maven.api.model.Dependency;
/**
* A dependency's {@code Type} is uniquely identified by a {@code String},
@@ -143,7 +142,17 @@ public interface Type extends ExtensibleEnum {
* @return the language of this type, never {@code null}.
*/
@Nonnull
- Language getLanguage();
+ Language language();
+
+ /**
+ * @return the language of this type, never {@code null}.
+ * @deprecated Use {@link #language()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Language getLanguage() {
+ return language();
+ }
/**
* Get the file extension of artifacts of this type.
@@ -151,26 +160,53 @@ public interface Type extends ExtensibleEnum {
* @return the file extension, never {@code null}.
*/
@Nonnull
- String getExtension();
+ String extension();
+
+ /**
+ * @return the file extension, never {@code null}.
+ * @deprecated Use {@link #extension()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default String getExtension() {
+ return extension();
+ }
/**
* Get the default classifier associated to the dependency type.
* The default classifier can be overridden when specifying
- * the {@link Dependency#getClassifier()}.
+ * the {@link Dependency#classifier()}.
*
* @return the default classifier, or {@code null}.
*/
@Nullable
- String getClassifier();
+ String classifier();
+
+ /**
+ * @return the default classifier, or {@code null}.
+ * @deprecated Use {@link #classifier()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default String getClassifier() {
+ return classifier();
+ }
/**
* Specifies if the artifact already embeds its own dependencies.
- * This is the case for JEE packages or similar artifacts such as
- * WARs, EARs, etc.
*
* @return if the artifact's dependencies are included in the artifact
*/
- boolean isIncludesDependencies();
+ boolean includesDependencies();
+
+ /**
+ * @return if the artifact's dependencies are included in the artifact
+ * @deprecated Use {@link #includesDependencies()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default boolean isIncludesDependencies() {
+ return includesDependencies();
+ }
/**
* Types of path (class-path, module-path, …) where the dependency can be
placed.
@@ -183,7 +219,19 @@ public interface Type extends ExtensibleEnum {
* and the user may have provided no instruction about which type to use.
In such
* case, the plugin may apply rules for choosing a path. See for example
* {@link JavaPathType#CLASSES} and {@link JavaPathType#MODULES}.</p>
+ *
+ * @return the path types, never {@code null}
+ */
+ @Nonnull
+ Set<PathType> pathTypes();
+
+ /**
+ * @return the path types
+ * @deprecated Use {@link #pathTypes()} instead.
*/
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
- Set<PathType> getPathTypes();
+ default Set<PathType> getPathTypes() {
+ return pathTypes();
+ }
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/VersionConstraint.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/VersionConstraint.java
index e051a1c051..5bef6d2c2e 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/VersionConstraint.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/VersionConstraint.java
@@ -52,7 +52,7 @@ public interface VersionConstraint {
*
* @deprecated Use {@link #versionRange()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nullable
default VersionRange getVersionRange() {
return versionRange();
@@ -73,7 +73,7 @@ default VersionRange getVersionRange() {
*
* @deprecated Use {@link #recommendedVersion()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nullable
default Version getRecommendedVersion() {
return recommendedVersion();
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/VersionRange.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/VersionRange.java
index 822ff573f4..eb8e7d48b2 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/VersionRange.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/VersionRange.java
@@ -55,7 +55,7 @@ public interface VersionRange {
*
* @deprecated Use {@link #upperBoundary()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nullable
default Boundary getUpperBoundary() {
return upperBoundary();
@@ -72,7 +72,7 @@ default Boundary getUpperBoundary() {
*
* @deprecated Use {@link #lowerBoundary()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nullable
default Boundary getLowerBoundary() {
return lowerBoundary();
@@ -99,7 +99,7 @@ interface Boundary {
*
* @deprecated Use {@link #version()} instead.
*/
- @Deprecated(since = "4.2.0", forRemoval = true)
+ @Deprecated(since = "4.0.0", forRemoval = true)
default Version getVersion() {
return version();
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactCoordinatesFactory.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactCoordinatesFactory.java
index 515c4f3ccf..52b2b4d68a 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactCoordinatesFactory.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactCoordinatesFactory.java
@@ -44,17 +44,17 @@ public interface ArtifactCoordinatesFactory extends Service
{
@Deprecated
@Nonnull
default ArtifactCoordinates create(@Nonnull
ArtifactCoordinatesFactoryRequest request) {
- if (request.getCoordinatesString() != null) {
- return create(request.getSession(),
request.getCoordinatesString());
+ if (request.coordinatesString() != null) {
+ return create(request.getSession(), request.coordinatesString());
}
return create(
request.getSession(),
- request.getGroupId(),
- request.getArtifactId(),
- request.getVersion(),
- request.getClassifier(),
- request.getExtension(),
- request.getType());
+ request.groupId(),
+ request.artifactId(),
+ request.version(),
+ request.classifier(),
+ request.extension(),
+ request.type());
}
/**
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactCoordinatesFactoryRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactCoordinatesFactoryRequest.java
index 9eb6ab1a2e..ac9b220c74 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactCoordinatesFactoryRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactCoordinatesFactoryRequest.java
@@ -42,26 +42,68 @@
@Immutable
public interface ArtifactCoordinatesFactoryRequest extends Request<Session> {
- /** @return the group identifier */
- String getGroupId();
+ /** Returns the group identifier. */
+ String groupId();
- /** @return the artifact identifier */
- String getArtifactId();
+ /** @deprecated Use {@link #groupId()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getGroupId() {
+ return groupId();
+ }
+
+ /** Returns the artifact identifier. */
+ String artifactId();
+
+ /** @deprecated Use {@link #artifactId()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getArtifactId() {
+ return artifactId();
+ }
+
+ /** Returns the version. */
+ String version();
+
+ /** @deprecated Use {@link #version()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getVersion() {
+ return version();
+ }
- /** @return the version */
- String getVersion();
+ /** Returns the classifier, may be {@code null}. */
+ String classifier();
- /** @return the classifier, may be {@code null} */
- String getClassifier();
+ /** @deprecated Use {@link #classifier()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getClassifier() {
+ return classifier();
+ }
+
+ /** Returns the file extension, may be {@code null}. */
+ String extension();
- /** @return the file extension, may be {@code null} */
- String getExtension();
+ /** @deprecated Use {@link #extension()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getExtension() {
+ return extension();
+ }
- /** @return the artifact type, may be {@code null} */
- String getType();
+ /** Returns the artifact type, may be {@code null}. */
+ String type();
- /** @return the coordinate string in the format {@code
groupId:artifactId[:extension[:classifier]]:version}, may be {@code null} */
- String getCoordinatesString();
+ /** @deprecated Use {@link #type()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getType() {
+ return type();
+ }
+
+ /** Returns the coordinate string in the format {@code
groupId:artifactId[:extension[:classifier]]:version}, may be {@code null}. */
+ String coordinatesString();
+
+ /** @deprecated Use {@link #coordinatesString()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getCoordinatesString() {
+ return coordinatesString();
+ }
/**
* Builds a request from individual coordinate components.
@@ -160,7 +202,7 @@ static ArtifactCoordinatesFactoryRequest build(@Nonnull
Session session, @Nonnul
.build();
}
- /** @return a new builder instance */
+ /** Returns a new builder instance. */
@Deprecated
static ArtifactCoordinatesFactoryRequestBuilder builder() {
return new ArtifactCoordinatesFactoryRequestBuilder();
@@ -263,37 +305,37 @@ private static class
DefaultArtifactCoordinatesFactoryRequest extends BaseReques
}
@Override
- public String getGroupId() {
+ public String groupId() {
return groupId;
}
@Override
- public String getArtifactId() {
+ public String artifactId() {
return artifactId;
}
@Override
- public String getVersion() {
+ public String version() {
return version;
}
@Override
- public String getClassifier() {
+ public String classifier() {
return classifier;
}
@Override
- public String getExtension() {
+ public String extension() {
return extension;
}
@Override
- public String getType() {
+ public String type() {
return type;
}
@Override
- public String getCoordinatesString() {
+ public String coordinatesString() {
return coordinatesString;
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployerRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployerRequest.java
index dacb2cf765..1c46bdc068 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployerRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployerRequest.java
@@ -41,18 +41,44 @@
@Immutable
public interface ArtifactDeployerRequest extends Request<Session> {
- /** @return the remote repository to deploy to, never {@code null} */
+ /** Returns the remote repository to deploy to, never {@code null}. */
@Nonnull
- RemoteRepository getRepository();
+ RemoteRepository repository();
- /** @return the artifacts to deploy, never {@code null} */
+ /**
+ * @deprecated Use {@link #repository()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default RemoteRepository getRepository() {
+ return repository();
+ }
+
+ /** Returns the artifacts to deploy, never {@code null}. */
+ @Nonnull
+ Collection<ProducedArtifact> artifacts();
+
+ /**
+ * @deprecated Use {@link #artifacts()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
- Collection<ProducedArtifact> getArtifacts();
+ default Collection<ProducedArtifact> getArtifacts() {
+ return artifacts();
+ }
+
+ /** Returns the number of times to retry a failed deployment. */
+ int retryFailedDeploymentCount();
- /** @return the number of times to retry a failed deployment */
- int getRetryFailedDeploymentCount();
+ /**
+ * @deprecated Use {@link #retryFailedDeploymentCount()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default int getRetryFailedDeploymentCount() {
+ return retryFailedDeploymentCount();
+ }
- /** @return a new builder instance */
+ /** Returns a new builder instance. */
@Nonnull
static ArtifactDeployerRequestBuilder builder() {
return new ArtifactDeployerRequestBuilder();
@@ -142,18 +168,18 @@ private static class DefaultArtifactDeployerRequest
extends BaseRequest<Session>
@Nonnull
@Override
- public RemoteRepository getRepository() {
+ public RemoteRepository repository() {
return repository;
}
@Nonnull
@Override
- public Collection<ProducedArtifact> getArtifacts() {
+ public Collection<ProducedArtifact> artifacts() {
return artifacts;
}
@Override
- public int getRetryFailedDeploymentCount() {
+ public int retryFailedDeploymentCount() {
return retryFailedDeploymentCount;
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactFactory.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactFactory.java
index ec4b0486fa..c11046c994 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactFactory.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactFactory.java
@@ -124,12 +124,12 @@ default org.apache.maven.api.Artifact create(@Nonnull
ArtifactFactoryRequest req
requireNonNull(request, "request");
return create(
request.getSession(),
- request.getGroupId(),
- request.getArtifactId(),
- request.getVersion(),
- request.getClassifier(),
- request.getExtension(),
- request.getType());
+ request.groupId(),
+ request.artifactId(),
+ request.version(),
+ request.classifier(),
+ request.extension(),
+ request.type());
}
/**
@@ -145,11 +145,11 @@ default ProducedArtifact createProduced(@Nonnull
ArtifactFactoryRequest request)
requireNonNull(request, "request");
return createProduced(
request.getSession(),
- request.getGroupId(),
- request.getArtifactId(),
- request.getVersion(),
- request.getClassifier(),
- request.getExtension(),
- request.getType());
+ request.groupId(),
+ request.artifactId(),
+ request.version(),
+ request.classifier(),
+ request.extension(),
+ request.type());
}
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactFactoryRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactFactoryRequest.java
index ae15e02b6c..8f864bf96e 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactFactoryRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactFactoryRequest.java
@@ -40,23 +40,59 @@
@Immutable
public interface ArtifactFactoryRequest extends Request<Session> {
- /** @return the group identifier */
- String getGroupId();
+ /** Returns the group identifier. */
+ String groupId();
- /** @return the artifact identifier */
- String getArtifactId();
+ /** @deprecated Use {@link #groupId()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getGroupId() {
+ return groupId();
+ }
+
+ /** Returns the artifact identifier. */
+ String artifactId();
+
+ /** @deprecated Use {@link #artifactId()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getArtifactId() {
+ return artifactId();
+ }
+
+ /** Returns the version. */
+ String version();
+
+ /** @deprecated Use {@link #version()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getVersion() {
+ return version();
+ }
+
+ /** Returns the classifier, may be {@code null}. */
+ String classifier();
+
+ /** @deprecated Use {@link #classifier()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getClassifier() {
+ return classifier();
+ }
- /** @return the version */
- String getVersion();
+ /** Returns the file extension, may be {@code null}. */
+ String extension();
- /** @return the classifier, may be {@code null} */
- String getClassifier();
+ /** @deprecated Use {@link #extension()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getExtension() {
+ return extension();
+ }
- /** @return the file extension, may be {@code null} */
- String getExtension();
+ /** Returns the artifact type, may be {@code null}. */
+ String type();
- /** @return the artifact type, may be {@code null} */
- String getType();
+ /** @deprecated Use {@link #type()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getType() {
+ return type();
+ }
/**
* Builds a request from individual components.
@@ -114,7 +150,7 @@ static ArtifactFactoryRequest build(
.build();
}
- /** @return a new builder instance */
+ /** Returns a new builder instance. */
@Deprecated
static ArtifactFactoryRequestBuilder builder() {
return new ArtifactFactoryRequestBuilder();
@@ -208,32 +244,32 @@ private static class DefaultArtifactFactoryRequest
extends BaseRequest<Session>
}
@Override
- public String getGroupId() {
+ public String groupId() {
return groupId;
}
@Override
- public String getArtifactId() {
+ public String artifactId() {
return artifactId;
}
@Override
- public String getVersion() {
+ public String version() {
return version;
}
@Override
- public String getClassifier() {
+ public String classifier() {
return classifier;
}
@Override
- public String getExtension() {
+ public String extension() {
return extension;
}
@Override
- public String getType() {
+ public String type() {
return type;
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstallerRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstallerRequest.java
index 1363ac4978..a6ae9b2c44 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstallerRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstallerRequest.java
@@ -42,11 +42,20 @@
@Immutable
public interface ArtifactInstallerRequest extends Request<Session> {
- /** @return the artifacts to install, never {@code null} */
+ /** Returns the artifacts to install, never {@code null}. */
@Nonnull
- Collection<ProducedArtifact> getArtifacts();
+ Collection<ProducedArtifact> artifacts();
- /** @return a new builder instance */
+ /**
+ * @deprecated Use {@link #artifacts()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Collection<ProducedArtifact> getArtifacts() {
+ return artifacts();
+ }
+
+ /** Returns a new builder instance. */
@Nonnull
static ArtifactInstallerRequestBuilder builder() {
return new ArtifactInstallerRequestBuilder();
@@ -112,7 +121,7 @@ static class DefaultArtifactInstallerRequest extends
BaseRequest<Session> implem
@Nonnull
@Override
- public Collection<ProducedArtifact> getArtifacts() {
+ public Collection<ProducedArtifact> artifacts() {
return artifacts;
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverRequest.java
index f844f8ac9a..39b881b61a 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverRequest.java
@@ -57,11 +57,20 @@ default CacheRetention getCacheRetention() {
return CacheRetention.REQUEST_SCOPED;
}
- /** @return the coordinates of the artifacts to resolve, never {@code
null} */
+ /** Returns the coordinates of the artifacts to resolve, never {@code
null}. */
@Nonnull
- Collection<? extends ArtifactCoordinates> getCoordinates();
+ Collection<? extends ArtifactCoordinates> coordinates();
- /** @return a new builder instance */
+ /**
+ * @deprecated Use {@link #coordinates()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Collection<? extends ArtifactCoordinates> getCoordinates() {
+ return coordinates();
+ }
+
+ /** Returns a new builder instance. */
@Nonnull
static ArtifactResolverRequestBuilder builder() {
return new ArtifactResolverRequestBuilder();
@@ -161,13 +170,13 @@ private static class DefaultArtifactResolverRequest
extends BaseRequest<Session>
@Nonnull
@Override
- public Collection<? extends ArtifactCoordinates> getCoordinates() {
+ public Collection<? extends ArtifactCoordinates> coordinates() {
return coordinates;
}
@Nullable
@Override
- public List<RemoteRepository> getRepositories() {
+ public List<RemoteRepository> repositories() {
return repositories;
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/BaseRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/BaseRequest.java
index e01b2d5bec..8576ccf907 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/BaseRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/BaseRequest.java
@@ -47,13 +47,13 @@ protected BaseRequest(@Nonnull S session, RequestTrace
trace) {
/** {@inheritDoc} */
@Nonnull
@Override
- public S getSession() {
+ public S session() {
return session;
}
/** {@inheritDoc} */
@Override
- public RequestTrace getTrace() {
+ public RequestTrace trace() {
return trace;
}
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/BuilderProblem.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/BuilderProblem.java
index 9e4cb45ae9..4e2f80a236 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/BuilderProblem.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/BuilderProblem.java
@@ -42,33 +42,71 @@ public interface BuilderProblem {
* @return the hint about the source of the problem or an empty string if
unknown, never {@code null}
*/
@Nonnull
- String getSource();
+ String source();
+
+ /**
+ * @return the hint about the source of the problem or an empty string if
unknown, never {@code null}
+ * @deprecated Use {@link #source()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default String getSource() {
+ return source();
+ }
/**
* Gets the one-based index of the line containing the problem. The line
number should refer to some text file that
- * is given by {@link #getSource()}.
+ * is given by {@link #source()}.
*
* @return the one-based index of the line containing the problem or a
non-positive value if unknown
*/
- int getLineNumber();
+ int lineNumber();
+
+ /**
+ * @return the one-based index of the line containing the problem or a
non-positive value if unknown
+ * @deprecated Use {@link #lineNumber()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default int getLineNumber() {
+ return lineNumber();
+ }
/**
* Gets the one-based index of the column containing the problem. The
column number should refer to some text file
- * that is given by {@link #getSource()}.
+ * that is given by {@link #source()}.
*
* @return the one-based index of the column containing the problem or
non-positive value if unknown
*/
- int getColumnNumber();
+ int columnNumber();
+
+ /**
+ * @return the one-based index of the column containing the problem or
non-positive value if unknown
+ * @deprecated Use {@link #columnNumber()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default int getColumnNumber() {
+ return columnNumber();
+ }
/**
* Gets the location of the problem. The location is a user-friendly
combination of the values from
- * {@link #getSource()}, {@link #getLineNumber()} and {@link
#getColumnNumber()}. The exact syntax of the returned
+ * {@link #source()}, {@link #lineNumber()} and {@link #columnNumber()}.
The exact syntax of the returned
* value is undefined.
*
* @return the location of the problem, never {@code null}
*/
@Nonnull
- String getLocation();
+ String location();
+
+ /**
+ * @return the location of the problem, never {@code null}
+ * @deprecated Use {@link #location()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default String getLocation() {
+ return location();
+ }
/**
* Gets the exception that caused this problem (if any).
@@ -76,7 +114,17 @@ public interface BuilderProblem {
* @return the exception that caused this problem or {@code null} if not
applicable
*/
@Nullable
- Exception getException();
+ Exception exception();
+
+ /**
+ * @return the exception that caused this problem or {@code null} if not
applicable
+ * @deprecated Use {@link #exception()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default Exception getException() {
+ return exception();
+ }
/**
* Gets the message that describes this problem.
@@ -84,7 +132,17 @@ public interface BuilderProblem {
* @return the message describing this problem, never {@code null}
*/
@Nonnull
- String getMessage();
+ String message();
+
+ /**
+ * @return the message describing this problem, never {@code null}
+ * @deprecated Use {@link #message()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default String getMessage() {
+ return message();
+ }
/**
* Gets the severity level of this problem.
@@ -92,7 +150,17 @@ public interface BuilderProblem {
* @return the severity level of this problem, never {@code null}
*/
@Nonnull
- Severity getSeverity();
+ Severity severity();
+
+ /**
+ * @return the severity level of this problem, never {@code null}
+ * @deprecated Use {@link #severity()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Severity getSeverity() {
+ return severity();
+ }
/**
* The different severity levels for a problem, in decreasing order.
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinatesFactory.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinatesFactory.java
index 78fb8ca63a..df9c253d09 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinatesFactory.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinatesFactory.java
@@ -219,22 +219,22 @@ default DependencyCoordinates create(@Nonnull Session
session, ReportPlugin repo
@Nonnull
default DependencyCoordinates create(@Nonnull
DependencyCoordinatesFactoryRequest request) {
requireNonNull(request, "request");
- if (request.getCoordinatesString() != null) {
+ if (request.coordinatesString() != null) {
return create(
request.getSession(),
- request.getCoordinatesString(),
+ request.coordinatesString(),
request.getScope(),
request.isOptional(),
request.getExclusions());
}
return create(
request.getSession(),
- request.getGroupId(),
- request.getArtifactId(),
- request.getVersion(),
- request.getClassifier(),
- request.getExtension(),
- request.getType(),
+ request.groupId(),
+ request.artifactId(),
+ request.version(),
+ request.classifier(),
+ request.extension(),
+ request.type(),
request.getScope(),
request.isOptional(),
request.getExclusions());
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinatesFactoryRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinatesFactoryRequest.java
index ef33c77654..c237d5efcb 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinatesFactoryRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinatesFactoryRequest.java
@@ -49,15 +49,36 @@
@Immutable
public interface DependencyCoordinatesFactoryRequest extends
ArtifactCoordinatesFactoryRequest {
- /** @return the dependency scope, may be {@code null} */
- String getScope();
+ /** Returns the dependency scope, may be {@code null}. */
+ String scope();
- /** @return whether this dependency is optional */
- boolean isOptional();
+ /** @deprecated Use {@link #scope()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default String getScope() {
+ return scope();
+ }
+
+ /** Returns whether this dependency is optional. */
+ boolean optional();
- /** @return the dependency exclusions, never {@code null} */
+ /** @deprecated Use {@link #optional()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default boolean isOptional() {
+ return optional();
+ }
+
+ /** Returns the dependency exclusions, never {@code null}. */
@Nonnull
- Collection<Exclusion> getExclusions();
+ Collection<Exclusion> exclusions();
+
+ /**
+ * @deprecated Use {@link #exclusions()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Collection<Exclusion> getExclusions() {
+ return exclusions();
+ }
/**
* Builds a request from individual components.
@@ -142,7 +163,7 @@ static DependencyCoordinatesFactoryRequest build(@Nonnull
Session session, @Nonn
.build();
}
- /** @return a new builder instance */
+ /** Returns a new builder instance. */
@Deprecated
@Nonnull
static DependencyCoordinatesFactoryRequestBuilder builder() {
@@ -299,53 +320,53 @@ private DefaultDependencyCoordinatesFactoryRequest(
}
@Override
- public String getGroupId() {
+ public String groupId() {
return groupId;
}
@Override
- public String getArtifactId() {
+ public String artifactId() {
return artifactId;
}
@Override
- public String getVersion() {
+ public String version() {
return version;
}
@Override
- public String getClassifier() {
+ public String classifier() {
return classifier;
}
@Override
- public String getExtension() {
+ public String extension() {
return extension;
}
@Override
- public String getType() {
+ public String type() {
return type;
}
@Override
- public String getCoordinatesString() {
+ public String coordinatesString() {
return coordinatesString;
}
@Override
- public String getScope() {
+ public String scope() {
return scope;
}
@Override
- public boolean isOptional() {
+ public boolean optional() {
return optional;
}
@Nonnull
@Override
- public Collection<Exclusion> getExclusions() {
+ public Collection<Exclusion> exclusions() {
return exclusions;
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyResolverRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyResolverRequest.java
index 3d407036e7..9fabf75b21 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyResolverRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyResolverRequest.java
@@ -28,7 +28,6 @@
import org.apache.maven.api.Artifact;
import org.apache.maven.api.DependencyCoordinates;
-import org.apache.maven.api.JavaPathType;
import org.apache.maven.api.PathScope;
import org.apache.maven.api.PathType;
import org.apache.maven.api.Project;
@@ -78,47 +77,128 @@ enum RequestType {
RESOLVE
}
- /** @return the type of request (collect, flatten, or resolve) */
+ /** Returns the type of request (collect, flatten, or resolve). */
@Nonnull
- RequestType getRequestType();
+ RequestType requestType();
- /** @return the project whose dependencies should be resolved, or empty if
not project-based */
+ /**
+ * @deprecated Use {@link #requestType()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default RequestType getRequestType() {
+ return requestType();
+ }
+
+ /** Returns the project whose dependencies should be resolved, or empty if
not project-based. */
+ @Nonnull
+ Optional<Project> project();
+
+ /**
+ * @deprecated Use {@link #project()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Optional<Project> getProject() {
+ return project();
+ }
+
+ /** Returns the root artifact for the dependency graph, or empty. */
@Nonnull
- Optional<Project> getProject();
+ Optional<Artifact> rootArtifact();
- /** @return the root artifact for the dependency graph, or empty */
+ /**
+ * @deprecated Use {@link #rootArtifact()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
- Optional<Artifact> getRootArtifact();
+ default Optional<Artifact> getRootArtifact() {
+ return rootArtifact();
+ }
- /** @return the root dependency coordinates, or empty */
+ /** Returns the root dependency coordinates, or empty. */
@Nonnull
- Optional<DependencyCoordinates> getRoot();
+ Optional<DependencyCoordinates> root();
- /** @return the direct dependencies, never {@code null} */
+ /**
+ * @deprecated Use {@link #root()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
- Collection<DependencyCoordinates> getDependencies();
+ default Optional<DependencyCoordinates> getRoot() {
+ return root();
+ }
- /** @return the managed dependencies for version and scope management,
never {@code null} */
+ /** Returns the direct dependencies, never {@code null}. */
@Nonnull
- Collection<DependencyCoordinates> getManagedDependencies();
+ Collection<DependencyCoordinates> dependencies();
- /** @return whether to produce a verbose dependency graph */
- boolean getVerbose();
+ /**
+ * @deprecated Use {@link #dependencies()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Collection<DependencyCoordinates> getDependencies() {
+ return dependencies();
+ }
- /** @return the path scope for dependency resolution */
+ /** Returns the managed dependencies for version and scope management,
never {@code null}. */
@Nonnull
- PathScope getPathScope();
+ Collection<DependencyCoordinates> managedDependencies();
+
+ /**
+ * @deprecated Use {@link #managedDependencies()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Collection<DependencyCoordinates> getManagedDependencies() {
+ return managedDependencies();
+ }
+
+ /** Returns whether to produce a verbose dependency graph. */
+ boolean verbose();
+
+ /**
+ * @deprecated Use {@link #verbose()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default boolean getVerbose() {
+ return verbose();
+ }
+
+ /** Returns the path scope for dependency resolution. */
+ @Nonnull
+ PathScope pathScope();
+
+ /**
+ * @deprecated Use {@link #pathScope()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default PathScope getPathScope() {
+ return pathScope();
+ }
/**
* Returns a filter for the types of path (class-path, module-path, …)
accepted by the tool.
* For example, if a Java tools accepts only class-path elements, then the
filter should return
- * {@code true} for {@link JavaPathType#CLASSES} and {@code false} for
{@link JavaPathType#MODULES}.
+ * {@code true} for {@link org.apache.maven.api.JavaPathType#CLASSES} and
{@code false} for
+ * {@link org.apache.maven.api.JavaPathType#MODULES}.
* If no filter is explicitly set, then the default is a filter accepting
everything.
*
* @return a filter for the types of path (class-path, module-path, …)
accepted by the tool
*/
@Nullable
- Predicate<PathType> getPathTypeFilter();
+ Predicate<PathType> pathTypeFilter();
+
+ /**
+ * @deprecated Use {@link #pathTypeFilter()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default Predicate<PathType> getPathTypeFilter() {
+ return pathTypeFilter();
+ }
/**
* Returns the version of the platform where the code will be executed.
@@ -140,9 +220,16 @@ enum RequestType {
* @see SourceRoot#targetVersion()
*/
@Nullable
- Version getTargetVersion();
+ Version targetVersion();
+
+ /** @deprecated Use {@link #targetVersion()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default Version getTargetVersion() {
+ return targetVersion();
+ }
- /** @return a new builder instance */
+ /** Returns a new builder instance. */
@Nonnull
static DependencyResolverRequestBuilder builder() {
return new DependencyResolverRequestBuilder();
@@ -634,62 +721,62 @@ public String toString() {
@Nonnull
@Override
- public RequestType getRequestType() {
+ public RequestType requestType() {
return requestType;
}
@Nonnull
@Override
- public Optional<Project> getProject() {
+ public Optional<Project> project() {
return Optional.ofNullable(project);
}
@Nonnull
@Override
- public Optional<Artifact> getRootArtifact() {
+ public Optional<Artifact> rootArtifact() {
return Optional.ofNullable(rootArtifact);
}
@Nonnull
@Override
- public Optional<DependencyCoordinates> getRoot() {
+ public Optional<DependencyCoordinates> root() {
return Optional.ofNullable(root);
}
@Nonnull
@Override
- public Collection<DependencyCoordinates> getDependencies() {
+ public Collection<DependencyCoordinates> dependencies() {
return dependencies;
}
@Nonnull
@Override
- public Collection<DependencyCoordinates> getManagedDependencies() {
+ public Collection<DependencyCoordinates> managedDependencies() {
return managedDependencies;
}
@Override
- public boolean getVerbose() {
+ public boolean verbose() {
return verbose;
}
@Override
- public PathScope getPathScope() {
+ public PathScope pathScope() {
return pathScope;
}
@Override
- public Predicate<PathType> getPathTypeFilter() {
+ public Predicate<PathType> pathTypeFilter() {
return pathTypeFilter;
}
@Override
- public Version getTargetVersion() {
+ public Version targetVersion() {
return targetVersion;
}
@Override
- public List<RemoteRepository> getRepositories() {
+ public List<RemoteRepository> repositories() {
return repositories;
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ModelBuilderRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ModelBuilderRequest.java
index 5329b08054..4cf2d0ceb7 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ModelBuilderRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ModelBuilderRequest.java
@@ -100,7 +100,14 @@ enum RepositoryMerging {
* @return the model source
*/
@Nonnull
- ModelSource getSource();
+ ModelSource source();
+
+ /** @deprecated Use {@link #source()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default ModelSource getSource() {
+ return source();
+ }
/**
* Gets the type of build request.
@@ -108,53 +115,122 @@ enum RepositoryMerging {
* @return the request type
*/
@Nonnull
- RequestType getRequestType();
+ RequestType requestType();
+
+ /**
+ * @deprecated Use {@link #requestType()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default RequestType getRequestType() {
+ return requestType();
+ }
/**
* Returns whether input location tracking is enabled for the model.
*
* @return {@code true} if location tracking is enabled
*/
- boolean isLocationTracking();
+ boolean locationTracking();
+
+ /**
+ * @deprecated Use {@link #locationTracking()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default boolean isLocationTracking() {
+ return locationTracking();
+ }
/**
* Returns whether the build should recursively process sub-projects.
*
* @return {@code true} if recursive processing is enabled
*/
- boolean isRecursive();
+ boolean recursive();
+
+ /**
+ * @deprecated Use {@link #recursive()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default boolean isRecursive() {
+ return recursive();
+ }
/**
* Defines external profiles that may be activated for the given model.
* Those are external profiles usually defined in {@link
org.apache.maven.api.settings.Settings#getProfiles()}.
*/
@Nonnull
- Collection<Profile> getProfiles();
+ Collection<Profile> profiles();
+
+ /**
+ * @deprecated Use {@link #profiles()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Collection<Profile> getProfiles() {
+ return profiles();
+ }
/**
* List of profile ids that have been explicitly activated by the user.
*/
@Nonnull
- List<String> getActiveProfileIds();
+ List<String> activeProfileIds();
+
+ /**
+ * @deprecated Use {@link #activeProfileIds()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default List<String> getActiveProfileIds() {
+ return activeProfileIds();
+ }
/**
* List of profile ids that have been explicitly deactivated by the user.
*/
@Nonnull
- List<String> getInactiveProfileIds();
+ List<String> inactiveProfileIds();
+
+ /**
+ * @deprecated Use {@link #inactiveProfileIds()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default List<String> getInactiveProfileIds() {
+ return inactiveProfileIds();
+ }
/**
* Provides a map of system properties.
*/
@Nonnull
- Map<String, String> getSystemProperties();
+ Map<String, String> systemProperties();
+
+ /**
+ * @deprecated Use {@link #systemProperties()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Map<String, String> getSystemProperties() {
+ return systemProperties();
+ }
/**
* Provides a map of user properties.
- * User properties
*/
@Nonnull
- Map<String, String> getUserProperties();
+ Map<String, String> userProperties();
+
+ /**
+ * @deprecated Use {@link #userProperties()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Map<String, String> getUserProperties() {
+ return userProperties();
+ }
/**
* Gets the strategy for merging repositories from the POM with those from
the request.
@@ -162,7 +238,16 @@ enum RepositoryMerging {
* @return the repository merging strategy
*/
@Nonnull
- RepositoryMerging getRepositoryMerging();
+ RepositoryMerging repositoryMerging();
+
+ /**
+ * @deprecated Use {@link #repositoryMerging()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default RepositoryMerging getRepositoryMerging() {
+ return repositoryMerging();
+ }
/**
* Gets the model transformer used to inject lifecycle bindings.
@@ -170,7 +255,16 @@ enum RepositoryMerging {
* @return the lifecycle bindings injector, or {@code null} if none
*/
@Nullable
- ModelTransformer getLifecycleBindingsInjector();
+ ModelTransformer lifecycleBindingsInjector();
+
+ /**
+ * @deprecated Use {@link #lifecycleBindingsInjector()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default ModelTransformer getLifecycleBindingsInjector() {
+ return lifecycleBindingsInjector();
+ }
/**
* Creates a new request by copying an existing request and replacing the
source.
@@ -257,20 +351,20 @@ class ModelBuilderRequestBuilder {
ModelBuilderRequestBuilder() {}
ModelBuilderRequestBuilder(ModelBuilderRequest request) {
- this.session = request.getSession();
- this.trace = request.getTrace();
- this.requestType = request.getRequestType();
- this.locationTracking = request.isLocationTracking();
- this.recursive = request.isRecursive();
- this.source = request.getSource();
- this.profiles = request.getProfiles();
- this.activeProfileIds = request.getActiveProfileIds();
- this.inactiveProfileIds = request.getInactiveProfileIds();
- this.systemProperties = request.getSystemProperties();
- this.userProperties = request.getUserProperties();
- this.repositoryMerging = request.getRepositoryMerging();
- this.repositories = request.getRepositories();
- this.lifecycleBindingsInjector =
request.getLifecycleBindingsInjector();
+ this.session = request.session();
+ this.trace = request.trace();
+ this.requestType = request.requestType();
+ this.locationTracking = request.locationTracking();
+ this.recursive = request.recursive();
+ this.source = request.source();
+ this.profiles = request.profiles();
+ this.activeProfileIds = request.activeProfileIds();
+ this.inactiveProfileIds = request.inactiveProfileIds();
+ this.systemProperties = request.systemProperties();
+ this.userProperties = request.userProperties();
+ this.repositoryMerging = request.repositoryMerging();
+ this.repositories = request.repositories();
+ this.lifecycleBindingsInjector =
request.lifecycleBindingsInjector();
}
public ModelBuilderRequestBuilder session(Session session) {
@@ -408,63 +502,63 @@ private static class DefaultModelBuilderRequest extends
BaseRequest<Session> imp
}
@Override
- public RequestType getRequestType() {
+ public RequestType requestType() {
return requestType;
}
@Override
- public boolean isLocationTracking() {
+ public boolean locationTracking() {
return locationTracking;
}
@Override
- public boolean isRecursive() {
+ public boolean recursive() {
return recursive;
}
@Nonnull
@Override
- public ModelSource getSource() {
+ public ModelSource source() {
return source;
}
@Override
- public Collection<Profile> getProfiles() {
+ public Collection<Profile> profiles() {
return profiles;
}
@Override
- public List<String> getActiveProfileIds() {
+ public List<String> activeProfileIds() {
return activeProfileIds;
}
@Override
- public List<String> getInactiveProfileIds() {
+ public List<String> inactiveProfileIds() {
return inactiveProfileIds;
}
@Override
- public Map<String, String> getSystemProperties() {
+ public Map<String, String> systemProperties() {
return systemProperties;
}
@Override
- public Map<String, String> getUserProperties() {
+ public Map<String, String> userProperties() {
return userProperties;
}
@Override
- public RepositoryMerging getRepositoryMerging() {
+ public RepositoryMerging repositoryMerging() {
return repositoryMerging;
}
@Override
- public List<RemoteRepository> getRepositories() {
+ public List<RemoteRepository> repositories() {
return repositories;
}
@Override
- public ModelTransformer getLifecycleBindingsInjector() {
+ public ModelTransformer lifecycleBindingsInjector() {
return lifecycleBindingsInjector;
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderRequest.java
index 307ee19559..f6e053f863 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderRequest.java
@@ -52,51 +52,62 @@ public interface ProjectBuilderRequest extends
RepositoryAwareRequest {
* @return an optional containing the path to the project, or empty if not
specified
*/
@Nonnull
- Optional<Path> getPath();
+ Optional<Path> path();
/**
- * Gets the source of the project to build.
- * This is an alternative to specifying a path, allowing the project to be
built from
- * a model source such as a string or input stream.
- *
- * @return an optional containing the source of the project, or empty if
not specified
+ * @deprecated Use {@link #path()} instead.
*/
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
- Optional<Source> getSource();
+ default Optional<Path> getPath() {
+ return path();
+ }
+
+ @Nonnull
+ Optional<Source> source();
/**
- * Determines whether a stub model should be allowed when the POM is
missing or unreadable.
- * A stub model contains only minimal information derived from the
project's coordinates.
- *
- * @return true if a stub model should be allowed, false otherwise
+ * @deprecated Use {@link #source()} instead.
*/
- boolean isAllowStubModel();
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Optional<Source> getSource() {
+ return source();
+ }
+
+ boolean allowStubModel();
/**
- * Determines whether the project builder should recursively build
parent/child projects.
- * When true, the builder will process parent POMs and child modules as
needed.
- *
- * @return true if the build should be recursive, false otherwise
+ * @deprecated Use {@link #allowStubModel()} instead.
*/
- boolean isRecursive();
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default boolean isAllowStubModel() {
+ return allowStubModel();
+ }
+
+ boolean recursive();
/**
- * Determines whether plugins should be processed during project building.
- * When true, the builder will process plugin information which may include
- * resolving plugin dependencies and executing plugin goals that
participate in project building.
- *
- * @return true if plugins should be processed, false otherwise
+ * @deprecated Use {@link #recursive()} instead.
*/
- boolean isProcessPlugins();
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default boolean isRecursive() {
+ return recursive();
+ }
+
+ boolean processPlugins();
/**
- * Gets the list of remote repositories to use for resolving dependencies
during project building.
- * These repositories will be used in addition to any repositories defined
in the project itself.
- *
- * @return the list of remote repositories, or null if not specified
+ * @deprecated Use {@link #processPlugins()} instead.
*/
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default boolean isProcessPlugins() {
+ return processPlugins();
+ }
+
@Nullable
- List<RemoteRepository> getRepositories();
+ @Override
+ List<RemoteRepository> repositories();
/**
* Creates a new ProjectBuilderRequest with the specified session and
source.
@@ -270,33 +281,33 @@ private static class DefaultProjectBuilderRequest extends
BaseRequest<Session>
@Nonnull
@Override
- public Optional<Path> getPath() {
+ public Optional<Path> path() {
return Optional.ofNullable(path);
}
@Nonnull
@Override
- public Optional<Source> getSource() {
+ public Optional<Source> source() {
return Optional.ofNullable(source);
}
@Override
- public boolean isAllowStubModel() {
+ public boolean allowStubModel() {
return allowStubModel;
}
@Override
- public boolean isRecursive() {
+ public boolean recursive() {
return recursive;
}
@Override
- public boolean isProcessPlugins() {
+ public boolean processPlugins() {
return processPlugins;
}
@Override
- public List<RemoteRepository> getRepositories() {
+ public List<RemoteRepository> repositories() {
return repositories;
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/RepositoryAwareRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/RepositoryAwareRequest.java
index f948ecdea4..261e36b087 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/RepositoryAwareRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/RepositoryAwareRequest.java
@@ -65,19 +65,23 @@ public interface RepositoryAwareRequest extends
Request<Session> {
/**
* Returns the list of remote repositories to be used for this request.
*
- * <p>If this method returns {@code null}, the session's default remote
repositories
- * will be used. If a non-null list is returned, it will be used instead
of the
- * session's repositories, allowing for request-specific repository
configuration.
- *
- * <p>The returned list should not contain duplicate repositories (based
on their
- * equality) or null entries, as these will cause validation failures when
the
- * request is processed.
- *
* @return the list of remote repositories to use, or {@code null} to use
session defaults
* @see Session#getRemoteRepositories()
*/
@Nullable
- List<RemoteRepository> getRepositories();
+ List<RemoteRepository> repositories();
+
+ /**
+ * Returns the list of remote repositories to be used for this request.
+ *
+ * @return the list of remote repositories to use, or {@code null} to use
session defaults
+ * @deprecated Use {@link #repositories()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default List<RemoteRepository> getRepositories() {
+ return repositories();
+ }
/**
* Validates a list of remote repositories to ensure data integrity.
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/Request.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/Request.java
index e89a0a044e..e09833cc3b 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/Request.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/Request.java
@@ -83,7 +83,19 @@ default CacheRetention getCacheRetention() {
* @return the session instance, never {@code null}
*/
@Nonnull
- S getSession();
+ S session();
+
+ /**
+ * Returns the session associated with this request.
+ *
+ * @return the session instance, never {@code null}
+ * @deprecated Use {@link #session()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default S getSession() {
+ return session();
+ }
/**
* Returns the trace information associated with this request, if any.
@@ -93,7 +105,19 @@ default CacheRetention getCacheRetention() {
* @return the request trace, or {@code null} if no trace information is
available
*/
@Nullable
- RequestTrace getTrace();
+ RequestTrace trace();
+
+ /**
+ * Returns the trace information associated with this request, if any.
+ *
+ * @return the request trace, or {@code null} if no trace information is
available
+ * @deprecated Use {@link #trace()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default RequestTrace getTrace() {
+ return trace();
+ }
/**
* Returns a hashcode value for this request, based on all significant
fields.
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/Result.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/Result.java
index 65bdf97a91..00eb2f646b 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/Result.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/Result.java
@@ -49,5 +49,17 @@ public interface Result<REQ extends Request<?>> {
* @return the originating request instance, never {@code null}
*/
@Nonnull
- REQ getRequest();
+ REQ request();
+
+ /**
+ * Returns the request that produced this result.
+ *
+ * @return the originating request instance, never {@code null}
+ * @deprecated Use {@link #request()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default REQ getRequest() {
+ return request();
+ }
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderRequest.java
index 84632a5e17..f88b7807a9 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderRequest.java
@@ -61,31 +61,52 @@ default CacheRetention getCacheRetention() {
* @return the installation settings source or {@code null} if none
*/
@Nonnull
- Optional<Source> getInstallationSettingsSource();
+ Optional<Source> installationSettingsSource();
/**
- * Gets the project settings source.
- *
- * @return the project settings source or {@code null} if none
+ * @deprecated Use {@link #installationSettingsSource()} instead.
*/
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
- Optional<Source> getProjectSettingsSource();
+ default Optional<Source> getInstallationSettingsSource() {
+ return installationSettingsSource();
+ }
+
+ @Nonnull
+ Optional<Source> projectSettingsSource();
/**
- * Gets the user settings source.
- *
- * @return the user settings source or {@code null} if none
+ * @deprecated Use {@link #projectSettingsSource()} instead.
*/
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
- Optional<Source> getUserSettingsSource();
+ default Optional<Source> getProjectSettingsSource() {
+ return projectSettingsSource();
+ }
+
+ @Nonnull
+ Optional<Source> userSettingsSource();
/**
- * The optional interpolation source used for interpolation.
- *
- * @return the interpolation source for interpolation
+ * @deprecated Use {@link #userSettingsSource()} instead.
*/
+ @Deprecated(since = "4.0.0", forRemoval = true)
@Nonnull
- Optional<UnaryOperator<String>> getInterpolationSource();
+ default Optional<Source> getUserSettingsSource() {
+ return userSettingsSource();
+ }
+
+ @Nonnull
+ Optional<UnaryOperator<String>> interpolationSource();
+
+ /**
+ * @deprecated Use {@link #interpolationSource()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nonnull
+ default Optional<UnaryOperator<String>> getInterpolationSource() {
+ return interpolationSource();
+ }
/**
* Creates a request from installation and user settings sources.
@@ -256,25 +277,25 @@ private static class DefaultSettingsBuilderRequest
extends BaseRequest<ProtoSess
@Nonnull
@Override
- public Optional<Source> getInstallationSettingsSource() {
+ public Optional<Source> installationSettingsSource() {
return Optional.ofNullable(installationSettingsSource);
}
@Nonnull
@Override
- public Optional<Source> getProjectSettingsSource() {
+ public Optional<Source> projectSettingsSource() {
return Optional.ofNullable(projectSettingsSource);
}
@Nonnull
@Override
- public Optional<Source> getUserSettingsSource() {
+ public Optional<Source> userSettingsSource() {
return Optional.ofNullable(userSettingsSource);
}
@Nonnull
@Override
- public Optional<UnaryOperator<String>> getInterpolationSource() {
+ public Optional<UnaryOperator<String>> interpolationSource() {
return Optional.ofNullable(interpolationSource);
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/VersionRangeResolverRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/VersionRangeResolverRequest.java
index e97c13d471..2208d52a73 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/VersionRangeResolverRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/VersionRangeResolverRequest.java
@@ -261,7 +261,7 @@ public ArtifactCoordinates getArtifactCoordinates() {
@Nullable
@Override
- public List<RemoteRepository> getRepositories() {
+ public List<RemoteRepository> repositories() {
return repositories;
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/VersionResolverRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/VersionResolverRequest.java
index 82ddb99f23..88ced40657 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/VersionResolverRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/VersionResolverRequest.java
@@ -162,7 +162,7 @@ public ArtifactCoordinates getArtifactCoordinates() {
@Nullable
@Override
- public List<RemoteRepository> getRepositories() {
+ public List<RemoteRepository> repositories() {
return repositories;
}
diff --git
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlReaderRequest.java
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlReaderRequest.java
index 14896a3f0e..3f051f55f9 100644
---
a/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlReaderRequest.java
+++
b/api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlReaderRequest.java
@@ -44,7 +44,14 @@ public interface XmlReaderRequest {
* @return the file path, or {@code null}
*/
@Nullable
- Path getPath();
+ Path path();
+
+ /** @deprecated Use {@link #path()} instead. */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default Path getPath() {
+ return path();
+ }
/**
* Returns the root directory for resolving relative paths, or {@code
null} if not set.
@@ -52,7 +59,16 @@ public interface XmlReaderRequest {
* @return the root directory, or {@code null}
*/
@Nullable
- Path getRootDirectory();
+ Path rootDirectory();
+
+ /**
+ * @deprecated Use {@link #rootDirectory()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default Path getRootDirectory() {
+ return rootDirectory();
+ }
/**
* Returns the URL to read the XML from, or {@code null} if another input
source is used.
@@ -60,7 +76,16 @@ public interface XmlReaderRequest {
* @return the URL, or {@code null}
*/
@Nullable
- URL getURL();
+ URL url();
+
+ /**
+ * @deprecated Use {@link #url()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default URL getURL() {
+ return url();
+ }
/**
* Returns the input stream to read the XML from, or {@code null} if
another input source is used.
@@ -68,7 +93,16 @@ public interface XmlReaderRequest {
* @return the input stream, or {@code null}
*/
@Nullable
- InputStream getInputStream();
+ InputStream inputStream();
+
+ /**
+ * @deprecated Use {@link #inputStream()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default InputStream getInputStream() {
+ return inputStream();
+ }
/**
* Returns the reader to read the XML from, or {@code null} if another
input source is used.
@@ -76,7 +110,16 @@ public interface XmlReaderRequest {
* @return the reader, or {@code null}
*/
@Nullable
- Reader getReader();
+ Reader reader();
+
+ /**
+ * @deprecated Use {@link #reader()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default Reader getReader() {
+ return reader();
+ }
/**
* Returns the transformer to apply during parsing, or {@code null} if
none is set.
@@ -84,14 +127,31 @@ public interface XmlReaderRequest {
* @return the transformer, or {@code null}
*/
@Nullable
- Transformer getTransformer();
+ Transformer transformer();
+
+ /**
+ * @deprecated Use {@link #transformer()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default Transformer getTransformer() {
+ return transformer();
+ }
/**
* Returns whether strict parsing should be enforced.
*
* @return {@code true} if strict parsing is enabled
*/
- boolean isStrict();
+ boolean strict();
+
+ /**
+ * @deprecated Use {@link #strict()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default boolean isStrict() {
+ return strict();
+ }
/**
* Returns the identifier of the model being parsed, used for error
reporting.
@@ -99,7 +159,16 @@ public interface XmlReaderRequest {
* @return the model identifier, or {@code null}
*/
@Nullable
- String getModelId();
+ String modelId();
+
+ /**
+ * @deprecated Use {@link #modelId()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default String getModelId() {
+ return modelId();
+ }
/**
* Returns the location description used for error reporting.
@@ -107,14 +176,31 @@ public interface XmlReaderRequest {
* @return the location string, or {@code null}
*/
@Nullable
- String getLocation();
+ String location();
+
+ /**
+ * @deprecated Use {@link #location()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ @Nullable
+ default String getLocation() {
+ return location();
+ }
/**
* Returns whether default XML entities should be added during parsing.
*
* @return {@code true} if default entities should be added
*/
- boolean isAddDefaultEntities();
+ boolean addDefaultEntities();
+
+ /**
+ * @deprecated Use {@link #addDefaultEntities()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ default boolean isAddDefaultEntities() {
+ return addDefaultEntities();
+ }
/**
* Indicates whether location information (line/column tracking) should be
@@ -276,52 +362,52 @@ private static class DefaultXmlReaderRequest implements
XmlReaderRequest {
}
@Override
- public Path getPath() {
+ public Path path() {
return path;
}
@Override
- public Path getRootDirectory() {
+ public Path rootDirectory() {
return rootDirectory;
}
@Override
- public URL getURL() {
+ public URL url() {
return url;
}
@Override
- public InputStream getInputStream() {
+ public InputStream inputStream() {
return inputStream;
}
@Override
- public Reader getReader() {
+ public Reader reader() {
return reader;
}
@Override
- public Transformer getTransformer() {
+ public Transformer transformer() {
return transformer;
}
@Override
- public boolean isStrict() {
+ public boolean strict() {
return strict;
}
@Override
- public String getModelId() {
+ public String modelId() {
return modelId;
}
@Override
- public String getLocation() {
+ public String location() {
return location;
}
@Override
- public boolean isAddDefaultEntities() {
+ public boolean addDefaultEntities() {
return addDefaultEntities;
}
diff --git
a/api/maven-api-spi/src/main/java/org/apache/maven/api/services/model/ModelProcessor.java
b/api/maven-api-spi/src/main/java/org/apache/maven/api/services/model/ModelProcessor.java
index bdf06f2d14..ceecb921c9 100644
---
a/api/maven-api-spi/src/main/java/org/apache/maven/api/services/model/ModelProcessor.java
+++
b/api/maven-api-spi/src/main/java/org/apache/maven/api/services/model/ModelProcessor.java
@@ -74,6 +74,6 @@ public interface ModelProcessor {
* @throws XmlReaderException If the input format could not be parsed.
* @deprecated Use {@link #read(Source, Map)} instead.
*/
- @Deprecated(since = "4.2.0")
+ @Deprecated(since = "4.0.0")
Model read(XmlReaderRequest request) throws IOException,
XmlReaderException;
}
diff --git
a/compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/type/DefaultType.java
b/compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/type/DefaultType.java
index 842b779d8b..8c89dc37a8 100644
---
a/compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/type/DefaultType.java
+++
b/compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/type/DefaultType.java
@@ -81,22 +81,22 @@ public String id() {
}
@Override
- public Language getLanguage() {
+ public Language language() {
return language;
}
@Override
- public String getExtension() {
+ public String extension() {
return extension;
}
@Override
- public String getClassifier() {
+ public String classifier() {
return classifier;
}
@Override
- public boolean isIncludesDependencies() {
+ public boolean includesDependencies() {
return this.includesDependencies;
}
@@ -105,7 +105,7 @@ public Map<String, String> getProperties() {
}
@Override
- public Set<PathType> getPathTypes() {
+ public Set<PathType> pathTypes() {
return this.pathTypes;
}
@@ -127,12 +127,12 @@ public String getId() {
@Override
public String getExtension() {
- return type.getExtension();
+ return type.extension();
}
@Override
public String getClassifier() {
- return type.getClassifier() == null ? "" : type.getClassifier();
+ return type.classifier() == null ? "" : type.classifier();
}
@Override
diff --git
a/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/cisupport/GithubCIDetector.java
b/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/cisupport/GithubCIDetector.java
index 67ed91a226..39f82cccec 100644
---
a/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/cisupport/GithubCIDetector.java
+++
b/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/cisupport/GithubCIDetector.java
@@ -42,7 +42,7 @@ public String name() {
}
@Override
- public boolean isVerbose() {
+ public boolean verbose() {
return "1".equals(System.getenv(RUNNER_DEBUG));
}
});
diff --git
a/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/cisupport/TravisCIDetector.java
b/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/cisupport/TravisCIDetector.java
index 2e43e7e747..0291c85d8b 100644
---
a/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/cisupport/TravisCIDetector.java
+++
b/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/cisupport/TravisCIDetector.java
@@ -42,7 +42,7 @@ public String name() {
}
@Override
- public boolean isVerbose() {
+ public boolean verbose() {
return "true".equals(System.getenv(TRAVIS_DEBUG_MODE));
}
});
diff --git
a/impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/cisupport/CIDetectorHelperRunner.java
b/impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/cisupport/CIDetectorHelperRunner.java
index 2a8cfd1ef0..efed47db99 100644
---
a/impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/cisupport/CIDetectorHelperRunner.java
+++
b/impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/cisupport/CIDetectorHelperRunner.java
@@ -28,7 +28,7 @@ public static void main(String[] args) {
if (detect.isEmpty()) {
System.out.print("NONE;");
} else {
- detect.forEach(d -> System.out.print(d.name() + (d.isVerbose() ?
"+VERBOSE" : "") + ";"));
+ detect.forEach(d -> System.out.print(d.name() + (d.verbose() ?
"+VERBOSE" : "") + ";"));
}
}
}
diff --git
a/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPluginManager.java
b/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPluginManager.java
index 2009ee2cf5..e38895732d 100644
---
a/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPluginManager.java
+++
b/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPluginManager.java
@@ -69,7 +69,7 @@ public Plugin loadPlugin(Session session, Project project,
org.apache.maven.api.
requireNonNull(project, "project");
requireNonNull(plugin, "plugin");
- PluginRequest request = new PluginRequest(session, project, plugin);
+ PluginRequest request = new PluginRequest(session, null, project,
plugin);
RequestTraceHelper.ResolverTrace trace =
RequestTraceHelper.enter(session, request);
try {
return InternalSession.from(session)
@@ -120,17 +120,9 @@ private org.apache.maven.model.Plugin findPlugin(
+ requestedPlugin.getArtifactId() + " is not declared
by project " + project.getId()));
}
- private record PluginRequest(Session session, Project project,
org.apache.maven.api.model.Plugin plugin)
+ private record PluginRequest(
+ Session session, RequestTrace trace, Project project,
org.apache.maven.api.model.Plugin plugin)
implements Request<Session>, CacheMetadata {
- @Override
- public Session getSession() {
- return session;
- }
-
- @Override
- public RequestTrace getTrace() {
- return null;
- }
@Override
public CacheRetention getCacheRetention() {
@@ -138,10 +130,5 @@ public CacheRetention getCacheRetention() {
}
}
- private record PluginResult(PluginRequest request, Plugin plugin)
implements Result<PluginRequest> {
- @Override
- public PluginRequest getRequest() {
- return request;
- }
- }
+ private record PluginResult(PluginRequest request, Plugin plugin)
implements Result<PluginRequest> {}
}
diff --git
a/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectBuilder.java
b/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectBuilder.java
index 04563a50b4..5e0d88d7d6 100644
---
a/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectBuilder.java
+++
b/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectBuilder.java
@@ -104,7 +104,7 @@ protected ProjectBuilderResult
doBuild(ProjectBuilderRequest request)
}
return new ProjectBuilderResult() {
@Override
- public ProjectBuilderRequest getRequest() {
+ public ProjectBuilderRequest request() {
return request;
}
@@ -135,57 +135,57 @@ public Collection<BuilderProblem> getProblems() {
private BuilderProblem toProblem(ModelProblem problem) {
return new BuilderProblem() {
@Override
- public String getSource() {
+ public String source() {
return problem.getSource();
}
@Override
- public int getLineNumber() {
+ public int lineNumber() {
return problem.getLineNumber();
}
@Override
- public int getColumnNumber() {
+ public int columnNumber() {
return problem.getColumnNumber();
}
@Override
- public String getLocation() {
+ public String location() {
StringBuilder buffer = new StringBuilder(256);
- if (!getSource().isEmpty()) {
- buffer.append(getSource());
+ if (!source().isEmpty()) {
+ buffer.append(source());
}
- if (getLineNumber() > 0) {
+ if (lineNumber() > 0) {
if (!buffer.isEmpty()) {
buffer.append(", ");
}
- buffer.append("line ").append(getLineNumber());
+ buffer.append("line ").append(lineNumber());
}
- if (getColumnNumber() > 0) {
+ if (columnNumber() > 0) {
if (!buffer.isEmpty()) {
buffer.append(", ");
}
- buffer.append("column
").append(getColumnNumber());
+ buffer.append("column
").append(columnNumber());
}
return buffer.toString();
}
@Override
- public Exception getException() {
+ public Exception exception() {
return problem.getException();
}
@Override
- public String getMessage() {
+ public String message() {
return problem.getMessage();
}
@Override
- public Severity getSeverity() {
+ public Severity severity() {
return
Severity.valueOf(problem.getSeverity().name());
}
};
diff --git
a/impl/maven-core/src/test/java/org/apache/maven/project/DefaultProjectBuilderTest.java
b/impl/maven-core/src/test/java/org/apache/maven/project/DefaultProjectBuilderTest.java
index 80adc6911c..81e508e75d 100644
---
a/impl/maven-core/src/test/java/org/apache/maven/project/DefaultProjectBuilderTest.java
+++
b/impl/maven-core/src/test/java/org/apache/maven/project/DefaultProjectBuilderTest.java
@@ -151,7 +151,7 @@ public Model getFileModel() {
}
@Override
- public ModelBuilderRequest getRequest() {
+ public ModelBuilderRequest request() {
return null;
}
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultBuilderProblem.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultBuilderProblem.java
index bf223cc0da..e650237ccb 100644
---
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultBuilderProblem.java
+++
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultBuilderProblem.java
@@ -44,37 +44,37 @@ class DefaultBuilderProblem implements BuilderProblem {
}
@Override
- public String getSource() {
+ public String source() {
return source;
}
@Override
- public int getLineNumber() {
+ public int lineNumber() {
return lineNumber;
}
@Override
- public int getColumnNumber() {
+ public int columnNumber() {
return columnNumber;
}
@Override
- public Exception getException() {
+ public Exception exception() {
return exception;
}
@Override
- public String getMessage() {
+ public String message() {
return message;
}
@Override
- public Severity getSeverity() {
+ public Severity severity() {
return severity;
}
@Override
- public String getLocation() {
+ public String location() {
StringBuilder buffer = new StringBuilder(256);
if (getSource() != null && !getSource().isEmpty()) {
buffer.append(getSource());
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependency.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependency.java
index eebddaeaa8..44544cefef 100644
--- a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependency.java
+++ b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependency.java
@@ -64,7 +64,7 @@ public boolean snapshot() {
}
@Override
- public boolean isOptional() {
+ public boolean optional() {
return dependency.isOptional();
}
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java
index 067e75b32a..156d3cadbc 100644
---
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java
+++
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java
@@ -417,7 +417,7 @@ private Path findArtifactPath(String group, String
artifact) throws IOException
}
@Override
- public DependencyResolverRequest getRequest() {
+ public DependencyResolverRequest request() {
return request;
}
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultSettingsBuilder.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultSettingsBuilder.java
index 8b94f081f0..e7bbca0d57 100644
---
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultSettingsBuilder.java
+++
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultSettingsBuilder.java
@@ -678,7 +678,7 @@ static class DefaultSettingsBuilderResult implements
SettingsBuilderResult {
}
@Override
- public SettingsBuilderRequest getRequest() {
+ public SettingsBuilderRequest request() {
return request;
}
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultToolchainsBuilder.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultToolchainsBuilder.java
index 49221498f5..4076016b63 100644
---
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultToolchainsBuilder.java
+++
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultToolchainsBuilder.java
@@ -187,7 +187,7 @@ static class DefaultToolchainsBuilderResult implements
ToolchainsBuilderResult {
}
@Override
- public ToolchainsBuilderRequest getRequest() {
+ public ToolchainsBuilderRequest request() {
return request;
}
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultTransportProvider.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultTransportProvider.java
index c130fd9734..37d6db95ad 100644
---
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultTransportProvider.java
+++
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultTransportProvider.java
@@ -85,12 +85,12 @@ private TransportResult doTransport(TransportRequest
request) {
private record TransportRequest(Session session, RemoteRepository
repository)
implements Request<Session>, CacheMetadata {
@Override
- public Session getSession() {
+ public Session session() {
return session;
}
@Override
- public RequestTrace getTrace() {
+ public RequestTrace trace() {
return null;
}
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultVersionRangeResolver.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultVersionRangeResolver.java
index b48a3e6a81..d561b7f1c4 100644
---
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultVersionRangeResolver.java
+++
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultVersionRangeResolver.java
@@ -94,7 +94,7 @@ public VersionRangeResolverResult
doResolve(VersionRangeResolverRequest request)
return new VersionRangeResolverResult() {
@Override
- public VersionRangeResolverRequest getRequest() {
+ public VersionRangeResolverRequest request() {
return request;
}
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultVersionResolver.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultVersionResolver.java
index bcffb3e7cb..a74a7ccf15 100644
---
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultVersionResolver.java
+++
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultVersionResolver.java
@@ -81,7 +81,7 @@ protected VersionResolverResult
doResolve(VersionResolverRequest request) throws
return new VersionResolverResult() {
@Override
- public VersionResolverRequest getRequest() {
+ public VersionResolverRequest request() {
return request;
}
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilder.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilder.java
index 5275ae0954..7c656d79e4 100644
---
a/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilder.java
+++
b/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilder.java
@@ -3166,12 +3166,12 @@ enum ModelOperation {
record ModelOperationRequest(ModelBuilderRequest modelRequest,
ModelOperation operation, RequestTrace trace)
implements Request<Session>, CacheMetadata {
@Override
- public Session getSession() {
- return modelRequest.getSession();
+ public Session session() {
+ return modelRequest.session();
}
@Override
- public RequestTrace getTrace() {
+ public RequestTrace trace() {
return trace;
}
@@ -3431,7 +3431,7 @@ public static class SourceResponse<R extends Request<?>,
T> implements Result<R>
@Nonnull
@Override
- public R getRequest() {
+ public R request() {
return request;
}
}
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilderResult.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilderResult.java
index 6180510b4f..abbf3c1c38 100644
---
a/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilderResult.java
+++
b/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilderResult.java
@@ -55,7 +55,7 @@ class DefaultModelBuilderResult implements ModelBuilderResult
{
}
@Override
- public ModelBuilderRequest getRequest() {
+ public ModelBuilderRequest request() {
return request;
}
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelProblem.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelProblem.java
index 803ef7edc5..23c40b615b 100644
---
a/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelProblem.java
+++
b/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelProblem.java
@@ -111,17 +111,17 @@ public DefaultModelProblem(
}
@Override
- public String getSource() {
+ public String source() {
return source;
}
@Override
- public int getLineNumber() {
+ public int lineNumber() {
return lineNumber;
}
@Override
- public int getColumnNumber() {
+ public int columnNumber() {
return columnNumber;
}
@@ -131,17 +131,17 @@ public String getModelId() {
}
@Override
- public Exception getException() {
+ public Exception exception() {
return exception;
}
@Override
- public String getLocation() {
+ public String location() {
return "";
}
@Override
- public String getMessage() {
+ public String message() {
String msg = null;
if (message != null && !message.isEmpty()) {
@@ -158,7 +158,7 @@ public String getMessage() {
}
@Override
- public Severity getSeverity() {
+ public Severity severity() {
return severity;
}
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/resolver/type/DefaultType.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/resolver/type/DefaultType.java
index f9773f2a54..87fa5c1ace 100644
---
a/impl/maven-impl/src/main/java/org/apache/maven/impl/resolver/type/DefaultType.java
+++
b/impl/maven-impl/src/main/java/org/apache/maven/impl/resolver/type/DefaultType.java
@@ -79,22 +79,22 @@ public String id() {
}
@Override
- public Language getLanguage() {
+ public Language language() {
return language;
}
@Override
- public String getExtension() {
+ public String extension() {
return extension;
}
@Override
- public String getClassifier() {
+ public String classifier() {
return classifier;
}
@Override
- public boolean isIncludesDependencies() {
+ public boolean includesDependencies() {
return this.includesDependencies;
}
@@ -103,7 +103,7 @@ public Map<String, String> getProperties() {
}
@Override
- public Set<PathType> getPathTypes() {
+ public Set<PathType> pathTypes() {
return this.pathTypes;
}
@@ -143,12 +143,12 @@ public String getId() {
@Override
public String getExtension() {
- return type.getExtension();
+ return type.extension();
}
@Override
public String getClassifier() {
- return type.getClassifier() == null ? "" : type.getClassifier();
+ return type.classifier() == null ? "" : type.classifier();
}
@Override
diff --git
a/impl/maven-impl/src/test/java/org/apache/maven/impl/cache/AbstractRequestCacheTest.java
b/impl/maven-impl/src/test/java/org/apache/maven/impl/cache/AbstractRequestCacheTest.java
index 881c2aa0a0..a25ccf6cfa 100644
---
a/impl/maven-impl/src/test/java/org/apache/maven/impl/cache/AbstractRequestCacheTest.java
+++
b/impl/maven-impl/src/test/java/org/apache/maven/impl/cache/AbstractRequestCacheTest.java
@@ -663,12 +663,12 @@ static class TestRequestImpl implements TestRequest {
@Override
@Nonnull
- public ProtoSession getSession() {
+ public ProtoSession session() {
return session;
}
@Override
- public RequestTrace getTrace() {
+ public RequestTrace trace() {
return null;
}
@@ -705,7 +705,7 @@ static class TestResult implements Result<TestRequest> {
@Override
@Nonnull
- public TestRequest getRequest() {
+ public TestRequest request() {
return request;
}
}
@@ -767,12 +767,12 @@ void setTraceData(String traceData) {
@Override
@Nonnull
- public ProtoSession getSession() {
+ public ProtoSession session() {
return mock(ProtoSession.class);
}
@Override
- public RequestTrace getTrace() {
+ public RequestTrace trace() {
return null;
}
@@ -809,7 +809,7 @@ static class MutableHashCodeResult implements
Result<MutableHashCodeRequest> {
@Override
@Nonnull
- public MutableHashCodeRequest getRequest() {
+ public MutableHashCodeRequest request() {
return request;
}
}
diff --git
a/impl/maven-impl/src/test/java/org/apache/maven/impl/cache/CacheConfigurationTest.java
b/impl/maven-impl/src/test/java/org/apache/maven/impl/cache/CacheConfigurationTest.java
index 8b9a33437a..c4c826b16f 100644
---
a/impl/maven-impl/src/test/java/org/apache/maven/impl/cache/CacheConfigurationTest.java
+++
b/impl/maven-impl/src/test/java/org/apache/maven/impl/cache/CacheConfigurationTest.java
@@ -189,72 +189,72 @@ public CacheRetention getCacheRetention() {
}
@Override
- public Session getSession() {
+ public Session session() {
return null;
}
@Override
- public RequestTrace getTrace() {
+ public RequestTrace trace() {
return null;
}
@Override
- public RequestType getRequestType() {
+ public RequestType requestType() {
return RequestType.CONSUMER_DEPENDENCY;
}
@Override
- public boolean isLocationTracking() {
+ public boolean locationTracking() {
return false;
}
@Override
- public boolean isRecursive() {
+ public boolean recursive() {
return false;
}
@Override
- public ModelSource getSource() {
+ public ModelSource source() {
return null;
}
@Override
- public java.util.Collection<Profile> getProfiles() {
+ public java.util.Collection<Profile> profiles() {
return java.util.List.of();
}
@Override
- public java.util.List<String> getActiveProfileIds() {
+ public java.util.List<String> activeProfileIds() {
return java.util.List.of();
}
@Override
- public java.util.List<String> getInactiveProfileIds() {
+ public java.util.List<String> inactiveProfileIds() {
return java.util.List.of();
}
@Override
- public java.util.Map<String, String> getSystemProperties() {
+ public java.util.Map<String, String> systemProperties() {
return java.util.Map.of();
}
@Override
- public java.util.Map<String, String> getUserProperties() {
+ public java.util.Map<String, String> userProperties() {
return java.util.Map.of();
}
@Override
- public RepositoryMerging getRepositoryMerging() {
+ public RepositoryMerging repositoryMerging() {
return RepositoryMerging.POM_DOMINANT;
}
@Override
- public java.util.List<RemoteRepository> getRepositories() {
+ public java.util.List<RemoteRepository> repositories() {
return java.util.List.of();
}
@Override
- public ModelTransformer getLifecycleBindingsInjector() {
+ public ModelTransformer lifecycleBindingsInjector() {
return null;
}
}
diff --git
a/impl/maven-testing/src/main/java/org/apache/maven/testing/plugin/stubs/ProjectStub.java
b/impl/maven-testing/src/main/java/org/apache/maven/testing/plugin/stubs/ProjectStub.java
index 16424045cd..e0e6dc6182 100644
---
a/impl/maven-testing/src/main/java/org/apache/maven/testing/plugin/stubs/ProjectStub.java
+++
b/impl/maven-testing/src/main/java/org/apache/maven/testing/plugin/stubs/ProjectStub.java
@@ -101,27 +101,27 @@ public String id() {
}
@Override
- public Language getLanguage() {
+ public Language language() {
return null;
}
@Override
- public String getExtension() {
+ public String extension() {
return model.getPackaging();
}
@Override
- public String getClassifier() {
+ public String classifier() {
return "";
}
@Override
- public boolean isIncludesDependencies() {
+ public boolean includesDependencies() {
return false;
}
@Override
- public Set<PathType> getPathTypes() {
+ public Set<PathType> pathTypes() {
return Set.of();
}
};