WSO2 Developer Studio Maven Support

Content

Maven support for Deployable Artifacts

For each and every project created by WSO2 Developer Studio, you can find a pom file has been created in order to build it using Maven.

New Server Runtime

To build individual level Deployable Artifacts using maven command, go to the project location in the command line and run the command mvn clean install. Once the build was successful, you will see the Deployable Artifact has been created under target folder of your project location.



New Server Runtime

Following deployable artifacts will be generated when you run the maven command.

Artifact Type Project Type
Apache Axis2 Artifact Axis2 Archive [aar]
Web Application Web Application Archive [war]
JAX-WS Artifact Java Archive [jar]
Endpoint Artifact xml
Sequence Artifact xml
Proxy Service Artifact xml
Local Entry Artifact xml
Synapse Configuration xml
ESB Mediator Java Archive [jar]
Registry Resource Registry Resource with necessary meta-data
Registry Handler Artifact OSGI Bundle [jar]
Registry Filter Artifact OSGI Bundle [jar]
Data Service Artifact Data Services Descriptor file [dbs]
Data Services Validator Artifact OSGI Bundle [jar]
BPEL Workflow BPEL Archive [zip]
Gadget Dashboard Archive [dar]
Carbon UI Bundle OSGI Bundle [jar]
Third Party Library Artifact OSGI Bundle [jar]
Carbon Application Project Carbon Application Archive [CAR]

Maven Multi Module Project

As you are already aware of,WSO2 Developer Studio creates separate projects for most of the Deployable Artifacts with a Maven pom file for each Artifact. But if you consider Maven centric development, there we have a Parent Project and then we have couple of Child Modules and a separate Distribution Module which is again a Child module of the Parent Project.

In our attempt to support Maven Centric development in WSO2 Developer Studio, we have introduced this concept of Maven Multi Module project to WSO2 Developer Studio. You can create a Maven Multi Module Project in your workspace and then create your Artifact Projects inside that Maven Multi Module project in a nested manner and then create the Carbon Application Project which is the Distribution module for WSO2 platform.

It is also possible to convert an existing project in to Maven Multi Module Project as well.

Creating a new Maven Multi Module Project

You can create a Maven Multi Module Project by selecting File then New and selecting Project. When you follow these steps, you get the Eclipse New Project Wizard. In the Eclipse New Project Wizard, you can see the WSO2 main category and under that you can see Maven Project sub category. Maven Multi Module Project option is listed under Maven Project sub category.



Maven Project

When you select the Maven Multi Module Project option and select Next, then you will get a new Maven Multi Module Project Wizard.



Maven Project

Unlike other Projects you have seen in WSO2 Developer Studio, in this Project Wizard you need to provide Maven information such as GroupID, ArtifactId and Version. In this case if you are wondering what is going to be your Project Name, it would be the ArtifactId.

Then you can select the Modules you need to include in your Maven Multi Module Project by selecting the Projects from the list of Projects populated in the Wizard.



Maven Project

you can click Finish to complete the wizard.If you open the pom.xmlyou can see the selected projects have been listed asmaven modules



Maven Project

Convert an existing Project in to a Maven Multi Module Project

Right Click on the project and select the GeneratePOM from the menu



Maven Project

Then you can select the Modules you need to include in your Maven Multi Module Project by selecting the Projects from the list of Projects populated in the Wizard.



Maven Project

you can complete the wizard by clicking the Finish button of the wizard.If you open the pom.xmlyou can see the selected projects have been listed asmaven modules



Maven Project