Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ default String key() {
* Determines whether this artifact uses a snapshot version.
*
* @return {@code true} if the artifact is a snapshot, {@code false} otherwise
* @see org.apache.maven.api.Session#isVersionSnapshot(String)
* @see Session#isVersionSnapshot(String)
*/
boolean isSnapshot();

/**
* {@return coordinates with the same identifiers as this artifact}
* This is a shortcut for {@code session.createArtifactCoordinates(artifact)}.
*
* @see org.apache.maven.api.Session#createArtifactCoordinates(Artifact)
* @see Session#createArtifactCoordinates(Artifact)
*/
@Nonnull
ArtifactCoordinates toCoordinates();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
* }
* </pre>
*
* @see org.apache.maven.api.Session#requirePackaging(String)
* @see org.apache.maven.api.Project#getPackaging()
* @see Session#requirePackaging(String)
* @see Project#getPackaging()
* @see org.apache.maven.api.model.Model#getPackaging()
* @since 4.0.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ Map<PathType, List<Path>> resolveDependencies(
*
* @param artifact the artifact for which to resolve the version
* @return resolved version of the given artifact
* @throws org.apache.maven.api.services.VersionResolverException if the resolution failed
* @throws VersionResolverException if the resolution failed
*
* @see org.apache.maven.api.services.VersionResolver#resolve(Session, ArtifactCoordinates) (String)
*/
Expand Down Expand Up @@ -839,7 +839,7 @@ Optional<Version> resolveHighestVersion(@Nonnull ArtifactCoordinates artifact, L
* @return the scope for the given identifier (never null)
* @throws IllegalArgumentException if the given identifier is not a known scope
*
* @see org.apache.maven.api.DependencyScope#forId(String)
* @see DependencyScope#forId(String)
*/
@Nonnull
DependencyScope requireDependencyScope(@Nonnull String id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @since 4.0.0
* @see org.apache.maven.api.services.VersionParser#parseVersion(String)
* @see org.apache.maven.api.Session#parseVersion(String)
* @see Session#parseVersion(String)
* @see VersionConstraint
* @see VersionRange
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @see Version
* @see VersionRange
* @see org.apache.maven.api.services.VersionParser#parseVersionConstraint(String)
* @see org.apache.maven.api.Session#parseVersionConstraint(String)
* @see Session#parseVersionConstraint(String)
* @since 4.0.0
*/
@Experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @see Version
* @see VersionConstraint
* @see org.apache.maven.api.services.VersionParser#parseVersionRange(String)
* @see org.apache.maven.api.Session#parseVersionRange(String)
* @see Session#parseVersionRange(String)
* @since 4.0.0
*/
@Experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public interface DependencyResolverResult extends Result<DependencyResolverReque
* Returns the file paths of all dependencies and their assignments to different paths.
* The {@link PathType} keys identify, for example, {@code --class-path} or {@code --module-path} options.
* In the case of Java tools, the map may also contain {@code --patch-module} options, which are
* {@linkplain org.apache.maven.api.JavaPathType#patchModule(String) handled in a special way}.
* {@linkplain JavaPathType#patchModule(String) handled in a special way}.
*
* <h4>Design note</h4>
* All types of path are determined together because they are sometime mutually exclusive.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
public interface ProblemCollector<P extends BuilderProblem> {
/**
* Returns {@code true} if there is at least one problem collected with severity equal or more severe than
* {@link org.apache.maven.api.services.BuilderProblem.Severity#WARNING}. This check is logically equivalent
* {@link BuilderProblem.Severity#WARNING}. This check is logically equivalent
* to "is there any problem reported?", given warning is the lowest severity.
*/
default boolean hasWarningProblems() {
Expand All @@ -55,15 +55,15 @@ default boolean hasWarningProblems() {

/**
* Returns {@code true} if there is at least one problem collected with severity equal or more severe than
* {@link org.apache.maven.api.services.BuilderProblem.Severity#ERROR}.
* {@link BuilderProblem.Severity#ERROR}.
*/
default boolean hasErrorProblems() {
return hasProblemsFor(BuilderProblem.Severity.ERROR);
}

/**
* Returns {@code true} if there is at least one problem collected with severity equal or more severe than
* {@link org.apache.maven.api.services.BuilderProblem.Severity#FATAL}.
* {@link BuilderProblem.Severity#FATAL}.
*/
default boolean hasFatalProblems() {
return hasProblemsFor(BuilderProblem.Severity.FATAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* during parallel builds.
*
* @since 4.0.0
* @see org.apache.maven.api.services.ProjectBuilder
* @see ProjectBuilder
* @see Project
*/
@Experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.apache.maven.api.Session;
import org.apache.maven.api.annotations.Experimental;
import org.apache.maven.api.annotations.Nonnull;
import org.apache.maven.api.settings.Profile;
import org.apache.maven.api.settings.Settings;

/**
Expand Down Expand Up @@ -125,11 +126,11 @@ default ProblemCollector<BuilderProblem> validate(@Nonnull Settings settings) {
* Convert a model profile to a settings profile.
*/
@Nonnull
org.apache.maven.api.settings.Profile convert(@Nonnull org.apache.maven.api.model.Profile profile);
Profile convert(@Nonnull org.apache.maven.api.model.Profile profile);

/**
* Convert a settings profile to a model profile.
*/
@Nonnull
org.apache.maven.api.model.Profile convert(@Nonnull org.apache.maven.api.settings.Profile profile);
org.apache.maven.api.model.Profile convert(@Nonnull Profile profile);
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* </ul>
*
* @since 4.0.0
* @see org.apache.maven.api.services.ProjectBuilder#build(Session, Source)
* @see ProjectBuilder#build(Session, Source)
*/
@Experimental
public interface Source {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
* }
* </pre>
*
* @see org.apache.maven.api.Language
* @see org.apache.maven.api.spi.ExtensibleEnumProvider
* @see Language
* @see ExtensibleEnumProvider
* @since 4.0.0
*/
@Experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
* }
* </pre>
*
* @see org.apache.maven.api.Lifecycle
* @see org.apache.maven.api.spi.ExtensibleEnumProvider
* @see Lifecycle
* @see ExtensibleEnumProvider
* @since 4.0.0
*/
@Experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
* }
* </pre>
*
* @see org.apache.maven.api.Packaging
* @see org.apache.maven.api.spi.ExtensibleEnumProvider
* @see Packaging
* @see ExtensibleEnumProvider
* @since 4.0.0
*/
@Experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
* }
* </pre>
*
* @see org.apache.maven.api.PathScope
* @see org.apache.maven.api.spi.ExtensibleEnumProvider
* @see PathScope
* @see ExtensibleEnumProvider
* @since 4.0.0
*/
@Experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
* }
* </pre>
*
* @see org.apache.maven.api.ProjectScope
* @see org.apache.maven.api.spi.ExtensibleEnumProvider
* @see ProjectScope
* @see ExtensibleEnumProvider
* @since 4.0.0
*/
@Experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
* }
* </pre>
*
* @see org.apache.maven.api.Type
* @see org.apache.maven.api.spi.ExtensibleEnumProvider
* @see Type
* @see ExtensibleEnumProvider
* @since 4.0.0
*/
@Experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DefaultProblem implements Problem {
*
* @param message The message describing the problem, may be {@code null}.
* @param severity The severity level of the problem, may be {@code null} to default to
* {@link org.apache.maven.building.Problem.Severity#ERROR}.
* {@link Problem.Severity#ERROR}.
* @param source A hint about the source of the problem like a file path, may be {@code null}.
* @param lineNumber The one-based index of the line containing the problem or {@code -1} if unknown.
* @param columnNumber The one-based index of the column containing the problem or {@code -1} if unknown.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashMap;
Expand Down Expand Up @@ -954,7 +955,7 @@ private void encryption(CliRequest cliRequest) throws Exception {
passwd = String.copyValueOf(password);

// Sun/Oracle advises to empty the char array
java.util.Arrays.fill(password, ' ');
Arrays.fill(password, ' ');
}
}
System.out.println(dispatcher.encrypt(passwd, null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.apache.maven.execution.ExecutionEvent;
import org.apache.maven.execution.MavenExecutionResult;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.logging.api.LogLevelRecorder;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.project.MavenProject;
Expand Down Expand Up @@ -146,7 +147,7 @@ public void sessionEnded(ExecutionEvent event) {

ILoggerFactory iLoggerFactory = LoggerFactory.getILoggerFactory();

if (iLoggerFactory instanceof org.apache.maven.logging.api.LogLevelRecorder recorder
if (iLoggerFactory instanceof LogLevelRecorder recorder
&& recorder.hasReachedMaxLevel()) {
event.getSession()
.getResult()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.nio.file.Path;
import java.util.Enumeration;
import java.util.Map;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.function.UnaryOperator;

Expand All @@ -37,7 +38,7 @@ public class MavenPropertiesLoader {
"maven.override."; // prefix that marks that system property should override defaults.

public static void loadProperties(
java.util.Properties properties, Path path, UnaryOperator<String> callback, boolean escape)
Properties properties, Path path, UnaryOperator<String> callback, boolean escape)
throws IOException {
MavenProperties sp = new MavenProperties(false);
if (Files.exists(path)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

import java.util.ArrayList;

import org.apache.maven.jline.MessageUtils;

/**
* Provides a fluent API for generating
* <a href="https://en.wikipedia.org/wiki/ANSI_escape_code#CSI_sequences">ANSI escape sequences</a>.
Expand Down Expand Up @@ -161,7 +163,7 @@ public interface Consumer {
}

public static boolean isEnabled() {
return org.apache.maven.jline.MessageUtils.isColorEnabled() && org.jline.jansi.Ansi.isEnabled();
return MessageUtils.isColorEnabled() && org.jline.jansi.Ansi.isEnabled();
}

public static void setEnabled(final boolean flag) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.io.StringWriter;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import org.apache.maven.impl.model.DefaultInterpolator;
import org.junit.jupiter.api.BeforeEach;
Expand Down Expand Up @@ -101,7 +102,7 @@ public void testSpaces() throws Exception {
+ "dblbackslash=\\\\\n"
+ " \n";

java.util.Properties props1 = new java.util.Properties();
Properties props1 = new Properties();
props1.load(new StringReader(config));

MavenProperties props2 = new MavenProperties();
Expand Down Expand Up @@ -168,7 +169,7 @@ public void testConfigInterpolation() throws IOException {
String config = "a=$\\\\\\\\{var}\n" + "ab=${a}b\n" + "abc=${ab}c";
Map<String, String> expected = Map.of("a", "$\\{var}", "ab", "$\\{var}b", "abc", "$\\{var}bc");

java.util.Properties props1 = new java.util.Properties();
Properties props1 = new Properties();
props1.load(new StringReader(config));
new DefaultInterpolator().performSubstitution((Map) props1, null, true);
assertEquals(expected, props1);
Expand Down Expand Up @@ -327,7 +328,7 @@ public void testMultiValueEscaping() throws IOException {
pw.println(" cantaloupe, watermelon, \\");
pw.println(" kiwi, mango");

java.util.Properties p = new java.util.Properties();
Properties p = new Properties();
p.load(new StringReader(sw.toString()));
Object o24 = p.getProperty("fruits");
assertEquals("apple, banana, pear, cantaloupe, watermelon, kiwi, mango", o24);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public interface ModelResolver {
/**
* Tries to resolve the POM for the specified parent coordinates possibly updating {@code parent}.
* <p>
* Unlike the {@link #resolveModel(java.lang.String, java.lang.String, java.lang.String)} method, this method
* Unlike the {@link #resolveModel(String, String, String)} method, this method
* supports version ranges and updates the given {@code parent} instance to match the returned {@code ModelSource}.
* If {@code parent} declares a version range, the version corresponding to the returned {@code ModelSource} will
* be set on the given {@code parent}.
Expand All @@ -67,7 +67,7 @@ public interface ModelResolver {
/**
* Tries to resolve the POM for the specified dependency coordinates possibly updating {@code dependency}.
* <p>
* Unlike the {@link #resolveModel(java.lang.String, java.lang.String, java.lang.String)} method, this method
* Unlike the {@link #resolveModel(String, String, String)} method, this method
* supports version ranges and updates the given {@code dependency} instance to match the returned
* {@code ModelSource}. If {@code dependency} declares a version range, the version corresponding to the returned
* {@code ModelSource} will be set on the given {@code dependency}.
Expand Down
Loading