hop:build
Assembles a custom Apache Hop distribution. It downloads (or resolves through Maven) the configured Hop client zip, unzips it safely into a hop/ folder under workdir, enriches it with extra JDBC drivers, libs, javaagent jars, custom transforms, marketplace plugins and in-place jar overrides, then merges the baseDirectory content on top (so user files win). Finally it packages the result as a zip and optionally attaches it to the build.
This mojo is also the base for the run/encrypt/gui/server goals, which reuse the very same distribution assembly and only differ in the script they execute.
Coordinates
<plugin>
<groupId>io.yupiik.hop</groupId>
<artifactId>hop-maven-plugin</artifactId>
<version>1.0.1-SNAPSHOT</version>
</plugin>
To call this goal from the command line execute: mvn hop:build.
To bind this goal in the build you can use:
<plugin>
<groupId>io.yupiik.hop</groupId>
<artifactId>hop-maven-plugin</artifactId>
<version>1.0.1-SNAPSHOT</version>
<executions>
<execution>
<id>my-execution</id>
<goals>
<goal>build</goal>
</goals>
<configuration>
<!-- execution specific configuration come there -->
</configuration>
</execution>
</executions>
</plugin>
You can execute this goal particularly with mvn hop:build@my-execution command.
Configuration
-
action2ArtifactMapping (
Map) -
Override mappings from action plugin id to the artifact (artifactId or full groupId:artifactId:version coordinates) shipping it. Entries take precedence over the built-in table; the default rule is org.apache.hop:hop-action-<id>.
-
attach (
boolean) -
Whether to attach the packaged distribution to the build. Default value:
true. Property:${hop.build.attach}.
-
autoResolve (
boolean) -
Resolve the Hop plugin artifacts (transforms and actions) declared by the rendered diagrams with the Maven resolver, stage them and register them into the Hop registry programmatically. This removes the need to add hop-transform-* / hop-action-* modules as dependencies of this plugin for icon rendering. No JVM-global property is set; the resolution/staging phase runs outside any lock and the registration is serialized on HopEnvironment.class so several mojos can run concurrently in the same build. Default value:
false. Property:${hop.autoResolve}.
-
autoResolvePluginsFolder (
java.io.File) -
Staging folder where auto-resolved plugin jars are copied (plugin jar at the root, dependencies in a lib/ sub-folder). Only used when autoResolve is enabled. Property:
${hop.autoResolvePluginsFolder}.
-
autoResolveVersion (
String) -
Version used when a mapped artifact is given as a bare hop-transform-<id> artifactId (no explicit version). Defaults to the Hop version this plugin runs against when it can be detected, otherwise Apache Hop dependency version. Property:
${hop.autoResolveVersion}.
-
baseDirectory (
java.io.File) -
Folder whose content is copied relatively on top of the assembled hop/ distribution (injecting or overriding configuration). Defaults to src/main/hop/distribution. Default value:
${project.basedir}/src/main/hop/distribution. Property:${hop.build.baseDirectory}.
-
cacheDistribution (
boolean) -
Whether a distribution downloaded from a URL is cached into the Maven local repository so later runs resolve it without re-downloading. The cache uses the synthetic coordinates io.yupiik.hop.cache:<filename>:zip:<url-hash>:<version>. Default value:
true. Property:${hop.build.cacheDistribution}.
-
classifier (
String) -
Classifier used when attaching the packaged distribution. Property:
${hop.build.classifier}.
-
configFile (
java.io.File) -
JSON file declaring the Hop variables to inject before diagrams are resolved and rendered. The file may be a canonical Hop project-config.json (reading config.variables) or any JSON exposing a top-level variables array, each entry being {name, value, description}. Property:
${hop.configFile}.
-
customizations (
io.yupiik.hop.maven.mojo.configuration.Customizations) -
Final customization of the assembled distribution: deletions remove files (ant-style relative globs, directories removed recursively) and additions copy a resolved dependency at a relative target path. Deletions run first, additions last, so an addition can replace a deleted path. Both are guarded so nothing outside the distribution root can be touched.
-
downloadTimeoutMinutes (
long) -
Timeout in minutes for downloading a distribution from a URL. Large distributions on slow links may need more than the default. Default value:
15. Property:${hop.build.downloadTimeoutMinutes}.
-
drivers (
List) -
Extra JDBC driver coordinates copied into hop/lib/jdbc.
-
excludes (
List) -
Ant-style glob patterns excluding files from processing. Property:
${hop.excludes}.
-
headers (
Map) -
Map of additional headers to send on the download request; the username/password credentials (or the matching settings.xml server) take precedence for Authorization.
-
hopFolder (
java.io.File) -
Folder where the assembled distribution is written before the enrichment (the hop/ folder lives underneath workdir ). Default value:
${project.build.directory}/hop-build/hop. Property:${hop.build.hopFolder}.
-
hopVersion (
String) -
Version of the Hop distribution targeted by versionUrl ( \${version} placeholder). Property: `\$ {hop.build.version}`.
-
includes (
List) -
Ant-style glob patterns selecting files to process (applied to the source-relative path). Property:
${hop.includes}.
-
javaagents (
List) -
Extra -javaagent coordinates copied into hop/lib and injected into the scripts. Each may carry =args appended to the javaagent.
-
libs (
List) -
Extra library coordinates copied into hop/lib.
-
metadataFolder (
java.io.File) -
The metadata base folder holding the HOP metadata (rdbms, run configurations, ...). Defaults to <project.basedir>/metadata, matching the canonical Hop metadataBaseFolder={PROJECT_HOME/metadata}. Property:
${hop.metadataFolder}.
-
overrides (
List) -
In-place jar overrides: a relative path inside the distribution replaced by a resolved dependency coordinate.
-
packageDistribution (
boolean) -
Whether to package the assembled distribution as a zip. Default value:
true. Property:${hop.build.package}.
-
password (
String) -
Explicit password for the download. When it starts with Bearer it is used as a bearer token (the username becomes the header name, default Authorization). Property:
${hop.build.password}.
-
plugins (
List) -
Marketplace/plugin coordinates resolved from Maven and installed into the distribution plugins tree, with the category derived from the artifactId.
-
recursive (
boolean) -
Recurse into sub-folders of sourceFolder . Default value:
true. Property:${hop.recursive}.
-
skipRootFolderOnUnzip (
boolean) -
Strip the leading root folder when unzipping the distribution (canonical Hop layout). The upstream zip has a hop/ root so this defaults to true. Default value:
true. Property:${hop.build.skipRootFolderOnUnzip}.
-
sourceFolder (
java.io.File) -
Root folder where HOP diagram files (.hpl, .hwf) are searched. Defaults to the project base dir, following the Apache Hop convention where pipelines and workflows are stored directly in the project folder. Property:
${hop.sourceFolder}.
-
transform2ArtifactMapping (
Map) -
Override mappings from transform plugin id to the artifact (artifactId or full groupId:artifactId:version coordinates) shipping it. Entries take precedence over the built-in table; the default rule is org.apache.hop:hop-transform-<id>.
-
transforms (
List) -
Custom transform coordinates resolved from Maven and installed into hop/plugins/transforms.
-
username (
String) -
Explicit username for the download (basic auth, or the header name for a bearer token). Property:
${hop.build.username}.
-
versionUrl (
String) -
Location of the Hop distribution to enrich. When it contains a / it is an HTTP(S) URL with an optional \${hop.version} placeholder (a \$ {version} placeholder is also accepted when the value is passed raw via -D on the CLI); otherwise it is a Maven coordinate (groupId:artifactId:version[:type[:classifier]]) resolved through the Maven resolver. The placeholders are replaced with hopVersion . The literal value scratch (or a blank value) assembles a scratch distribution: no client zip is downloaded, unzipped or cached. Only the custom content (drivers, libs, javaagents, transforms, plugins, overrides and the baseDirectory merge) is produced inside an otherwise empty hop/ folder. This is useful to stack custom Hop content on top of a base distribution image (for example via Jib's from + layer filters) without re-downloading the full Hop distribution. Note that in scratch mode there is no base hop-*.sh script, so injected javaagents are staged in lib/ but not wired into a launcher. The run/encrypt/gui/server goals accept the same scratch value: they then log a warning, skip the unzip and assemble only the custom content (plus your baseDirectory) so you can supply a launcher yourself and fake a distribution. Default value:
https://downloads.apache.org/hop/${hop.version}/apache-hop-client-${hop.version}.zip. Property:${hop.build.versionUrl}.
-
workdir (
java.io.File) -
Working directory where the distribution zip is downloaded and unzipped. Property:
${hop.build.workdir}.
-
zipFile (
java.io.File) -
Output zip of the assembled distribution. Default value:
${project.build.directory}/${project.build.finalName}.zip. Property:${hop.build.zipFile}.