Execute Tasks from the Java Application
Goal
After the Java Application is configured, you will execute it to run the anonymization tasks.
- DBmasker command line tools
- Execute using Intellij
- Execute using the Command Line only
Execute tasks using Intellij
- Open the Java application in Intellij as a Maven project
- Click
Add Configuration...
- Click
add new
and selectApplication
- Under Build and Run, provide the Main class
- Default is
example.anonymizer.Anonymizer
- Default is
- In the Program Arguments, write
cmd
Execute using the Command Line
Run the maven install command
mvn install
This will provide you with a target/<name>-0.0.1.jar
file. Execute this file by using
java -jar target/<name>-0.0.1.jar cmd
The DBmasker command line tools
"cmd" is a command that takes continued input from standard input. The program displays the command help text and is ready for commands.
Reading internal config.properties
Commands:
trace - shows more messages
help - shows this page
config - creates a local config.properties used for changing connection parameters
ping - test database connection
tasks - outputs list of tasks
run - runs all tasks except erase and sar tasks
run <tasks> - runs a list of space delimited tasks, erase and sar actions are excluded
erase <task> <params> - runs erase actions for a specified task with a series of space delimited parameters
if parameter contains a space, surround it with quotation marks
sar <task> <params> - creates a SAR export for a specified task with a series of space delimited parameters
xml and json files will be created in working directory
cmd - takes continued input from standard input (stdin)
quit - quits program
>
Use the task
command to list the available tasks. Use the run
command to execute all the tasks. Use the run <task-name>
to execute specific Task Groups or Work Tasks.