Gavin wrote:
> From: David Crossley
> > Gavin wrote:
> > > > > >
> > > > > > The above discussed is not a hack but a clear enhancement. Well
> > > > > > e.g.
> > > > > > {forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/
> > > > > > should
> > > > > > be replaced by something shorter. Awesome would be {this} but not
> > > > > > sure
> > > > > > whether that is easily to implement.
> > > > >
> > > > > Don't forget that this would need to be handled by the
> > > > > Ant target that creates a new plugin from the template:
> > > > > http://forrest.apache.org/docs/dev/howto/howto-buildPlugin.html#seed
> > > >
> > > > I was thinking if they are required lines we could just add them in to
> > > > the
> > > > template directly so that they are there already, does that sound ok?
> > >
> > > Hmm, I'll expand on that.
> > >
> > > In the pluginTemplate we can add commented out example code to
> > > locationmap.xml like :-
> > >
> > >   <locator>
> > > <!-- Uncomment the below matches once you have a stylesheet you wish to
> > > use.
> > > Note that these are needed for the plugin to work on windows. See FOR-1108
> > > -->
> > >   <!--
> > >   <match pattern="plugin.transform.*.*">
> > >      <select>
> > >        <location src="resources/stylesheets/{1}-to-{2}.xsl" />
> > >          <location
> > > src="{forrest:forrest.plugins}/@plugin-name@/resources/stylesheets/{1}-to-{2}.xsl"/>
> > >      </select>
> > >    </match>
> > >    -->
> > >  </locator>
> > >
> > > Currently the <locator /> is empty. Then once a stylesheet has been
> > > created
> > > the dev can uncomment out the example.
> > 
> > My comment referred to the ant target which creates the new
> > plugin. It already edits some files from the pluginTemplate
> > on the way to add the plugin name, so it should be trivial
> > to add this extra locationmap match.
> 
> Ok, back to this.
> 
> The file I need to edit here for the ant target is
> /var/initial_plugins_locationmap.xml so I can add that no problem.
> 
> Just wanted to confirm, does it still want to be added to
> pluginTemplate/locationmap.xml as well ?

Sorry, i don't know what you are talking about with
editing main/var/initial_plugins_locationmap.xml file.
That is used when plugins are initialised at runtime
with the "init-plugins" target.

I was referring to the "seedPlugin" target
in $FORREST_HOME/plugins/build.xml
This creates a new plugin ready for the developer
to commence work.
It runs through every file in the template and
replaces the tokens such as "@plugin-name@".

So yes, add the example above to pluginTemplate/locationmap.xml

-David