fix javadoc errors

This commit is contained in:
Hervé Boutemy 2021-10-17 12:07:50 +02:00
parent 2f81b7d93b
commit f46a9131d5
24 changed files with 121 additions and 26 deletions

View File

@ -173,7 +173,14 @@ public static Artifact copyArtifact( Artifact artifact )
return clone; return clone;
} }
/** Returns <code>to</code> collection */ /**
* Copy artifact to a collection.
*
* @param <T> the target collection type
* @param from an artifact collection
* @param to the target artifact collection
* @return <code>to</code> collection
*/
public static <T extends Collection<Artifact>> T copyArtifacts( Collection<Artifact> from, T to ) public static <T extends Collection<Artifact>> T copyArtifacts( Collection<Artifact> from, T to )
{ {
for ( Artifact artifact : from ) for ( Artifact artifact : from )

View File

@ -73,10 +73,16 @@ public interface ArtifactRepository
@Deprecated @Deprecated
void setBlacklisted( boolean blackListed ); void setBlacklisted( boolean blackListed );
/** @since 3.8.1 **/ /**
* @return whether the repository is blocked
* @since 3.8.1
**/
boolean isBlocked(); boolean isBlocked();
/** @since 3.8.1 **/ /**
* @param blocked block the repository?
* @since 3.8.1
**/
void setBlocked( boolean blocked ); void setBlocked( boolean blocked );
// //
@ -84,7 +90,8 @@ public interface ArtifactRepository
// //
/** /**
* *
* @param artifact * @param artifact an artifact
* @return found artifact
* @since 3.0-alpha-3 * @since 3.0-alpha-3
*/ */
Artifact find( Artifact artifact ); Artifact find( Artifact artifact );
@ -108,20 +115,26 @@ public interface ArtifactRepository
boolean isProjectAware(); boolean isProjectAware();
/** /**
* @param authentication authentication
* @since 3.0-alpha-3 * @since 3.0-alpha-3
*/ */
void setAuthentication( Authentication authentication ); void setAuthentication( Authentication authentication );
/** /**
* @return repository authentication
* @since 3.0-alpha-3 * @since 3.0-alpha-3
*/ */
Authentication getAuthentication(); Authentication getAuthentication();
/** /**
* @param proxy proxy
* @since 3.0-alpha-3 * @since 3.0-alpha-3
*/ */
void setProxy( Proxy proxy ); void setProxy( Proxy proxy );
/** /**
* @since 3.0-alpha-3 * @since 3.0-alpha-3
* @return repository proxy
*/ */
Proxy getProxy(); Proxy getProxy();

View File

@ -37,7 +37,12 @@ public class MultipleArtifactsNotFoundException
private final List<Artifact> resolvedArtifacts; private final List<Artifact> resolvedArtifacts;
private final List<Artifact> missingArtifacts; private final List<Artifact> missingArtifacts;
/** @deprecated use {@link #MultipleArtifactsNotFoundException(Artifact, List, List, List)} */ /**
* @param originatingArtifact the artifact that was being resolved
* @param missingArtifacts artifacts that could not be resolved
* @param remoteRepositories remote repositories where the missing artifacts were not found
* @deprecated use {@link #MultipleArtifactsNotFoundException(Artifact, List, List, List)}
*/
@Deprecated @Deprecated
public MultipleArtifactsNotFoundException( Artifact originatingArtifact, public MultipleArtifactsNotFoundException( Artifact originatingArtifact,
List<Artifact> missingArtifacts, List<Artifact> missingArtifacts,

View File

@ -101,8 +101,7 @@ public VersionRange cloneOf()
* *
* @param spec string representation of a version or version range * @param spec string representation of a version or version range
* @return a new {@link VersionRange} object that represents the spec * @return a new {@link VersionRange} object that represents the spec
* @throws InvalidVersionSpecificationException * @throws InvalidVersionSpecificationException if invalid version specification
*
*/ */
public static VersionRange createFromVersionSpec( String spec ) public static VersionRange createFromVersionSpec( String spec )
throws InvalidVersionSpecificationException throws InvalidVersionSpecificationException

View File

@ -31,10 +31,18 @@
*/ */
public interface ArtifactMetadata public interface ArtifactMetadata
{ {
/** Whether this metadata should be stored alongside the artifact. */ /**
* Whether this metadata should be stored alongside the artifact.
*
* @return whether this metadata should be stored alongside the artifact
*/
boolean storedInArtifactVersionDirectory(); boolean storedInArtifactVersionDirectory();
/** Whether this metadata should be stored alongside the group. */ /**
* Whether this metadata should be stored alongside the group.
*
* @return whether this metadata should be stored alongside the group
*/
boolean storedInGroupDirectory(); boolean storedInGroupDirectory();
String getGroupId(); String getGroupId();
@ -73,6 +81,7 @@ public interface ArtifactMetadata
* *
* @param localRepository the local repository * @param localRepository the local repository
* @param remoteRepository the remote repository it came from * @param remoteRepository the remote repository it came from
* @throws RepositoryMetadataStoreException in case of issue
* TODO this should only be needed on the repository metadata * TODO this should only be needed on the repository metadata
*/ */
void storeInLocalRepository( ArtifactRepository localRepository, void storeInLocalRepository( ArtifactRepository localRepository,

View File

@ -46,7 +46,7 @@ public interface ProblemCollector
* The next messages will be bound to this source. When calling this method again, previous messages keep * The next messages will be bound to this source. When calling this method again, previous messages keep
* their source, but the next messages will use the new source. * their source, but the next messages will use the new source.
* *
* @param source * @param source a source
*/ */
void setSource( String source ); void setSource( String source );

View File

@ -34,6 +34,7 @@ public interface Source
* Gets a byte stream to the source contents. Closing the returned stream is the responsibility of the caller. * Gets a byte stream to the source contents. Closing the returned stream is the responsibility of the caller.
* *
* @return A byte stream to the source contents, never {@code null}. * @return A byte stream to the source contents, never {@code null}.
* @throws IOException in case of IO issue
*/ */
InputStream getInputStream() InputStream getInputStream()
throws IOException; throws IOException;

View File

@ -49,6 +49,9 @@ int getId()
/** /**
* Helper method to simplify null processing * Helper method to simplify null processing
*
* @param scope a scope or {@code null}
* @return the provided scope or DEFAULT_SCOPE
*/ */
public static ArtifactScopeEnum checkScope( ArtifactScopeEnum scope ) public static ArtifactScopeEnum checkScope( ArtifactScopeEnum scope )
{ {
@ -99,7 +102,7 @@ else if ( id == 5 )
/** /**
* scope relationship function. Used by the graph conflict resolution policies * scope relationship function. Used by the graph conflict resolution policies
* *
* @param scope * @param scope a scope
* @return true is supplied scope is an inclusive sub-scope of current one. * @return true is supplied scope is an inclusive sub-scope of current one.
*/ */
public boolean encloses( ArtifactScopeEnum scope ) public boolean encloses( ArtifactScopeEnum scope )

View File

@ -40,6 +40,9 @@ public interface WagonManager
/** /**
* this method is only here for backward compat (project-info-reports:dependencies) * this method is only here for backward compat (project-info-reports:dependencies)
* the default implementation will return an empty AuthenticationInfo * the default implementation will return an empty AuthenticationInfo
*
* @param id an id
* @return corresponding authentication info
*/ */
AuthenticationInfo getAuthenticationInfo( String id ); AuthenticationInfo getAuthenticationInfo( String id );

View File

@ -311,7 +311,7 @@ private boolean loadMetadata( RepositoryMetadata repoMetadata, ArtifactRepositor
return setRepository; return setRepository;
} }
/** /*
* TODO share with DefaultPluginMappingManager. * TODO share with DefaultPluginMappingManager.
*/ */
protected Metadata readMetadata( File mappingFile ) protected Metadata readMetadata( File mappingFile )

View File

@ -39,6 +39,9 @@ public abstract class AbstractMavenLifecycleParticipant
* *
* This callback is intended to allow extensions to manipulate MavenProjects * This callback is intended to allow extensions to manipulate MavenProjects
* before they are sorted and actual build execution starts. * before they are sorted and actual build execution starts.
*
* @param session the Maven session
* @throws MavenExecutionException in case of issue
*/ */
public void afterProjectsRead( MavenSession session ) public void afterProjectsRead( MavenSession session )
throws MavenExecutionException throws MavenExecutionException
@ -52,6 +55,9 @@ public void afterProjectsRead( MavenSession session )
* This callback is intended to allow extensions to inject execution properties, * This callback is intended to allow extensions to inject execution properties,
* activate profiles and perform similar tasks that affect MavenProject * activate profiles and perform similar tasks that affect MavenProject
* instance construction. * instance construction.
*
* @param session the Maven session
* @throws MavenExecutionException in case of issue
*/ */
// TODO This is too early for build extensions, so maybe just remove it? // TODO This is too early for build extensions, so maybe just remove it?
public void afterSessionStart( MavenSession session ) public void afterSessionStart( MavenSession session )
@ -67,6 +73,9 @@ public void afterSessionStart( MavenSession session )
* allocated external resources after the build. It is invoked on best-effort * allocated external resources after the build. It is invoked on best-effort
* basis and may be missed due to an Error or RuntimeException in Maven core * basis and may be missed due to an Error or RuntimeException in Maven core
* code. * code.
*
* @param session the Maven session
* @throws MavenExecutionException in case of issue
* @since 3.2.1, MNG-5389 * @since 3.2.1, MNG-5389
*/ */
public void afterSessionEnd( MavenSession session ) public void afterSessionEnd( MavenSession session )

View File

@ -31,6 +31,7 @@ public interface ArtifactFilterManager
/** /**
* Returns a filter for core + extension artifacts. * Returns a filter for core + extension artifacts.
* *
* @return the artifact filter
* @deprecated use {@code META-INF/maven/extension.xml} to define artifacts exported by Maven core and plugin * @deprecated use {@code META-INF/maven/extension.xml} to define artifacts exported by Maven core and plugin
* extensions. * extensions.
*/ */
@ -38,12 +39,15 @@ public interface ArtifactFilterManager
/** /**
* Returns a filter for only the core artifacts. * Returns a filter for only the core artifacts.
*
* @return the artifact filter
*/ */
ArtifactFilter getCoreArtifactFilter(); ArtifactFilter getCoreArtifactFilter();
/** /**
* Exclude an extension artifact (doesn't affect getArtifactFilter's result, only getExtensionArtifactFilter). * Exclude an extension artifact (doesn't affect getArtifactFilter's result, only getExtensionArtifactFilter).
* *
* @param artifactId an artifact id
* @deprecated use {@code META-INF/maven/extension.xml} to define artifacts exported by Maven core and plugin * @deprecated use {@code META-INF/maven/extension.xml} to define artifacts exported by Maven core and plugin
* extensions. * extensions.
*/ */

View File

@ -45,6 +45,8 @@ public interface ProjectDependenciesResolver
* @param scopesToResolve The dependency scopes that should be resolved, may be {@code null}. * @param scopesToResolve The dependency scopes that should be resolved, may be {@code null}.
* @param session The current build session, must not be {@code null}. * @param session The current build session, must not be {@code null}.
* @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}. * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}.
* @throws ArtifactResolutionException in case of resolution issue
* @throws ArtifactNotFoundException if an artifact is not found
*/ */
Set<Artifact> resolve( MavenProject project, Collection<String> scopesToResolve, MavenSession session ) Set<Artifact> resolve( MavenProject project, Collection<String> scopesToResolve, MavenSession session )
throws ArtifactResolutionException, ArtifactNotFoundException; throws ArtifactResolutionException, ArtifactNotFoundException;
@ -57,6 +59,8 @@ Set<Artifact> resolve( MavenProject project, Collection<String> scopesToResolve,
* @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}. * @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}.
* @param session The current build session, must not be {@code null}. * @param session The current build session, must not be {@code null}.
* @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}. * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}.
* @throws ArtifactResolutionException in case of resolution issue
* @throws ArtifactNotFoundException if an artifact is not found
*/ */
Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect, Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
Collection<String> scopesToResolve, MavenSession session ) Collection<String> scopesToResolve, MavenSession session )
@ -71,6 +75,8 @@ Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
* @param session The current build session, must not be {@code null}. * @param session The current build session, must not be {@code null}.
* @param ignoreableArtifacts Artifacts that need not be resolved * @param ignoreableArtifacts Artifacts that need not be resolved
* @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}. * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}.
* @throws ArtifactResolutionException in case of resolution issue
* @throws ArtifactNotFoundException if an artifact is not found
*/ */
Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect, Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
Collection<String> scopesToResolve, MavenSession session, Set<Artifact> ignoreableArtifacts ) Collection<String> scopesToResolve, MavenSession session, Set<Artifact> ignoreableArtifacts )
@ -87,6 +93,8 @@ Set<Artifact> resolve( MavenProject project, Collection<String> scopesToCollect,
* @param session The current build session, must not be {@code null}. * @param session The current build session, must not be {@code null}.
* @return The transitive dependencies of the specified projects that match the requested scopes, never * @return The transitive dependencies of the specified projects that match the requested scopes, never
* {@code null}. * {@code null}.
* @throws ArtifactResolutionException in case of resolution issue
* @throws ArtifactNotFoundException if an artifact is not found
*/ */
Set<Artifact> resolve( Collection<? extends MavenProject> projects, Collection<String> scopes, Set<Artifact> resolve( Collection<? extends MavenProject> projects, Collection<String> scopes,
MavenSession session ) MavenSession session )

View File

@ -29,21 +29,31 @@ public class ArtifactMetadataRetrievalException
extends org.apache.maven.repository.legacy.metadata.ArtifactMetadataRetrievalException extends org.apache.maven.repository.legacy.metadata.ArtifactMetadataRetrievalException
{ {
/** @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)} */ /**
* @param message a message
* @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)}
*/
@Deprecated @Deprecated
public ArtifactMetadataRetrievalException( String message ) public ArtifactMetadataRetrievalException( String message )
{ {
super( message, null, null ); super( message, null, null );
} }
/** @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)} */ /**
* @param cause a cause
* @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)}
*/
@Deprecated @Deprecated
public ArtifactMetadataRetrievalException( Throwable cause ) public ArtifactMetadataRetrievalException( Throwable cause )
{ {
super( null, cause, null ); super( null, cause, null );
} }
/** @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)} */ /**
* @param message a message
* @param cause a cause
* @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)}
*/
@Deprecated @Deprecated
public ArtifactMetadataRetrievalException( String message, public ArtifactMetadataRetrievalException( String message,
Throwable cause ) Throwable cause )

View File

@ -48,6 +48,7 @@ void resolveAlways( RepositoryMetadata metadata, ArtifactRepository localReposit
* @param metadata the metadata to deploy * @param metadata the metadata to deploy
* @param localRepository the local repository to install to first * @param localRepository the local repository to install to first
* @param deploymentRepository the remote repository to deploy to * @param deploymentRepository the remote repository to deploy to
* @throws RepositoryMetadataDeploymentException in case of metadata deployment issue
*/ */
void deploy( ArtifactMetadata metadata, ArtifactRepository localRepository, void deploy( ArtifactMetadata metadata, ArtifactRepository localRepository,
ArtifactRepository deploymentRepository ) ArtifactRepository deploymentRepository )
@ -58,6 +59,7 @@ void deploy( ArtifactMetadata metadata, ArtifactRepository localRepository,
* *
* @param metadata the metadata * @param metadata the metadata
* @param localRepository the local repository * @param localRepository the local repository
* @throws RepositoryMetadataInstallationException in case of metadata installation issue
*/ */
void install( ArtifactMetadata metadata, ArtifactRepository localRepository ) void install( ArtifactMetadata metadata, ArtifactRepository localRepository )
throws RepositoryMetadataInstallationException; throws RepositoryMetadataInstallationException;

View File

@ -189,6 +189,9 @@ public boolean hasVersionRangeViolations()
* TODO this needs to accept a {@link OverConstrainedVersionException} as returned by * TODO this needs to accept a {@link OverConstrainedVersionException} as returned by
* {@link #getVersionRangeViolation(int)} but it's not used like that in * {@link #getVersionRangeViolation(int)} but it's not used like that in
* DefaultLegacyArtifactCollector * DefaultLegacyArtifactCollector
*
* @param e an exception
* @return {@code this}
*/ */
public ArtifactResolutionResult addVersionRangeViolation( Exception e ) public ArtifactResolutionResult addVersionRangeViolation( Exception e )
{ {

View File

@ -113,7 +113,7 @@ public void addDependencies( Set<Artifact> artifacts, List<ArtifactRepository> r
/** /**
* @return {@link List} &lt; {@link String} &gt; with artifact ids * @return {@link List} &lt; {@link String} &gt; with artifact ids
* @throws OverConstrainedVersionException * @throws OverConstrainedVersionException if version specification is over constrained
*/ */
public List<String> getDependencyTrail() public List<String> getDependencyTrail()
throws OverConstrainedVersionException throws OverConstrainedVersionException
@ -172,6 +172,8 @@ public boolean isResolved()
/** /**
* Test whether the node is direct or transitive dependency. * Test whether the node is direct or transitive dependency.
*
* @return whether the node is direct or transitive dependency
*/ */
public boolean isChildOfRootNode() public boolean isChildOfRootNode()
{ {

View File

@ -614,8 +614,8 @@ public Set<String> getRepoIds( List<ArtifactRepository> repositories )
/** /**
* Source from org.apache.maven.repository.legacy.LegacyRepositorySystem#getEffectiveRepositories * Source from org.apache.maven.repository.legacy.LegacyRepositorySystem#getEffectiveRepositories
* *
* @param repositories * @param repositories a list of repositories
* @return * @return corresponding effective repositories
* @since 3.6.1 * @since 3.6.1
*/ */
public List<ArtifactRepository> getEffectiveRepositories( List<ArtifactRepository> repositories ) public List<ArtifactRepository> getEffectiveRepositories( List<ArtifactRepository> repositories )

View File

@ -72,6 +72,7 @@ enum RealmType
/** /**
* @deprecated Use {@link #getParentImports()} instead. * @deprecated Use {@link #getParentImports()} instead.
* @return imports
*/ */
@Deprecated @Deprecated
List<String> getImports(); List<String> getImports();

View File

@ -31,21 +31,31 @@ public class ArtifactMetadataRetrievalException
{ {
private Artifact artifact; private Artifact artifact;
/** @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)} */ /**
* @param message a message
* @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)}
*/
@Deprecated @Deprecated
public ArtifactMetadataRetrievalException( String message ) public ArtifactMetadataRetrievalException( String message )
{ {
this( message, null, null ); this( message, null, null );
} }
/** @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)} */ /**
* @param cause a cause
* @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)}
*/
@Deprecated @Deprecated
public ArtifactMetadataRetrievalException( Throwable cause ) public ArtifactMetadataRetrievalException( Throwable cause )
{ {
this( null, cause, null ); this( null, cause, null );
} }
/** @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)} */ /**
* @param message a message
* @param cause a cause
* @deprecated use {@link #ArtifactMetadataRetrievalException(String, Throwable, Artifact)}
*/
@Deprecated @Deprecated
public ArtifactMetadataRetrievalException( String message, public ArtifactMetadataRetrievalException( String message,
Throwable cause ) Throwable cause )

View File

@ -217,6 +217,12 @@ public static int doMain( String[] args, ClassWorld classWorld )
* This supports painless invocation by the Verifier during embedded execution of the core ITs. * This supports painless invocation by the Verifier during embedded execution of the core ITs.
* See <a href="http://maven.apache.org/shared/maven-verifier/xref/org/apache/maven/it/Embedded3xLauncher.html"> * See <a href="http://maven.apache.org/shared/maven-verifier/xref/org/apache/maven/it/Embedded3xLauncher.html">
* <code>Embedded3xLauncher</code> in <code>maven-verifier</code></a> * <code>Embedded3xLauncher</code> in <code>maven-verifier</code></a>
*
* @param args CLI args
* @param workingDirectory working directory
* @param stdout stdout
* @param stderr stderr
* @return return code
*/ */
public int doMain( String[] args, String workingDirectory, PrintStream stdout, PrintStream stderr ) public int doMain( String[] args, String workingDirectory, PrintStream stdout, PrintStream stderr )
{ {

View File

@ -167,7 +167,7 @@ public DefaultModelBuilder(
/** /**
* @deprecated since Maven 4 * @deprecated since Maven 4
* @see DefaultModelBuilderFactory#set * @see DefaultModelBuilderFactory#setModelProcessor(ModelProcessor)
*/ */
@Deprecated @Deprecated
public DefaultModelBuilder setModelProcessor( ModelProcessor modelProcessor ) public DefaultModelBuilder setModelProcessor( ModelProcessor modelProcessor )
@ -223,7 +223,7 @@ public DefaultModelBuilder setModelInterpolator( ModelInterpolator modelInterpol
/** /**
* @deprecated since Maven 4 * @deprecated since Maven 4
* @see DefaultModelBuilderFactory#set * @see DefaultModelBuilderFactory#setModelPathTranslator(ModelPathTranslator)
*/ */
@Deprecated @Deprecated
public DefaultModelBuilder setModelPathTranslator( ModelPathTranslator modelPathTranslator ) public DefaultModelBuilder setModelPathTranslator( ModelPathTranslator modelPathTranslator )
@ -279,7 +279,7 @@ public DefaultModelBuilder setInheritanceAssembler( InheritanceAssembler inherit
/** /**
* @deprecated since Maven 4 * @deprecated since Maven 4
* @see DefaultModelBuilderFactory#set * @see DefaultModelBuilderFactory#setProfileSelector(ProfileSelector)
*/ */
@Deprecated @Deprecated
public DefaultModelBuilder setProfileSelector( ProfileSelector profileSelector ) public DefaultModelBuilder setProfileSelector( ProfileSelector profileSelector )

View File

@ -39,7 +39,7 @@
* Could encode these variants as subclasses, but kept in one for now * Could encode these variants as subclasses, but kept in one for now
* *
* @author bbusjaeger * @author bbusjaeger
* @param <T> * @param <T> the model type
*/ */
public class Result<T> public class Result<T>
{ {

View File

@ -2640,7 +2640,7 @@ protected KeyComputer<Exclusion> getExclusionKey()
/** /**
* Use to compute keys for data structures * Use to compute keys for data structures
* @param <T> * @param <T> the data structure type
*/ */
@FunctionalInterface @FunctionalInterface
public interface KeyComputer<T> extends Function<T, Object> public interface KeyComputer<T> extends Function<T, Object>