I am using the maven assembly plugin so that I can include specific dependencies(basically I want to
include specific transitive dependencies) class in my jar file. Here is my relevant code snippet from the pom.xml -
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
Looks like it is possible from link http://maven.apache.org/plugins/maven-assembly-plugin/advanced-descriptor-topics.html But as soon as mention below code snippet to include two types of dependencies com.companyA.* and com.companyB.* ,except that I do not want to exclude all other dependencies
<dependencySets>
<dependencySet>
<includes>
<include>com.companyA.*</include>
<include>com.companyB.*</include>
</includes>
</dependencySet>
</dependencySets>
But pom.xml says invalid content for dependencySets. I don't know how to achieve objective here?