tentackle-wizard:script

Full name:

org.tentackle:tentackle-wizard-maven-plugin:25.20.1.0:script

Description:

Runs a org.tentackle.script.Script using the application's dependencies.
Brings up an FX UI to edit and run a script or runs it in batch mode.

The code a developer writes is only a fragment. It is woven into a harness: a FreeMarker template (provided via the harnesses filesets) that owns the boilerplate — it implements a DomainContextProvider so that on() and op() can be used, and defines the run() method the fragment is inserted into. The script runs within the session opened by the goal, which is made current before the script is executed. The first line of a harness is a she-bang selecting the scripting language (for example #!groovy); it does not land in the generated script.

Since the fragment is inserted into the run() method, it cannot contain import statements itself. Instead, the fragment marks such lines with a leading ^-sign, for example ^import org.tentackle.misc.* in Groovy or ^require 'json' in Ruby. Every line starting with an ^-sign is removed from the fragment, stripped of the ^-sign, and provided to the harness via the imports model variable, which places it at the top level of the generated script.

The FreeMarker model provides four variables: content (the fragment), imports (the import statements extracted from the fragment), language (the language name) and harness (the harness filename).

Attributes:

  • Requires a Maven project to be executed.
  • Executes as an aggregator goal.
  • The goal is thread-safe and supports parallel builds.

Required Parameters

Name Type Since Description
<url> String - The backend URL.
<user> String - The backend username.

Optional Parameters

Name Type Since Description
<charset> String - The encoding to read and write files.
Applied JVM-wide, see determineEncoding() .
Default: ${project.build.sourceEncoding}
<darkMode> Boolean - Enables dark mode.
If missing, the mode follows the desktop settings and changes along with them.
<entityAliases> String - The entity aliases, in the same syntax as in the model source.
User Property: tentackle.entityAliases
<filesets> List<FileSet> - The list of file sets containing the model.
If set, the modelDir is ignored. Each fileset is loaded as a whole directory, i.e. includes and excludes are not applied.
<harness> String - If given, selects the harness to use.
This is the filename without the directory. In interactive mode, the selected harness is shown in the editor. In batch mode, the fragment is run with the selected harness. If there is only one harness, it is selected automatically. An unknown harness fails the goal in both modes.
User Property: harness
<harnesses> List<FileSet> - The harness scripts.
By default, the harness scripts are loaded from the script subdirectory of the templateDir. When given, the filesets are used instead.
Each harness must start with a she-bang line specifying the scripting language, for example, #!groovy. The scripting language must be on the classpath.
The filenames must be unique among all filesets.
<jdkToolchain> Map<String,String> - Toolchain for invocation of external tools.
Explicitly specifies the "jdk" toolchain for this plugin only. Overrides the toolchain selected by the maven-toolchain-plugin, if any.

Example:

  <jdkToolchain>
    <version>25</version>
  </jdkToolchain>
To deselect the toolchain configured by the maven-toolchain-plugin:
  <jdkToolchain></jdkToolchain>
<layers> List<Layer> - Named, isolated ModuleLayers for dependencies that must run isolated from each other - typically because two of them need different, otherwise conflicting versions of the same module, or because the application itself is built with module layers.

If empty (the default), the goal runs exactly as without this feature at all: against the plain plugin classpath (populated the usual way, by declaring the application's dependencies as <dependency> elements of this plugin). If not empty, this plugin builds the configured ModuleLayer graph at goal-execution time and installs the leafLayer's classloader as the thread's context classloader for the duration of the goal - which is what every existing, layer-unaware ServiceFactory.getServiceFinder()/Model.loadFromResources() call (and, for browse/script, the application's own domain/PDO/persistence classes) transparently resolves from. See the layers.md documentation.


See also: leafLayer
<leafLayer> String - The name of the layer holding the application's own PDO/domain/persistence classes, i.e. the layer whose classloader is installed as the thread's context classloader while the goal runs. Required if layers is not empty and must match the name of one of them.
<loadModelFromDependencies> boolean - Load the model from the resources of the plugin dependencies on the classpath.
Default: true
<minLogLevel> String - The minimum logging java.util.logging.Level to redirect java.util logging to the maven logger.
Any name or value accepted by java.util.logging.Level.parse(java.lang.String) .
Default: WARNING
<modelDefaults> String - The model defaults, in the same syntax as in the model source.
User Property: tentackle.modelDefaults
<modelDir> File - Directory holding the model files to be processed.
Ignored if filesets are given, except as the default directory of a fileset without a directory.
Default: ${project.build.directory}/wurbel/model
User Property: tentackle.modelDir
<modelName> String - The model name.
Default: default
User Property: tentackle.modelName
<password> String - The backend password.
<profiles> List<Profile> - The profiles.
Required by the pdo goal (at least one PdoProfile ) and the operation goal (at least one OperationProfile ). Profile names must be unique.
<script> String - The script fragment to run.
If given, enters batch mode and runs the fragment with the selected harness. This is the path to a file holding the fragment, relative to the project's base directory if not absolute.
User Property: script
<skip> Boolean - Skips processing.
If not set, defaults to true if packaging is "pom" and the execution is recursive (see isSkippedByDefault() ).
<statusDir> File - Directory holding the status info.
Used to store the next free class ID per profile in case multiple PDOs are generated without an intermediate build that updates the model.
Should be a subdirectory of the target directory, so that mvn clean removes it.
Default: ${project.build.directory}/wizard
<templateDir> File - The directory holding the templates.
If it does not exist, it is created and the default templates are installed.
Default: ${project.basedir}/templates
<themeName> String - Selects the theme.
The AtlantaFX themes are: Primer, Cupertino, and Nord.
The default is Cupertino on macOS and Primer on all other platforms.
<verbosity> String - The verbosity.
One of "default", "info" or "debug". Other values are treated as "default".
If not set, debug is turned on by Maven's global debug flag (see command line switch -X).
Default: ${tentackle.verbosity}

Parameter Details

<charset>

The encoding to read and write files.
Applied JVM-wide, see determineEncoding() .
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.sourceEncoding}

<darkMode>

Enables dark mode.
If missing, the mode follows the desktop settings and changes along with them.
  • Type: java.lang.Boolean
  • Required: No

<entityAliases>

The entity aliases, in the same syntax as in the model source.
  • Type: java.lang.String
  • Required: No
  • User Property: tentackle.entityAliases

<filesets>

The list of file sets containing the model.
If set, the modelDir is ignored. Each fileset is loaded as a whole directory, i.e. includes and excludes are not applied.
  • Type: java.util.List<org.apache.maven.shared.model.fileset.FileSet>
  • Required: No

<harness>

If given, selects the harness to use.
This is the filename without the directory. In interactive mode, the selected harness is shown in the editor. In batch mode, the fragment is run with the selected harness. If there is only one harness, it is selected automatically. An unknown harness fails the goal in both modes.
  • Type: java.lang.String
  • Required: No
  • User Property: harness

<harnesses>

The harness scripts.
By default, the harness scripts are loaded from the script subdirectory of the templateDir. When given, the filesets are used instead.
Each harness must start with a she-bang line specifying the scripting language, for example, #!groovy. The scripting language must be on the classpath.
The filenames must be unique among all filesets.
  • Type: java.util.List<org.apache.maven.shared.model.fileset.FileSet>
  • Required: No

<jdkToolchain>

Toolchain for invocation of external tools.
Explicitly specifies the "jdk" toolchain for this plugin only. Overrides the toolchain selected by the maven-toolchain-plugin, if any.

Example:

  <jdkToolchain>
    <version>25</version>
  </jdkToolchain>
To deselect the toolchain configured by the maven-toolchain-plugin:
  <jdkToolchain></jdkToolchain>
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Required: No

<layers>

Named, isolated ModuleLayers for dependencies that must run isolated from each other - typically because two of them need different, otherwise conflicting versions of the same module, or because the application itself is built with module layers.

If empty (the default), the goal runs exactly as without this feature at all: against the plain plugin classpath (populated the usual way, by declaring the application's dependencies as <dependency> elements of this plugin). If not empty, this plugin builds the configured ModuleLayer graph at goal-execution time and installs the leafLayer's classloader as the thread's context classloader for the duration of the goal - which is what every existing, layer-unaware ServiceFactory.getServiceFinder()/Model.loadFromResources() call (and, for browse/script, the application's own domain/PDO/persistence classes) transparently resolves from. See the layers.md documentation.


See also: leafLayer
  • Type: java.util.List<org.tentackle.maven.plugin.wizard.Layer>
  • Required: No

<leafLayer>

The name of the layer holding the application's own PDO/domain/persistence classes, i.e. the layer whose classloader is installed as the thread's context classloader while the goal runs. Required if layers is not empty and must match the name of one of them.
  • Type: java.lang.String
  • Required: No

<loadModelFromDependencies>

Load the model from the resources of the plugin dependencies on the classpath.
  • Type: boolean
  • Required: No
  • Default: true

<minLogLevel>

The minimum logging java.util.logging.Level to redirect java.util logging to the maven logger.
Any name or value accepted by java.util.logging.Level.parse(java.lang.String) .
  • Type: java.lang.String
  • Required: No
  • Default: WARNING

<modelDefaults>

The model defaults, in the same syntax as in the model source.
  • Type: java.lang.String
  • Required: No
  • User Property: tentackle.modelDefaults

<modelDir>

Directory holding the model files to be processed.
Ignored if filesets are given, except as the default directory of a fileset without a directory.
  • Type: java.io.File
  • Required: No
  • User Property: tentackle.modelDir
  • Default: ${project.build.directory}/wurbel/model

<modelName>

The model name.
  • Type: java.lang.String
  • Required: No
  • User Property: tentackle.modelName
  • Default: default

<password>

The backend password.
  • Type: java.lang.String
  • Required: No

<profiles>

The profiles.
Required by the pdo goal (at least one PdoProfile ) and the operation goal (at least one OperationProfile ). Profile names must be unique.
  • Type: java.util.List<org.tentackle.maven.plugin.wizard.Profile>
  • Required: No

<script>

The script fragment to run.
If given, enters batch mode and runs the fragment with the selected harness. This is the path to a file holding the fragment, relative to the project's base directory if not absolute.
  • Type: java.lang.String
  • Required: No
  • User Property: script

<skip>

Skips processing.
If not set, defaults to true if packaging is "pom" and the execution is recursive (see isSkippedByDefault() ).
  • Type: java.lang.Boolean
  • Required: No

<statusDir>

Directory holding the status info.
Used to store the next free class ID per profile in case multiple PDOs are generated without an intermediate build that updates the model.
Should be a subdirectory of the target directory, so that mvn clean removes it.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/wizard

<templateDir>

The directory holding the templates.
If it does not exist, it is created and the default templates are installed.
  • Type: java.io.File
  • Required: No
  • Default: ${project.basedir}/templates

<themeName>

Selects the theme.
The AtlantaFX themes are: Primer, Cupertino, and Nord.
The default is Cupertino on macOS and Primer on all other platforms.
  • Type: java.lang.String
  • Required: No

<url>

The backend URL.
  • Type: java.lang.String
  • Required: Yes

<user>

The backend username.
  • Type: java.lang.String
  • Required: Yes

<verbosity>

The verbosity.
One of "default", "info" or "debug". Other values are treated as "default".
If not set, debug is turned on by Maven's global debug flag (see command line switch -X).
  • Type: java.lang.String
  • Required: No
  • Default: ${tentackle.verbosity}