Issue Details (XML | Word | Printable)

Key: ARCHETYPE-65
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Wendy Smoak
Votes: 2
Watchers: 2
Operations

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

Restore the ability to "package" non-Java resources

Created: 03/Mar/07 08:25 PM   Updated: 24/Sep/08 03:14 PM   Resolved: 25/Mar/08 06:44 PM
Return to search
Component/s: Creator
Affects Version/s: 1.0-alpha-4
Fix Version/s: 2.0-alpha-1

Time Tracking:
Not Specified

File Attachments: 1. Text File archetype-resource-package-interpolation.patch (2 kB)

Issue Links:
Duplicate
 
Related
 


 Description  « Hide

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.

http://mail-archives.apache.org/mod_mbox/maven-commits/200604.mbox/%3C20060403072414.51468.qmail@minotaur.apache.org%3E

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/



Wendy Smoak made changes - 08/Mar/07 12:43 PM
Field Original Value New Value
Link This issue is duplicated by ARCHETYPE-54 [ ARCHETYPE-54 ]

Raphaël Piéroni added a comment - 24/Jul/07 11:57 AM

This issue will be fixed by NG-alpha-1


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 ]
Wendy Smoak added a comment - 24/Sep/08 02:35 PM

How was this addressed? ARCHETYPE-203 implies that it was not fixed for archetype:create, but that it does work with archetype:generate.


Wendy Smoak made changes - 24/Sep/08 02:38 PM
Link This issue is depended upon by ARCHETYPE-203 [ ARCHETYPE-203 ]
Wendy Smoak made changes - 24/Sep/08 02:38 PM
Link This issue is depended upon by ARCHETYPE-203 [ ARCHETYPE-203 ]
Wendy Smoak made changes - 24/Sep/08 02:38 PM
Link This issue relates to ARCHETYPE-203 [ ARCHETYPE-203 ]
Raphaël Piéroni added a comment - 24/Sep/08 03:14 PM

Yup,
I leaved this intentionnaly in archetype:create as archetype:generate encompass the archetype:create behaviour.

But it obviously works with archetype/generate and new kind of archetypes. Migrating old kind of archetypes to new kind is still to be done.

Raphaël