mirror of
https://github.com/apache/maven.git
synced 2025-02-21 09:28:30 +00:00
Minor improvements to v4 api ToolchainsBuilder (#1234)
This commit is contained in:
parent
0ea8879eea
commit
e2fc256118
@ -19,7 +19,9 @@
|
||||
package org.apache.maven.api.services;
|
||||
|
||||
import org.apache.maven.api.Service;
|
||||
import org.apache.maven.api.Session;
|
||||
import org.apache.maven.api.annotations.Experimental;
|
||||
import org.apache.maven.api.annotations.Nonnull;
|
||||
|
||||
/**
|
||||
* Builds the effective toolchains from a user toolchains file and/or a global toolchains file.
|
||||
@ -28,11 +30,27 @@
|
||||
public interface ToolchainsBuilder extends Service {
|
||||
|
||||
/**
|
||||
* Builds the effective toolchains of the specified toolchains files.
|
||||
* Builds the effective toolchains for the specified toolchains files.
|
||||
*
|
||||
* @param request the toolchains building request that holds the parameters, must not be {@code null}
|
||||
* @return the result of the toolchains building, never {@code null}
|
||||
* @throws ToolchainsBuilderException if the effective toolchains could not be built
|
||||
*/
|
||||
ToolchainsBuilderResult build(ToolchainsBuilderRequest request);
|
||||
|
||||
/**
|
||||
* Builds the effective toolchains for the specified toolchains sources.
|
||||
*
|
||||
* @param session the {@link Session}, must not be {@code null}
|
||||
* @param globalToolchainsSource The {@link Source} pointing to the global toolchains, must not be {@code null}
|
||||
* @param userToolchainsSource The {@link Source} pointing to the user toolchains, must not be {@code null}
|
||||
* @throws ToolchainsBuilderException if the project cannot be created
|
||||
* @throws IllegalArgumentException if an argument is {@code null} or invalid
|
||||
* @see #build(ToolchainsBuilderRequest)
|
||||
*/
|
||||
@Nonnull
|
||||
default ToolchainsBuilderResult build(
|
||||
@Nonnull Session session, @Nonnull Source globalToolchainsSource, @Nonnull Source userToolchainsSource) {
|
||||
return build(ToolchainsBuilderRequest.build(session, globalToolchainsSource, userToolchainsSource));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user