Loading

How to deploy a Mule 4 application to Runtime Fabric with Maven

Udgivelsesdato: Mar 2, 2024
Opgave

GOAL

To demonstrate with an example of how to deploy a Mule 4 application with maven. This article is complementary to the online document Deploy an Application to Runtime Fabric using Maven (Mule 4)
 
Trin
1. Check out the online document Deploy an Application to Runtime Fabric using Maven (Mule 4) and set up your local maven environment, including the ~/.m2/settings.xml file. 
2. Check the demo project rtf-meetup-demo in the rtf-utilities repository. The rtf-meetup-demo simply send a request to randomuser.me and return the JSON string. Pay attention to the pom.xml file. 
3. Modify the values in the pom.xml per Deploy an Application to Runtime Fabric using Maven (Mule 4)
  • "groupId" is your organization ID
  • "version" the version tag. Please note you need to increase this number manually each time you run "mvn deploy", which uploads to Exchange
  • "publicUrl" specify the value manually per Verify that Inbound Traffic is Enabled. This is required to enable inbound for application in maven deployment
  • Put the value of "username", "password", "clientID" and "secretID" in your ~/.m2/settings.xml so you can reference in your pom file securely. If the app does not pair with an API in API manager, don't need to set the "anypoint.platform.client_id" and "anypoint.platform.client_secret"
  • Specify the proxy values or just remove the properties if you don't use one, refer to How to configure proxy in RTF (RunTime Fabric)
http.nonProxyHosts=localhost
http.proxyHost=<proxy IP>
http.proxyPort=<proxy port>
https.proxyHost=<proxy IP>
https.proxyPort=<proxy port>
java.net.useSystemProxies=false
com.ning.http.client.AsyncHttpClientConfig.useProxySelector=false
com.ning.http.client.AsyncHttpClientConfig.useProxyProperties=true
  • Whitelist the analytics endpoint analytics-ingest.anypoint.mulesoft.com and configuration-resolver.prod.cloudhub.io if you whitelist outgoing traffic with a proxy
4. Upload to exchange. Remember to update the version number manually each time
> cd <path to>/rtf-meetup-demo
> mvn deploy
5. Deploy to RTF
> mvn deploy -DmuleDeploy

(for more verbose logs)
> mvn deploy -DmuleDeploy -X
Vidensartikelnummer

001117019

 
Indlæser
Salesforce Help | Article