JM SDK Maven Plugin Usage Examples

Examples showing how to use all goals and lifecycle phases are provided below.

Running a Goal

Each JM SDK Maven Plugin goal is responsible for executing one specific task. You can run multiple goals in sequence to perform more complex actions.

All goals in this plugin require arguments to be specified, and these can be provided either in property files or as command-line parameters. Each new Maven project provides a number of base parameters configured in the build.properties and transact-auth.properties files. Some examples of base parameters are app.name, archive.file, manager.url, and manager.username.

Defining goal parameters in *.properties files reduces or eliminates the need to pass these parameters on the command line. For example, the tm-sdk:app-scaffold-connect goal, which scaffolds an application package connection, has two mandatory properties: dir and connection.name. If the dir property is defined in a *.properties file, only the connection.name parameter needs to be provided on the command line. The full Maven command looks like this:

mvn initialize tm-sdk:app-scaffold-connect -Dconnection.name="My Connect"

Note that the command above includes the initialize phase which is required by all goals and lifecycle phases to read the base parameter values from build.properties and transact-auth.properties.

The following sections list all of the available goals, and provide a usage example for each goal.

App goals

Goal Command
app-delete mvn initialize tm-sdk:app-delete
app-deploy mvn initialize tm-sdk:app-deploy
app-get mvn initialize tm-sdk:app-get
app-package mvn initialize tm-sdk:app-package
app-scaffold mvn initialize tm-sdk:app-scaffold
app-scaffold-connect mvn initialize tm-sdk:app-scaffold-connect -Dconnection.name="My Connect"
app-scaffold-form mvn initialize tm-sdk:app-scaffold-form -Dform.code="my-form" -Dform.name="My Form" -Dglobal.flag=true
app-scaffold-func mvn initialize tm-sdk:app-scaffold-func -Dfunc.name="My Fluent Form Func" -Dfunc.template="Fluent Function" -Dfunc.package.name="com.func" -Dtrigger="Form Update"
app-svc-test mvn initialize tm-sdk:app-svc-test
app-test mvn initialize tm-sdk:app-test

Archive goals

Goal Command
archive-deploy mvn initialize tm-sdk:archive-deploy

Gen goals

Goal Command
gen-vo mvn initialize tm-sdk:gen-vo -Dform.seed.file="src/main/resources/forms/my-form/formdata.xml" -Dtarget.xpath="//Applicant" -Dvo.package.name="com.vo"

Scm goals

Goal Command
lib-export mvn initialize tm-sdk:lib-export
lib-import mvn initialize tm-sdk:lib-import
scm-clone mvn initialize tm-sdk:scm-clone
scm-diff mvn initialize tm-sdk:scm-diff
scm-project-add mvn initialize tm-sdk:scm-project-add -Dscm.project.name="New SCM Project" -Dscm.project.visibility="Public"
scm-project-clone mvn initialize tm-sdk:scm-project-clone
scm-project-diff mvn initialize tm-sdk:scm-project-diff
scm-project-pull mvn initialize tm-sdk:scm-project-pull -Dscm.force="No"
scm-project-push mvn initialize tm-sdk:scm-project-push -Dscm.force="No"
scm-project-status mvn initialize tm-sdk:scm-project-status
scm-pull mvn initialize tm-sdk:scm-pull -Dscm.force="No"
scm-push mvn initialize tm-sdk:scm-push -Dscm.force="No"

Svc goals

Goal Command
svc-clone mvn initialize tm-sdk:svc-clone -Dclone.service.name="My Fluent Form Security Filter" -Dclone.service.version="0.1.0"
svc-delete mvn initialize tm-sdk:svc-delete
svc-deploy mvn initialize tm-sdk:svc-deploy
svc-imports mvn initialize tm-sdk:svc-imports
svc-package mvn initialize tm-sdk:svc-package
svc-scaffold mvn initialize tm-sdk:svc-scaffold -Dfluent.package.name="com.fluent" -Dfluent.service.name="My Fluent Dynamic Data" -Dfluent.service.template="Fluent Dynamic Data"
svc-scaffold-legacy mvn initialize tm-sdk:svc-scaffold-legacy -Dlegacy.package.name="com.legacy" -Dlegacy.service.name="My Groovy Form Prefill" -Dlegacy.service.template="Groovy Form Prefill"
svc-test mvn initialize tm-sdk:svc-test
svc-test-remote mvn initialize tm-sdk:svc-test-remote
svc-typecheck mvn initialize tm-sdk:svc-typecheck

Running a Lifecycle Phase

A Maven phase represents a stage in the build lifecycle. Each phase is a sequence of one or more goals. Phases are executed in a specified order. This means that if we run a specific phase, it executes all the preceding phases as well as the specified phase and all configured goals.

For example, the app-package phase is the third phase in the App build lifecycle, preceded by the app-imports and app-typecheck phases (see App Lifecycle Phases below). As each phase is linked to a single goal, running the app-package phase is equivalent to running the following goals in this order:

mvn initialize tm-sdk:svc-imports
mvn initialize tm-sdk:svc-typecheck
mvn initialize tm-sdk:app-package

The following sections list all of the available phases, and provide a usage example for each phase.

App Lifecycle Phases

Phase Command
app-imports mvn initialize app-imports
app-typecheck mvn initialize app-typecheck
app-package mvn initialize app-package
app-svc-test mvn initialize app-svc-test
app-test mvn initialize app-test
app-deploy mvn initialize app-deploy

Svc Lifecycle Phases

Phase Command
svc-imports mvn initialize svc-imports
svc-typecheck mvn initialize svc-typecheck
svc-clean mvn initialize svc-clean
svc-package mvn initialize svc-package
svc-test mvn initialize svc-test
svc-deploy mvn initialize svc-deploy