I've been trying to accomplish two things that I figured would be pretty trivial with Maven (I'm using 3.0.3 and the latest versions of all the plugins), but no matter what I do I can't seem to make it work. I need to:
- Copy all of the files (they're images) from build/javadoc-css/resources/ (relative to project root) to the resources/ directory in the Javadoc output. The stylesheet I'm using references images in that resources directory, and I need to copy the associated images into that resources/ directory. So far, it appears you can only copy files in doc-files/ directories. I'm hoping I'm missing something, because that is seriously lacking.
- Copy all of the files (LICENSE.txt and NOTICE.txt, which I figured were common things that everyone needs to copy) from build/jar/META-INF to the META-INF directories in all of my output jars. (Note: I don't want to put the META-INF directory with my LICENSE and NOTICE files in the source directory, because I have many modules, and I don't want many copies of these files.)
To accomplish #1, I have focused my efforts on the <javadocDirectory> and <docfilessubdirs> tags, but these only work with doc-files/ directories it appears.
For #2, I've tried several variations of the <resource> tag:
Variation #1:
<resource>
<directory>build/jar/META-INF</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>LICENSE.txt</include>
<include>NOTICE.txt</include>
</includes>
</resource>
Variation #2:
<resource>
<directory>build/jar</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>META-INF</include>
</includes>
</resource>
Variation #3:
<resource>
<directory>build/jar/META-INF</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>**</include>
</includes>
</resource>
No errors or files in the wrong place. It's just like my resource tags weren't even there. Nothing happens.