tentackle-wizard:script

Full name:

org.tentackle:tentackle-wizard-maven-plugin:25.19.0.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 connects to the database, implements a DomainContextProvider so that on() and op() can be used, and defines the run() method the fragment is inserted into. 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 not marked as thread-safe and thus does not support parallel builds.

Required Parameters

Name Type Since Description
<profiles> List<Profile> - The profiles.
<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.
Default: ${project.build.sourceEncoding}
<darkMode> Boolean - Enables dark mode.
If missing, the mode is determined from the desktop settings.
<entityAliases> String - The entity aliases.
User Property: tentackle.entityAliases
<filesets> List<FileSet> - The list of file sets containing the model.
If set, the modelDir is ignored.
<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.
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>14</version>
  </jdkToolchain>
To deselect the toolchain configured by the maven-toolchain-plugin:
  <jdkToolchain></jdkToolchain>
<loadModelFromDependencies> boolean - Load the model from 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.
Default: WARNING
<modelDefaults> String - The model defaults.
User Property: tentackle.modelDefaults
<modelDir> File - Directory holding the model files to be processed.
Ignored if fileset explicitly given.
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.
<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.
User Property: script
<skip> Boolean - Skips processing.
Defaults to true if packaging is "pom".
<statusDir> File - Directory holding the status info.
Used to store the next free classId per profile in case multiple PDOs are generated without an intermediate mvn clean package/install or wurbel run.
Must be a subdirectory of the target directory to be removed via mvn clean.
Default: ${project.build.directory}/wizard
<templateDir> File - The directory holding the templates.
Default: ${project.basedir}/templates
<themeName> String - Selects the theme.
The AtlantaFX themes are: Primer, Cupertino, and Nord.
The default is Primer.
<verbosity> String - The verbosity.
One of "default", "info" or "debug". Debug is also turned on (if not set explicitly) by Maven's global debug flag (see command line switch -X).
Default: ${tentackle.verbosity}

Parameter Details

<charset>

The encoding to read and write files.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.sourceEncoding}

<darkMode>

Enables dark mode.
If missing, the mode is determined from the desktop settings.
  • Type: java.lang.Boolean
  • Required: No

<entityAliases>

The entity aliases.
  • 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.
  • 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.
  • 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>14</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

<loadModelFromDependencies>

Load the model from 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.
  • Type: java.lang.String
  • Required: No
  • Default: WARNING

<modelDefaults>

The model defaults.
  • Type: java.lang.String
  • Required: No
  • User Property: tentackle.modelDefaults

<modelDir>

Directory holding the model files to be processed.
Ignored if fileset explicitly given.
  • 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.
  • Type: java.util.List<org.tentackle.maven.plugin.wizard.Profile>
  • Required: Yes

<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.
  • Type: java.lang.String
  • Required: No
  • User Property: script

<skip>

Skips processing.
Defaults to true if packaging is "pom".
  • Type: java.lang.Boolean
  • Required: No

<statusDir>

Directory holding the status info.
Used to store the next free classId per profile in case multiple PDOs are generated without an intermediate mvn clean package/install or wurbel run.
Must be a subdirectory of the target directory to be removed via mvn clean.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/wizard

<templateDir>

The directory holding the templates.
  • 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 Primer.
  • 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". Debug is also turned on (if not set explicitly) by Maven's global debug flag (see command line switch -X).
  • Type: java.lang.String
  • Required: No
  • Default: ${tentackle.verbosity}