> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# build(Mule)

> The buildMule operation allows for building Mule projects, whether they are Maven projects or not. It automatically copies the completed zip file over

The buildMule operation allows for building Mule projects, whether they are Maven projects or not. It automatically copies the completed zip file over to the internal artifact repository. It should be used in build workflows.

<table><colgroup><col /><col /></colgroup><tbody><tr><th>**Maven Projects**</th><th>**Non-Maven Projects**</th></tr><tr><td> If a pom.xml is found in the projectPath, it will be run with Maven, using the `package` lifecycle. Any tests will be run during the build process. The output of the tests will be in the plugin execution log.If more control over the lifecycles or arguments is required, the [runMaven](https://docs.flexagon.com/flexdeploy-9-0-documentation/flexdeploy-plugin-guides/flexdeploy-maven-plugin-guide/runmaven.md) operation works exactly the same, except that it doesn't save the artifact to the artifact repository automatically. This can be done with the File - [saveArtifacts](https://docs.flexagon.com/flexdeploy-9-0-documentation/flexdeploy-plugin-guides/flexdeploy-file-plugin-guide/saveartifacts.md) operation.</td><td>This operation should run on the Mule server where the project will be deployed. This allows the project's build to be a more complete test of the environment.If the project is not a Maven project, it will be built using javac and other command line tools.Make sure that the JDK HOME specified on the endpoint is a JDK of the required version.The Mule Home (`FDMULE_HOME)` property is used to find the libraries that are necessary to compile the Mule project.</td></tr></tbody></table>

#   

Target Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Mule Home</td><td>`FDMULE_HOME`</td><td>If it is not a Maven Project.</td><td>Path to a Mule Server Installation</td></tr></tbody></table>

# Inputs

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Input Name**</th><th>**Input Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Mule Project Path</td><td>`FDMULE_PROJECT_PATH`</td><td>No</td><td>This is the folder that typically is named for your application and contains your \[src] folder. Relative paths are sourced from the `FD_TEMP_DIR`.</td></tr><tr><td>http.port</td><td>`FDMULE_HTTP_PORT`</td><td>No</td><td>HTTP port to use when running Maven tests. This should be a different number than the one that is usually used to run the application on the server. This only works if `${http.port}` is used in your HTTP Connector.</td></tr><tr><td>Additional Maven Arguments</td><td>`FDMULE_MVN_ARGS`</td><td>No</td><td>Space-delimited list of additional Maven arguments (e.g. -e -X)</td></tr></tbody></table>

# Artifacts

This operation produces artifacts that will be stored in the artifacts repository.

# Endpoint Selection

This operation will select all available endpoints associated to the Target.  

# Endpoint Execution

This operation will execute on any one of the selected endpoints and will be random in the determination of which one.
