Maven Projects | Non-Maven Projects |
|---|---|
If a pom.xml is found in the projectPath, it will be run with Maven, using the If more control over the lifecycles or arguments is required, the runMaven 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 operation. | 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 ( |
Target Properties
Property Name | Property Code | Required | Description |
|---|---|---|---|
Mule Home |
| If it is not a Maven Project. | Path to a Mule Server Installation |
Maven Home |
| If it is not a Maven Project. | If it is desired to use an external Maven, fill in the Maven Home here. Otherwise, the internal Maven 3.9.11 will be used. |
Maven Environment Script |
| If it is not a Maven Project. | If necessary, provide a script to source variables for use by the Maven Plugin. |
Mule Type |
| For Cloudhub 2.0 | Mule Install Type |
Inputs
Input Name | Input Code | Required | Description |
|---|---|---|---|
Mule Project Path |
| No | This is the folder that typically is named for your application and contains your [src] folder. Relative paths are sourced from the |
http.port |
| No | 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 |
Additional Maven Arguments |
| No | Space-delimited list of additional Maven arguments (e.g. -e -X) |
CloudHub 2.0 Build Process
-
In CloudHub 2.0 (From 10.0.0.2), the build and deployment process is slightly different from other Mule deployment approaches. During the build phase Maven does two main things
- It creates the Mule application artifact (JAR file).
- It pushes that artifact to MuleSoft Exchange (repository).
- To push the artifact to MuleSoft Exchange, credentials are required. Maven reads these credentials from the .m2/settings.xml file.
- So we need to update the .m2/settings.xml file with the required credentials. So we need to update the .m2/settings.xml file with the required credentials.
- By default, Maven uses the settings.xml file inside the .m2 folder. If we want Maven to use a different settings.xml file instead of the default one, we can pass it as an argument while running Maven. (-s /u01/mule-settings.xml). This tells Maven to use the specified settings.xml file instead of the default .m2/settings.xml.
- Know more about it here https://docs.mulesoft.com/exchange/to-publish-assets-maven