Author: wsmoak
Date: Sat Mar  3 18:35:28 2007
New Revision: 514338

URL: http://svn.apache.org/viewvc?view=rev&rev=514338
Log:
Update with information on package.html and packaging non-Java resources.

Modified:
    maven/sandbox/trunk/archetype/maven-archetype-quickstart/README.txt
    
maven/sandbox/trunk/archetype/maven-archetype-quickstart/src/main/resources/META-INF/archetype.xml

Modified: maven/sandbox/trunk/archetype/maven-archetype-quickstart/README.txt
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/archetype/maven-archetype-quickstart/README.txt?view=diff&rev=514338&r1=514337&r2=514338
==============================================================================
--- maven/sandbox/trunk/archetype/maven-archetype-quickstart/README.txt 
(original)
+++ maven/sandbox/trunk/archetype/maven-archetype-quickstart/README.txt Sat Mar 
 3 18:35:28 2007
@@ -10,11 +10,14 @@
 Observations:
 
  * <resource> elements in the archetype descriptor are placed relative to
- src/main/resources, not src/main/resources/[package]
+ src/main/resources, not src/main/resources/[package].
+ This is the desired behavior and should not be changed.
 
  * In prior versions of the archetype plugin, it was possible to list non-Java
  resources under <sources> and have them "packaged". For example:
- <source>src/main/resources/App.properties</source>
+ <source>src/main/resources/App.properties</source> and 
+ "mvn archetype:create ... -DgroupId=com.example" would result in
+ src/main/resources/com/example/App.properties
 
  * Some non-Java files in src/main/java are simply ignored. Javadoc related
  files such as package.html belong with the source code so that (by default)
@@ -83,7 +86,27 @@
 
 This works, and places the overview.html file directly in src/main/java.
 
+* Research
+
+ http://jira.codehaus.org/browse/ARCHETYPE-62
+ 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.
+
+ Re: the inability to arrange non-Java resources in a package structure,
+ r390971 20060403 brett added the 'Template X not in directory Y' exception
+ DefaultArchetype.java:867
+ 
+ DefaultArchetype.java:803 has 'false' to indicate no packaging for resources
+ (This is correct, otherwise src/main/resources/META-INF would not work.)
+ 
 * Related Links
+
+ Restore the ability to "package" non-Java resources
+ http://jira.codehaus.org/browse/ARCHETYPE-65
  
  Allow Non-Java Resources in sources/testSources to be included in an archetype
  http://jira.codehaus.org/browse/ARCHETYPE-62

Modified: 
maven/sandbox/trunk/archetype/maven-archetype-quickstart/src/main/resources/META-INF/archetype.xml
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/archetype/maven-archetype-quickstart/src/main/resources/META-INF/archetype.xml?view=diff&rev=514338&r1=514337&r2=514338
==============================================================================
--- 
maven/sandbox/trunk/archetype/maven-archetype-quickstart/src/main/resources/META-INF/archetype.xml
 (original)
+++ 
maven/sandbox/trunk/archetype/maven-archetype-quickstart/src/main/resources/META-INF/archetype.xml
 Sat Mar  3 18:35:28 2007
@@ -2,8 +2,13 @@
   <id>quickstart</id>
   <sources>
     <source>src/main/java/App.java</source>
-    <source>src/main/java/package.html</source>
+    
+    <!-- package.html is always ignored.  See ARCHETYPE-62 -->
+    <!-- <source>src/main/java/package.html</source> -->
+    
+    <!-- source elements in other than src/main/java cause an error -->
     <source>src/main/resources/App.properties</source>
+    
   </sources>
   <resources>
     <resource>src/main/java/overview.html</resource>


Reply via email to