I have read this: maven: multi-module project assembly into single jar
For the accepted answer of that question, my maven version is 2.2.1 and shade
need maven 3.
My parent pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>myGroup</groupId>
<artifactId>x-all</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version>
<modules>
<module>x-framework</module>
<module>x-adaptor</module>
<module>x-plugin</module>
<module>x-utils</module>
<module>x-offline</module>
<module>x-protocols</module>
</modules>
...
I just want to build a x-all-1.0.0-jar-with-dependencies.jar
that includes
- every sub-module class
- every sub-module dependency class (need resolve dependency conflict automatically)
- some resource file(in
x-all/src/main/resources
)
How do I build that?