Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-alpha-4
-
Fix Version/s: 2.0-alpha-1
-
Component/s: Creator
-
Labels:None
-
Number of attachments :
Description
Some time ago, the Archetype plugin lost the ability to "package" non-Java resources. The change was committed in April '06, so it would have first appeared in 1.0-alpha-4.
Prior to this change, you could put non-Java files in the <sources> element, for example
<source>src/main/resources/App.properties</source>
and
mvn archetype:create ... -DgroupId=com.example
would result in
src/main/resources/com/example/App.properties
Now, you get an error saying: "Template 'App.properties' is not in directory src/main/java."
One way to fix this is to roll back the changes from lines 682-705 in r390971:
http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype/maven-archetype-core/src/main/java/org/apache/maven/archetype/DefaultArchetype.java?r1=390965&r2=390971&diff_format=h
However if I'm reading the changes right, that will break the ability to have "sub packages".
Maybe we need to leave <sources> alone, and have both <resources> and <packagedResources> ?
There is an example project (based on the quickstart archetype) in the sandbox. It includes App.properties as described above.
http://svn.apache.org/repos/asf/maven/sandbox/trunk/archetype/maven-archetype-quickstart/
Attachments
Issue Links
| This issue is duplicated by: | ||||
| ARCHETYPE-54 | Dynamic archetype resource |
|
|
|
| This issue relates to: | ||||
| ARCHETYPE-203 | resources file don't copy to the proper location |
|
|
|
Related thread: http://www.nabble.com/Change-in-behavior-of-maven-archetype-plugin-t3342851.html