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 50fbb6035327..4aff60b3271e 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
@@ -38,7 +38,7 @@ public interface Dependency extends Artifact {
/**
* {@return the type of the dependency}
* A dependency can be a JAR file,
- * a modular-JAR if it is intended to be placed on the module-path,
+ * a modular-JAR if it is intended to be placed on the module path,
* a JAR containing test classes, etc.
*
* @see DependencyCoordinates#getType()
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 a7330bcbb7e8..ada2f8ed0cfd 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
@@ -27,8 +27,8 @@
/**
* {@code ArtifactCoordinates} completed with information about how the artifact will be used.
- * This information include the dependency type (main classes, test classes, etc.),
- * a scope (compile-time, run-time etc.), an obligation (whether the dependency
+ * This information includes the dependency type (main classes, test classes, etc.),
+ * a scope (compile, runtime etc.), an obligation (whether the dependency
* is optional or mandatory), and possible exclusions for transitive dependencies.
* The {@linkplain #getVersionConstraint() version} and the {@linkplain #getOptional() obligation}
* may not be defined precisely.
@@ -41,7 +41,7 @@ public interface DependencyCoordinates extends ArtifactCoordinates {
/**
* {@return the type of the dependency}
* A dependency can be a JAR file,
- * a modular-JAR if it is intended to be placed on the module-path,
+ * a modular-JAR if it is intended to be placed on the module path,
* a JAR containing test classes, etc.
*/
@Nonnull
@@ -49,13 +49,13 @@ public interface DependencyCoordinates extends ArtifactCoordinates {
/**
* {@return the time at which the dependency will be used}
- * If may be, for example, at compile time only, at run time or at test time.
+ * It may be, for example, at compile time only, at run time or at test time.
*/
@Nonnull
DependencyScope getScope();
/**
- * Returns whether the dependency is optional, mandatory or of unspecified obligation.
+ * Returns whether the dependency is optional, mandatory, or of unspecified obligation.
*
* @return the obligation, or {@code null} if unspecified
*/
diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/JavaPathType.java b/api/maven-api-core/src/main/java/org/apache/maven/api/JavaPathType.java
index 43b4ad1f6262..fc13eac477d9 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/JavaPathType.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/JavaPathType.java
@@ -33,7 +33,7 @@
/**
* The option of a Java command-line tool where to place the paths to some dependencies.
- * A {@code PathType} can identify the class-path, the module-path, the patches for a specific module,
+ * A {@code PathType} can identify the class path, the module path, the patches for a specific module,
* or another kind of path.
*
*
One path type is handled in a special way: unlike other options,
@@ -41,8 +41,8 @@
* This type is created by calls to {@link #patchModule(String)} and a new instance must be created for
* every module to patch.
*
- * Path types are often exclusive. For example, a dependency should not be both on the Java class-path
- * and on the Java module-path.
+ * Path types are often exclusive. For example, a dependency should not be both on the Java class path
+ * and on the Java module path.
*
* Relationship with Java compiler standard location
* This enumeration is closely related to the {@link JavaFileManager.Location} enumerations.
@@ -63,16 +63,16 @@ public enum JavaPathType implements PathType {
* The Java tools location is {@link StandardLocation#CLASS_PATH}.
*
* Context-sensitive interpretation
- * A dependency with this path type will not necessarily be placed on the class-path.
+ * A dependency with this path type will not necessarily be placed on the class path.
* There are two circumstances where the dependency may nevertheless be placed somewhere else:
*
*
* - If {@link #MODULES} path type is also set, then the dependency can be placed either on the
- * class-path or on the module-path, but only one of those. The choice is up to the plugin,
+ * class path or on the module path, but only one of those. The choice is up to the plugin,
* possibly using heuristic rules (Maven 3 behavior).
- * - If a {@link #patchModule(String)} is also set and the main JAR file is placed on the module-path,
+ *
- If a {@link #patchModule(String)} is also set and the main JAR file is placed on the module path,
* then the test dependency will be placed on the Java {@code --patch-module} option instead of the
- * class-path.
+ * class path.
*
*/
CLASSES(StandardLocation.CLASS_PATH, "--class-path"),
@@ -83,16 +83,16 @@ public enum JavaPathType implements PathType {
* The Java tools location is {@link StandardLocation#MODULE_PATH}.
*
* Context-sensitive interpretation
- * A dependency with this flag will not necessarily be placed on the module-path.
+ * A dependency with this flag will not necessarily be placed on the module path.
* There are two circumstances where the dependency may nevertheless be placed somewhere else:
*
*
* - If {@link #CLASSES} path type is also set, then the dependency should be placed on the
- * module-path, but is also compatible with placement on the class-path. Compatibility can
+ * module path, but is also compatible with placement on the class path. Compatibility can
* be achieved, for example, by repeating in the {@code META-INF/services/} directory the services
* that are declared in the {@code module-info.class} file. In that case, the path type can be chosen
* by the plugin.
- * - If a {@link #patchModule(String)} is also set and the main JAR file is placed on the module-path,
+ *
- If a {@link #patchModule(String)} is also set and the main JAR file is placed on the module path,
* then the test dependency will be placed on the Java {@code --patch-module} option instead of the
* {@code --module-path} option.
*
@@ -151,8 +151,8 @@ public enum JavaPathType implements PathType {
* one specific module. Used for compilation and execution among others.
*
* Context-sensitive interpretation
- * This path type makes sense only when a main module is added on the module-path by another dependency.
- * In no main module is found, the patch dependency may be added on the class-path or module-path
+ * This path type makes sense only when a main module is added on the module path by another dependency.
+ * In no main module is found, the patch dependency may be added on the class path or module path
* depending on whether {@link #CLASSES} or {@link #MODULES} is present.
*
* @param moduleName name of the module on which to apply the path
diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/PathType.java b/api/maven-api-core/src/main/java/org/apache/maven/api/PathType.java
index 368d14443cba..5c2e302dca83 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/PathType.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/PathType.java
@@ -26,10 +26,10 @@
/**
* The option of a command-line tool where to place the paths to some dependencies.
- * A {@code PathType} can identify the Java class-path, the Java module-path,
+ * A {@code PathType} can identify the Java class-path, the Java module path,
* or another kind of path for another programming language for example.
* Path types are often exclusive. For example, a dependency should not be
- * both on the Java class-path and on the Java module-path.
+ * both on the Java class path and on the Java module path.
*
* @see org.apache.maven.api.services.DependencyResolverResult#getDispatchedPaths()
*
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 4d3cb13ea07b..fa3106fa57ae 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
@@ -32,7 +32,7 @@
*
* It provides information about the file type (or extension) of the associated artifact,
* its default classifier, and how the artifact will be used in the build when creating
- * class-paths or module-paths.
+ * class paths or module paths.
*
* For example, the type {@code java-source} has a {@code jar} extension and a
* {@code sources} classifier. The artifact and its dependencies should be added
@@ -54,47 +54,47 @@ public interface Type extends ExtensibleEnum {
String BOM = "bom";
/**
- * Artifact type name for a JAR file that can be placed either on the class-path or on the module-path.
+ * Artifact type name for a JAR file that can be placed either on the class path or on the module path.
* The path (classes or modules) is chosen by the plugin, possibly using heuristic rules.
* This is the behavior of Maven 3.
*/
String JAR = "jar";
/**
- * Artifact type name for a fat-JAR file that can be only on the class-path.
+ * Artifact type name for a fat-JAR file that can be only on the class path.
* The fat-JAR is a self-contained JAR and its transitive dependencies will not be resolved, if any.
* This type is new in Maven 4.
*/
String FATJAR = "fatjar";
/**
- * Artifact type name for a JAR file to unconditionally place on the class-path.
+ * Artifact type name for a JAR file to unconditionally place on the class path.
* If the JAR is modular, its module information are ignored.
* This type is new in Maven 4.
*/
String CLASSPATH_JAR = "classpath-jar";
/**
- * Artifact type name for a JAR file to unconditionally place on the module-path.
+ * Artifact type name for a JAR file to unconditionally place on the module path.
* If the JAR is not modular, then it is loaded by Java as an unnamed module.
* This type is new in Maven 4.
*/
String MODULAR_JAR = "modular-jar";
/**
- * Artifact type name for a JAR file that can be placed either on the annotation processor class-path
- * or module-path. The path (classes or modules) is chosen by the plugin, possibly using heuristic rules.
+ * Artifact type name for a JAR file that can be placed either on the annotation processor class path
+ * or module path. The path (classes or modules) is chosen by the plugin, possibly using heuristic rules.
*/
String PROCESSOR = "processor";
/**
- * Artifact type name for a JAR file to unconditionally place on the annotation processor class-path.
+ * Artifact type name for a JAR file to unconditionally place on the annotation processor class path.
* If the JAR is modular, its module information are ignored.
*/
String CLASSPATH_PROCESSOR = "classpath-processor";
/**
- * Artifact type name for a JAR file to unconditionally place on the annotation processor module-path.
+ * Artifact type name for a JAR file to unconditionally place on the annotation processor module path.
* If the JAR is not modular, then it is loaded by Java as an unnamed module.
*/
String MODULAR_PROCESSOR = "modular-processor";
@@ -115,9 +115,9 @@ public interface Type extends ExtensibleEnum {
String MAVEN_PLUGIN = "maven-plugin";
/**
- * Artifact type name for a JAR file containing test classes. If the main artifact is placed on the class-path
- * ({@value #JAR} or {@value #CLASSPATH_JAR} types), then the test artifact will also be placed on the class-path.
- * Otherwise, if the main artifact is placed on the module-path ({@value #JAR} or {@value #MODULAR_JAR} types),
+ * Artifact type name for a JAR file containing test classes. If the main artifact is placed on the class path
+ * ({@value #JAR} or {@value #CLASSPATH_JAR} types), then the test artifact will also be placed on the class path.
+ * Otherwise, if the main artifact is placed on the module path ({@value #JAR} or {@value #MODULAR_JAR} types),
* then the test artifact will be added using {@code --patch-module} option.
*/
String TEST_JAR = "test-jar";
@@ -173,7 +173,7 @@ public interface Type extends ExtensibleEnum {
* and no heuristic rule will be involved.
*
*
It is nevertheless common to specify two or more types of path. For example,
- * a Java library may be compatible with either the class-path or the module-path,
+ * a Java library may be compatible with either the class path or the module path,
* 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}.
diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyResolverResult.java b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyResolverResult.java
index e2ab1c2a9e4e..7b7f92046928 100644
--- a/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyResolverResult.java
+++ b/api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyResolverResult.java
@@ -69,8 +69,8 @@ public interface DependencyResolverResult {
/**
* Returns the file paths of all dependencies, regardless on which tool option those paths should be placed.
- * The returned list may contain a mix of Java class-path, Java module-path, and other types of path elements.
- * This collection has the same content than {@code getDependencies.values()} except that it does not contain
+ * The returned list may contain a mix of Java class path, Java module path, and other types of path elements.
+ * This collection has the same content as {@code getDependencies.values()} except that it does not contain
* null elements.
*
* @return the paths of all dependencies
@@ -136,8 +136,8 @@ public interface DependencyResolverResult {
Optional getModuleDescriptor(@Nonnull Path dependency) throws IOException;
/**
- * If the module-path contains at least one filename-based auto-module, prepares a warning message.
- * The module path is the collection of dependencies associated to {@link JavaPathType#MODULES}.
+ * If the module path contains at least one filename-based auto-module, prepares a warning message.
+ * The module path is the collection of dependencies associated with {@link JavaPathType#MODULES}.
* It is caller's responsibility to send the message to a logger.
*
* @return warning message if at least one filename-based auto-module was found
diff --git a/impl/maven-core/src/main/java/org/apache/maven/project/MavenProject.java b/impl/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
index e155609de55e..f278f04afb2f 100644
--- a/impl/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
+++ b/impl/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
@@ -340,12 +340,12 @@ private static boolean isTestPathElement(final String scope) {
}
/**
- * Returns a filtered list of classpath elements. This method is invoked when the caller
- * requested that all dependencies are placed on the classpath, with no module-path element.
+ * Returns a filtered list of class path elements. This method is invoked when the caller
+ * requested that all dependencies are placed on the class path, with no module path element.
*
- * @param scopeFilter a filter returning {@code true} for the artifact scopes to accept.
- * @param includeTestDir whether to include the test directory in the classpath elements.
- * @return paths of all artifacts placed on the classpath.
+ * @param scopeFilter a filter returning {@code true} for the artifact scopes to accept
+ * @param includeTestDir whether to include the test directory in the classpath elements
+ * @return paths of all artifacts placed on the classpath
* @throws DependencyResolutionRequiredException if an artifact file is used, but has not been resolved
*/
private List getClasspathElements(final Predicate scopeFilter, final boolean includeTestDir)
diff --git a/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/DefaultDependencyResolverResult.java b/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/DefaultDependencyResolverResult.java
index be6a8cbb3a48..de33340a69b2 100644
--- a/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/DefaultDependencyResolverResult.java
+++ b/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/DefaultDependencyResolverResult.java
@@ -124,9 +124,9 @@ private void addPathElement(PathType type, Path path) {
/**
* Adds main and test output directories to the result. This method adds the main output directory
- * to the module-path if it contains a {@code module-info.class}, or to the class-path otherwise.
+ * to the module path if it contains a {@code module-info.class}, or to the class path otherwise.
* For the test output directory, the rules are more complex and are governed by the fact that
- * Java does not accept the placement of two modules of the same name on the module-path.
+ * Java does not accept the placement of two modules of the same name on the module path.
* So the modular test output directory usually needs to be placed in a {@code --path-module} option.
*
*
@@ -134,21 +134,21 @@ private void addPathElement(PathType type, Path path) {
*
* - If a test module name is identical to a main module name,
* place the test directory in a {@code --patch-module} option.
- * - Otherwise, place the test directory on the module-path. However, this case
+ *
- Otherwise, place the test directory on the module path. However, this case
* (a module existing only in test output, not in main output) should be uncommon.
*
*
* - Otherwise (test output contains no module information), then:
*
- * - If the main output is on the module-path, place the test output
+ *
- If the main output is on the module path, place the test output
* on a {@code --patch-module} option.
- * - Otherwise (main output on the class-path), place the test output on the class-path too.
+ * - Otherwise (main output on the class path), place the test output on the class path too.
*
*
*
*
* This method must be invoked before {@link #addDependency(Node, Dependency, Predicate, Path)}
- * if output directories are desired on the class-path or module-path.
+ * if output directories are desired on the class path or module path.
* This method can be invoked at most once.
*
* @param main the main output directory, or {@code null} if none
@@ -235,7 +235,7 @@ void addDependency(Node node, Dependency dep, Predicate filter, Path p
}
paths.add(path);
/*
- * Dispatch the dependency to class-path, module-path, patch-module path, etc.
+ * Dispatch the dependency to class path, module path, patch-module path, etc.
* according the dependency properties. We need to process patch-module first,
* because this type depends on whether a module of the same name has already
* been added on the module-type.
@@ -255,7 +255,7 @@ void addDependency(Node node, Dependency dep, Predicate filter, Path p
if (!containsModule(moduleName)) {
/*
* Not patching an existing module. This case should be unusual. If it nevertheless
- * happens, add on class-path or module-path if allowed, or keep patching otherwise.
+ * happens, add to class path or module path if allowed, or keep patching otherwise.
* The latter case (keep patching) is okay if the main module will be defined later.
*/
type = cache.selectPathType(pathTypes, filter, path).orElse(type);
diff --git a/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/PathModularizationCache.java b/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/PathModularizationCache.java
index 9b5e3aca61f3..650d9358df14 100644
--- a/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/PathModularizationCache.java
+++ b/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/PathModularizationCache.java
@@ -181,7 +181,7 @@ Optional warningForFilenameBasedAutomodules(Collection modulePaths
String lineSeparator = System.lineSeparator();
var joiner = new StringJoiner(
lineSeparator + " - ",
- "Filename-based automodules detected on the module-path: " + lineSeparator + " - ",
+ "Filename-based automodules detected on the module path: " + lineSeparator + " - ",
lineSeparator + "Please don't publish this project to a public artifact repository.");
automodulesDetected.forEach(joiner::add);
return Optional.of(joiner.toString());