Axis2 AAR Maven Plugin : Handling dependencies

Found an old useful thread on handling dependencies in Axis2 AAR maven plugin. Here’s the example plugin configuration in which only needed dependencies are added into the AAR.

<plugin>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-aar-maven-plugin</artifactId>
    <version>1.6-wso2v3</version>
    <extensions>true</extensions>
    <configuration>
        <aarName>Calculator</aarName>
        <fileSets>
            <fileSet>
                <directory>
                    /home/isuru/foo/bar
                </directory>
                <outputDirectory>lib</outputDirectory>
                <includes>
                    <include>cal-dep-1.0.0.jar</include>
                </includes>
            </fileSet>
        </fileSets>
    </configuration>
    <executions>
        <execution>
            <id>create-aar1</id>
            <phase>install</phase>
            <goals>
                <goal>aar</goal>
            </goals>
            <configuration>
                <aarName>
                    Calculator
                </aarName>
                <servicesXmlFile>
                    ${basedir}/src/main/resources/META-INF/services.xml
                </servicesXmlFile>
                <includeDependencies>false</includeDependencies>
            </configuration>
        </execution>
    </executions>
</plugin>