That pointed me the rite direction.

Thanks Martin 


-----Original Message-----
From: Martin Höller [mailto:mar...@xss.co.at] 
Sent: Monday, November 16, 2009 4:35 AM
To: Maven Users List
Subject: Re: Problem in creating own archetype

Hi!

Did your try the create-from-project [0] goal of the maven-archetype-plugin? 
This should give you some good starting point, from which you could adapt the 
archetype to your needs.

hth,
- martin

[0] http://maven.apache.org/plugins/maven-archetype-plugin/advanced-usage.html


Am Samstag, 14. November 2009 00:49:10 schrieb Qureshi,Shahzad [Ontario]:
> I should mention that compile and install of archetype works fine, I 
> am encountering all these issues when I am trying to create the 
> archetype
>
>
>
> -----Original Message-----
> From: Qureshi,Shahzad [Ontario] [mailto:shahzad.qure...@ec.gc.ca]
> Sent: Friday, November 13, 2009 6:46 PM
> To: users@maven.apache.org
> Subject: Problem in creating own archetype
>
> Hi all,
>
> I am trying to convince my group here to start using Maven instead of 
> Ant. I am preparing a demonstration for them and in the process, I am 
> trying to create my own archetype. I've done it before but this time I 
> am stuck at something which I've no idea how to solve.
>
> I want the project directory structure to be
>
> - bin
>   -- file1
>   -- file2.sh
>   -- file3.sh
> - src
>   -- main
>     -- java
>         -- file.java
> + site
> + test
>
> So I've all that setup in archetype-resources folder and here is my 
> archetype.xml within META-INF directory
>
> <archetype>
>   <!-- this id tag should be same as the artifactId in the archetype 
> pom.xml-->
>   <id>archetype_id</id>
>   <sources>
>      <source>src/main/java/App.java</source>
>   </sources>
>   <testSources>
>     <source>src/test/java/AppTest.java</source>
>   </testSources>
>   <resources>
>       <resource>bin/file1</resource>
>       <resource>bin/file2.sh</resource>
>       <resource>bin/file3.sh</resource>
>   </resources>
> </archetype>
>
> The amount of problems I am encountering with something simple as 
> this, I've a feeling that this resources folder is supposed to do 
> something other then what I am trying to do.
>
> Q1- How do I include the bin folder where I want it?
>
> Main problem I am encountering is I haven't been able to figure out 
> how to include the entire directory and its files without specifying 
> each file the way I've shown above and ** doesn't work and neither 
> does specifying a directory and include tag
>
> ANOTHER weird problem is that when Maven encounters that file2.sh, it 
> for some reason tries to open it and parse it because I get an 
> exception like this.... Parser Eception:
> archetype-resources/bin/file2.sh:org.apache.velocity.runtime.parser.Pa
> rs
> eException: Encountered .....
>
> Q2- Why is Maven trying to parse my shell script?
>
> I would appreciate any help you can provide, if I am unable to prove 
> to my group how useful Maven is (this is the only snag left), I am 
> afraid we'll keep using ANT
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org


-- 
Martin Höller                   | martin.hoel...@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-40
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to