Maven Plugin
The Anteater Maven Plugin provides two primary goals to interact with the Anteater framework: ae:run
and ae:do
. These goals allow you to either start the Anteater desktop application or execute Anteater recipes via the command-line interface (CLI). Below is a guide to help you set up the Maven plugin and examples for using its goals.
Preparing to start
Before using the Anteater Maven Plugin, ensure that the following prerequisites are met:
Prerequisites:
- Java Installation:
-
Java 8 or higher must be installed.
-
Verify your Java installation by running:
$ java -version
-
- If Java is not installed, download it from the official Java website.
-
Maven Installation:
-
Apache Maven must be installed and configured.
-
Verify Maven installation by running:
$ mvn -version
-
If Maven is not installed, download it from the Maven website.
-
-
Anteater Project:
- You need an Anteater Maven project to work with. You can create your own project or use a sample project:
- Example AE Maven Project
- Example Recipes
Configuring
To use the Anteater Maven Plugin, add the following configuration to your pom.xml
file:
<build>
...
<plugins>
<plugin>
<groupId>com.ganteater</groupId>
<artifactId>ae-maven-plugin</artifactId>
<version>${ae.version}</version>
<configuration>
<!-- Specify default configurations for Anteater -->
...
</configuration>
<dependencies>
<!--
You can add require additional anteater plugins to extend functionality.
To support these commands, include the required Anteater plugin dependencies in your project.
You can find available Anteater plugins and their documentation at:
https://ganteater.com/ae-plugins/
-->
...
<!-- Required 3rd Party Dependencies -->
...
</dependencies>
</plugin>
...
</plugins>
</build>
This configuration enables the Anteater Maven Plugin in your project.
Examples of using
1. Starting the Anteater Desktop Application (ae:run
)
The ae:run
goal launches the Anteater desktop application, providing a graphical user interface (GUI) for working with recipes, managing plugins, and executing workflows.
Command:
mvn ae:run
Description:
- This command starts the Anteater desktop application.
- Use this mode if you prefer an interactive GUI for managing Anteater recipes and workflows.
Example Output:
- The Anteater desktop application launches, allowing you to interact with recipes visually.
2. Running Anteater via CLI (ae:do
)
The ae:do
goal executes Anteater recipes directly through the command-line interface (CLI). This is ideal for automation, scripting, or headless execution of recipes.
Command:
$ mvn ae:do -Drecipes=<recipe_name_1>,<recipe_name_2>
Description:
- Replace
<recipe_name>
with the name of the recipe you want to execute. - Use this mode for running recipes in a non-interactive, scriptable environment.
Example:
To execute a recipe named example-recipe.recipe
:
$ mvn ae:do -Drecipes=example-recipe.recipe
Additional Notes
-
Recipe Files:
-
Ensure that the recipe files are located in the appropriate directory within your Anteater project. The plugin will look for recipes in the configured directory.
-
Customizing Plugin Behavior:
-
You can pass additional parameters to customize how the plugin runs recipes. For example:
$ mvn ae:do -Drecipes=example-recipe.recipe -DconfigName=<Configuration_Name>
- Error Handling:
- If a recipe fails, the CLI will output error messages to help you debug and resolve issues.
Summary
The Anteater Maven Plugin provides a seamless way to interact with the Anteater framework, whether through the desktop application (ae:run
) or the command-line interface (ae:do
). By following the setup instructions and using the provided examples, you can quickly integrate Anteater into your workflows for testing, automation, and system management.