Class ConfigureMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
ai.timefold.solver.tools.maven.AbstractPlatformModelMojo
ai.timefold.solver.tools.maven.ConfigureMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="configure",
defaultPhase=INITIALIZE,
requiresDependencyResolution=COMPILE)
public class ConfigureMojo
extends AbstractPlatformModelMojo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringNamespace that model is associated withprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class AbstractPlatformModelMojo
buildDirectory, handleSubscription, httpClient, key, mapper, platformUrl, PROP_DRY_RUN, PROP_MODEL_KEY, PROP_MODEL_SUBS, PROP_MODEL_TENANTS, PROP_PLATFORM_URL, PROP_SERVER_ID, serverId, sessionFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()protected org.apache.maven.project.MavenProjectprotected StringResolves the namespace the model is deployed under, which becomes the group of the container image.protected booleanprotected voidTimefold Platform only accepts models that inherit fromtimefold-solver-service-parentand that are built with the Enterprise Edition.Methods inherited from class AbstractPlatformModelMojo
configureHttpRequest, fetchPlatformIdentityInfo, getAccessTokenProvider, getPlatformUrl, getPropertyOrParameter, getTenants, printErrorInfo, readErrorField, readErrorMessage, readModelDescriptor, requireAccessToken, setAccessTokenProvider, validateMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
PROP_NAMESPACE
- See Also:
-
PROP_MODEL_NATIVE_SUPPORTED
- See Also:
-
PROP_MODEL_CONFIG_SKIP
- See Also:
-
namespace
Namespace that model is associated with
-
-
Constructor Details
-
ConfigureMojo
public ConfigureMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
resolveNamespace
protected String resolveNamespace(PlatformIdentityInfo info) throws org.apache.maven.plugin.MojoFailureException Resolves the namespace the model is deployed under, which becomes the group of the container image. It is either configured explicitly, or, when the personal access token is associated with exactly one namespace, that namespace.- Throws:
org.apache.maven.plugin.MojoFailureException- when the namespace is neither configured nor unambiguously derivable from the personal access token; without it the container image cannot be named, so the build must not continue.
-
validateEnterpriseBuild
protected void validateEnterpriseBuild() throws org.apache.maven.plugin.MojoFailureExceptionTimefold Platform only accepts models that inherit fromtimefold-solver-service-parentand that are built with the Enterprise Edition. Such a model builds and deploys successfully, but fails later, when it actually runs, with errors that do not point at the missing profile.- Throws:
org.apache.maven.plugin.MojoFailureException
-
shouldExecute
protected boolean shouldExecute() -
getProject
protected org.apache.maven.project.MavenProject getProject()
-