Adam, Thanks for the answer...
I tried this solution, but in this case, the packages/directories are always the sames, fixed to "org/myorganization/component/sayhello" in the sample, and not change according to the new project name. Or I would like that this package/directory change according to the groupId given in the archetype command line. I think it is the difference between the archetype/resources/resource tag and the archetype/sources/source tag in the archetype.xml , isn't it ? 2006/8/4, Adam Leggett <[EMAIL PROTECTED]>:
Olivier, From my understanding, I believe in a multi-module archetype, all elements(sources/resources etc) need to be listed as a <resource> in your archetype.xml file. See the myfaces jsfcomponent as an example here: http://svn.apache.org/viewvc/myfaces/maven/trunk/maven-archetype-jsfcomp onents/src/main/resources/META-INF/archetype.xml?view=markup Adam -----Original Message----- From: Olivier Catteau [mailto:[EMAIL PROTECTED] Sent: Friday, August 04, 2006 1:57 PM To: Maven Users List Subject: Creating archetype for multi-module project Hi, I'd like to create my own archetype for multi-module projects. I took and customized the maven-archetype-j2ee-simple archetype at first. I've got a problem when I try to add a java class file in one of the existing modules of my personnal. I added the file App.java in the following directory maven-archetype-j2ee-simple\src\main\resources\archetype-resources\proje cts\logging\src\main\java\. And I modified archetype.xml like that : <archetype> <id>j2ee</id> <sources> <source>projects/logging/src/main/java/App.java</source> <!-- *** THE LINE I ADDED *** --> </sources> <resources> ... <resource>projects/logging/pom.xml</resource> <resource>projects/logging/src/main/java/App.java</resource> ... </resources> </archetype> When I try to use my archetype, I've got this error : Embedded error: Template 'projects/logging/src/main/java/App.java' not in directory 'src/main/java' How to solve this problem ? Thanks. Olivier =========================================================================== The contents of this email are intended for the named addresses and may contain confidential and/or privileged material. If received in error, please contact UPCO head office on +44(0)113 201 0600 and then delete the entire mail from your system. Unauthorised review, distribution, disclosure or other use of information could constitute a breach of confidence. Your co-operation in this matter is greatly appreciated. Every effort has been taken to ensure that this email and any attachments are virus-free. However, UPCO does not make any warranty to this effect, and is not liable for any damage done by an infected email message or attachment. UPCO recommends that all emails and attachments are checked before opening. All views or opinions expressed in this electronic message and its attachements are those of the sender and do not necessarily reflect the views and opinions of The Ultimate People Company Ltd. =========================================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]