I've written my own java doclet and want to package it into a single jar file to use it later on.
I'm currently using maven with these settings to generate it:
<build>
<finalName>Doclet</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>de.test.tools.doclet.Doclet</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<!-- Maven Assembly Plugin -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-my-jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>de.test.tools.doclet.Doclet</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
Problem:
Everything is properly packaged into the jar but my sources are missing.
If I try to do a simple mvn package
it tells me that the sun package doesn't exist.
error: package com.sun.javadoc does not exist
I think the last part is the main reason behind why I can't find my sources in the jar and thus my question is how I can tell maven to ignore those imports.