I am using Maven 3.0.5.
I'm attempting to use maven-shade-plugin to merge the *.class and *.java
files from an artifact in my repository into a single jar, along with some
resource files in the current project. However while the resource and
*.class files are in the new artifact's jar, the *.java files aren't there.
The dependency has both a *.jar and a *-sources.jar are in the repository.
The dependency looks like:
<dependency>
<groupId>com.mycorp.database</groupId>
<artifactId>thedb</artifactId>
<version>${project.version}</version>
</dependency>
As I said, both thedb-VER.jar and thedb-VER-sources.jar exist.
My plugin looks like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<includeSources>true</includeSources>
<filters>
<filter>
<artifact>com.mycorp.database:thedb</artifact>
<includes>
<include>**/*.java</include>
<include>**/*.class</include>
</includes>
<excludes>
<exclude>META-INF/*</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
How to I get the source files in my new artifact's jar (call it
thedb-new-VER.jar).
--
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v, 121-24)