0
votes

I am trying to develop one mule application using eclipse plugin . Mule version is 3.1 . Which will be the base directory of my mule project (is it Mule_Home/apps folder) ?

Or I need to develop it outside of Mule bundle and place corresponding jar file under Mule_Home/lib/user directory ? If so then again need to place mule-config file under apps folder ?

Thank You

6

6 Answers

2
votes

Here's the MuleStudio generated structure:

/lib
/mappings
/mule-project.xml
/src/main/api
/src/main/app
/src/main/java
/src/main/resources
/src/test
/src/test/resources

Your flows go in /src/main/app. Here's a sample pom file to build based on the structure above https://gist.github.com/tjsnell/8147194

2
votes

You can refer below link for the format. https://docs.mulesoft.com/mule-user-guide/v/3.7/application-format

Mule Application Format

The deployment unit of a Mule application encapsulates everything an >application needs to function, such as libraries, custom code, configuration, >deployment descriptor and any environment properties accompanying the >application. It exists in one of two formats:

  • .zip file (a regular archive with a 'zip' extension)

  • unpacked version of the same .zip file (exploded app)

    \- classes                 // application-specific expanded resources (e.g. logging configuration files, properties, etc
    |- lib                     // application-specific jars
    |- plugins                 // application plugins files
    \- lib                  // application shared plugin jars (FROM 3.7 and +)
    |- mule-config.xml         // Main Mule configuration file, also monitored for changes
    |- mule-deploy.properties  // Application deployment descriptor (optional)
    |- mule-app.properties     // custom properties to be added to the registry instance used by the application (optional)
    |- *.grf files             // produced by DataMapper to plot its data mapping
    

Mule supports the deployment of both packaged (zipped) and exploded (unzipped) applications.

You can share libraries between applications via the application deployment descriptor attribute.

0
votes

Tracy Snell is right. I use Anypoint Studio and the Mule source folder on the build path is src/main/app. That's where your mule-app.properties, mule.deploy.properties, and your project_name.xml go.

0
votes

Mule-project.xml is the main xml to define your flow and you can add more xml's flows to your main xml if required and mule-app.properties and mule-deploy.properties will be loaded in the flow by default to acess the tokens.

0
votes

You have to develop your new application in /src/main/app folder. if you want to include any resources like static properties that have to be developed in /src/main/resources folder. if you want to include any java resources that has to be in /src/main/java.