Issue Details (XML | Word | Printable)

Key: ARCHETYPE-62
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Martin Ahrer
Votes: 4
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Maven Archetype

Allow package.html files to be included in an archetype

Created: 04/Jan/07 03:26 AM   Updated: 25/Mar/08 06:44 PM   Resolved: 25/Mar/08 06:44 PM
Return to search
Component/s: None
Affects Version/s: 1.0-alpha-4
Fix Version/s: 2.0-alpha-1

Time Tracking:
Not Specified


 Description  « Hide

A Java source folder may contain non Java resources such as JavaDoc package.html etc.

<sources>
<source>src/main/java/App.java</source>
<source>src/main/java/package.html</source>
</sources>
<testSources>
<source>src/test/java/AppTest.java</source>
<source>src/main/java/package.html</source>
</testSources>

Currently when specifying non Java resources they don't get distributed in the packaged archetype jar.



Heinrich Nirschl added a comment - 04/Jan/07 07:15 AM

I am struggling with the same problem. Maybe the package.html file should go into src/main/javadoc/package.html but I could not make this work either. I tried to specify it under sources, resources, and siteResources. It simply does not end up in the packaged archetype jar.


Wendy Smoak added a comment - 03/Mar/07 11:46 AM

I've copied the quickstart archetype to the Maven sandbox and added package.html, overview.html and App.properties to demonstrate problems with non-Java resources: http://svn.apache.org/repos/asf/maven/sandbox/trunk/archetype/maven-archetype-quickstart/

The readme file there explains the problems I'm having, including the inability to get package.html into the archetype jar.


Wendy Smoak added a comment - 03/Mar/07 07:04 PM

The package.html file is being excluded by maven-jar-plugin.

http://maven.apache.org/plugins/maven-jar-plugin/xref/org/apache/maven/plugin/jar/AbstractJarMojo.html

39 private static final String[] DEFAULT_EXCLUDES = new String[]{"**/package.html"};
...
152 archiver.getArchiver().addDirectory( contentDirectory, DEFAULT_INCLUDES, DEFAULT_EXCLUDES );

It does not appear to be configurable.


Wendy Smoak added a comment - 03/Mar/07 07:24 PM

Changing the summary to be more specific, since only package.html is a problem.

Other non-Java resources (such as overview.html) do get included in the archetype jar.


Wendy Smoak made changes - 03/Mar/07 07:24 PM
Field Original Value New Value
Summary Allow Non-Java Resources in sources/testSources to be included in an archetype Allow package.html files to be included in an archetype
Raphaël Piéroni added a comment - 24/Jul/07 12:15 PM

This issue will be fixed by NG-alpha-1


Heinrich Nirschl added a comment - 13/Oct/07 01:58 PM

With the patch for MJAR-30 there is now a workaround:
Configure the jar plugin with a dummy exclude to override the default
<configuration>
<excludes>
<exclude>some-file-that-does-not-exist</exclude>
</excludes>
</configuration>


Raphaël Piéroni added a comment - 25/Mar/08 06:44 PM

These issues are addressed since the 2.0-alpha-n version of the plugin


Raphaël Piéroni made changes - 25/Mar/08 06:44 PM
Resolution Fixed [ 1 ]
Fix Version/s 2.0-alpha-1 [ 13519 ]
Status Open [ 1 ] Closed [ 6 ]