Maven Archetype

Allow package.html files to be included in an archetype

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-alpha-4
  • Fix Version/s: 2.0-alpha-1
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

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.

Activity

Hide
Heinrich Nirschl added a comment -

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.

Show
Heinrich Nirschl added a comment - 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.
Hide
Wendy Smoak added a comment -

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.

Show
Wendy Smoak added a comment - 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.
Hide
Wendy Smoak added a comment -

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.

Show
Wendy Smoak added a comment - 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.
Hide
Wendy Smoak added a comment -

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.

Show
Wendy Smoak added a comment - 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.
Hide
Raphaël Piéroni added a comment -

This issue will be fixed by NG-alpha-1

Show
Raphaël Piéroni added a comment - This issue will be fixed by NG-alpha-1
Hide
Heinrich Nirschl added a comment -

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>

Show
Heinrich Nirschl added a comment - 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>
Hide
Raphaël Piéroni added a comment -

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

Show
Raphaël Piéroni added a comment - These issues are addressed since the 2.0-alpha-n version of the plugin

People

Vote (4)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: