Class AbstractPlatformModelMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
ai.timefold.solver.tools.maven.AbstractPlatformModelMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
ConfigureMojo, DeployModelMojo, UndeployModelMojo
public abstract class AbstractPlatformModelMojo
extends org.apache.maven.plugin.AbstractMojo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringURL to the platform that model should be deployed toprotected booleanDetermines if the model registration should automatically subscribe/unsubscribe to the registered modelprotected HttpClientprotected StringUnique key used to register model with - used also when unregisteringprotected com.fasterxml.jackson.databind.ObjectMapperprotected StringURL to the platform that model should be deployed tostatic final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected org.apache.maven.execution.MavenSessionFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureHttpRequest(HttpRequest.Builder builder) protected StringResolves the configured platform URL, stripping any trailing slashes so it can be safely concatenated with a path that starts with a slash (e.g.protected <T> TgetPropertyOrParameter(String propertyName, T parameter) protected com.fasterxml.jackson.databind.node.ObjectNodereadModelDescriptor(Path modelDescriptorArchivePath) protected voidvalidate()Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
PROP_DRY_RUN
- See Also:
-
PROP_PLATFORM_URL
- See Also:
-
PROP_MODEL_KEY
- See Also:
-
PROP_MODEL_TENANTS
- See Also:
-
PROP_MODEL_SUBS
- See Also:
-
session
@Parameter(defaultValue="${session}", readonly=true) protected org.apache.maven.execution.MavenSession session -
buildDirectory
@Parameter(defaultValue="${project.build.directory}", required=false) protected String buildDirectoryURL to the platform that model should be deployed to -
platformUrl
URL to the platform that model should be deployed to -
key
Unique key used to register model with - used also when unregistering -
handleSubscription
@Parameter(property="timefold.model.handleSubscription", required=false, defaultValue="false") protected boolean handleSubscriptionDetermines if the model registration should automatically subscribe/unsubscribe to the registered model -
mapper
protected com.fasterxml.jackson.databind.ObjectMapper mapper -
httpClient
-
-
Constructor Details
-
AbstractPlatformModelMojo
public AbstractPlatformModelMojo()
-
-
Method Details
-
configureHttpRequest
-
validate
protected void validate() -
getPlatformUrl
Resolves the configured platform URL, stripping any trailing slashes so it can be safely concatenated with a path that starts with a slash (e.g. "/api/platform/v1/..."). -
readModelDescriptor
protected com.fasterxml.jackson.databind.node.ObjectNode readModelDescriptor(Path modelDescriptorArchivePath) throws IOException - Throws:
IOException
-
getPropertyOrParameter
-
getTenants
-