Gisbert Amm wrote on Tuesday, September 14, 2004 11:32 AM:

[snip]

>> By default Maven searches also templates in the directory
>> ${maven.local.home}/templates i.e. $HOME/.maven/templates. Create
>> subdirectories there (the name of the template equals the directory
>> name), that have own template.jelly scripts. Have a look at the
>> resources of genapp itself to see how a template is written.
> 
> Thanks for the quick response. Now I understand.
> 
> I did jar -xvf ~/maven-1.0/plugins/maven-genapp-plugin-2.2.jar and do
> now find a direcory "web" within "plugin-resources" which
> actually *is*
> the template for a web application.
> 
> I now can copy this directory to $HOME/.maven/templates/myapp (or
> whatever) and then adapt the template.properties according to
> http://maven.apache.org/reference/plugins/genapp/properties.ht
> ml to meet
> my needs and change the content of the template-resources directory
> which will actually be the content of each new project based on this
> template. 
> 
> So far this is straight forward and I just tried it out.
> 
> But when I call
> 
> $> maven -b genapp
> Enter a project template to use: [default]
> myapp
> 
> I get:
> 
> BUILD FAILED
> File......
> /path_to_my_home/.maven/cache/maven-genapp-plugin-2.2/plugin.jelly
> Element... fail Line...... 64
> Column.... 15
> Unable to locate a template named myapp

Hmm. This should work. Can you give it a try and define 
"maven.genapp.template.repository" manually (remember it points to the root of the 
templates)?

> When I try
> 
> $> maven -b genapp
> -Dmaven.genapp.template.dir=/path_to_my_home/.maven/templates/myapp
> 
> at first all seems to work:
> 
> Please specify an id for your application:  [app]
> hi
> Please specify a name for your application:  [Example
> Application] Hi Please specify the package for your
> application:  [my.example]
> 
> build:start:
> 
> But the files are copied into the template itself:
> 
> genapp:
>      [copy] Copying 1 file to /path_to_my_home/.maven/templates/myapp
>      /src/java/my/example [copy] Copying 1 file to
>      /path_to_my_home/.maven/templates/myapp /src/test/my/example
>      [copy] Copying 2 files to
>      /path_to_my_home/.maven/templates/myapp
> /src/test-cactus/my/example [copy] Copying 2 files to
> /path_to_my_home/.maven/templates/myapp [copy] Copying 5 files to
> /path_to_my_home/.maven/templates/myapp   
> 
> What am I doing wrong here? I'm using the current binary from
> the Maven
> download site with JRE 1.4.2-b28 on a SuSE Linux 8.1 Machine. My
> MAVEN_HOME is set to /path_to_my_home/maven-1.0

This is wrong also. Please create an issue in JIRA.

- J�rg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to