Here is how I do it in my plugin.jelly:

  <goal name="myplugin:genapp">
    <genapp:generate 
      maven.genapp.template.repository="${plugin.resources}/templates"/>
  </goal>

This allows me to do:

    maven myplugin:genapp

When I specify a template, it will look for the directory under my
plugin's templates directory.

--- Laurent PETIT <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I'm unsuccessfully trying to "cleanly" call maven genapp from my own
> plugin.
> 
> My aim is to create a plugin that will hide my templates location from 
> the user, so all the user needs to do is do a plugin:download when new 
> versions of my plugin are available (my plugin will at the end contain 
> much more goals than a genapp wrapper).
> 
> For the moment, I managed to do that with the following tricks :
> My goal in plugin.jelly looks like this :
>    <ant:delete dir="${maven.home.local}/template/simple-webapp"/>
>     <ant:copy todir="${maven.home.local}/template/simple-webapp" 
> preservelastmodified="true">
>       <ant:fileset dir="${plugin.resources}/template/simple-webapp"/>
>     </ant:copy>
>     <attainGoal name="genapp"/>
> 
> And I've set this property in my plugins.properties file :
> maven.genapp.template.repository=${maven.home.local}/template
> 
> This works, but what I want to do is address directly the 
> ${plugin.resources}/template subdirectory of my 
> ${maven.home.local}/cache/<myOwnPlugin> directory.
> 
> But I was unable to make it recognized !
> I tried setting maven.genapp.template.repository to 
> ${plugin.resources}/template in my plugin.properties file but it seems 
> that the setting of the property is done "too late" for the plugin. Very
> 
> weird, since the same property set with ${maven.home.local} works !
> 
> Any idea please ?
> 
> Thanks in advance,
> 
> -- 
> Laurent Petit
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

Reply via email to