Do the archetype plugin have a Velocity feature ?
2006/3/2, Brett Porter <[EMAIL PROTECTED]>:
>
> I'm not so sure about this. Do we really want to be swizzling resources?
>
> So far what I've seen has been fairly limited needs - fields in the
> manifest and a properties file of info for record keeping. I think a
> specialised plugin (maybe even a velocity plugin) is better for this
> than introducing velocity to normal resources.
>
> - Brett
>
> Jason van Zyl wrote:
> > Anders Hessellund Jensen wrote:
> >> I would like to be able to substitute timestamps with the build time
> >> into a resource file. As I understand it, there is currently no plugin
> >> to to this, so I consider writing one.
> >
> > Sorry for not responding to this earlier, and I know that you've started
> > working on this plugin and I'd like to harness the work you've done but
> > I think what you are doing should be an extension to the resources
> > plugin. We should figure out how to augment filtering of resources. I
> > think the easiest way to do this is to filter the resources using
> Velocity.
> >
> > This way additional tools can be created for swizzling resources and
> > this can all happen in one pass through velocity instead of having N
> > plugins which need to make N passes over the resources to filter them.
> > So I don't want to discourage you at all. Work on the plugin and I will
> > try to integrate your code into the resources plugin when you are done.
> >
> > The other advantage of using Velocity in the resources plugin will allow
> > you to use Velocity directives in your resources so you can do any sort
> > of conditional logic you may want to have instead of simple
> > substitution. So I think we would benefit in two ways using Velocity
> > here: scalable addition of tools that can be used to swizzle resources
> > (a timestamp tool is a perfect example) and conditional logic which can
> > sometimes be useful like looking at a property introduced by a profile
> > and behave a certain way for example.
> >
> >> The plugin should leverage the existing resource filtering mechanism
> >> of M2. The plugin would take a configuration like this:
> >>
> >> <configuration>
> >> <timestamps>
> >> <timestamp>
> >> <propertyName>build.date</propertyName>
> >> <pattern>yyyy.MM.dd</pattern>
> >> <timestamp>
> >> <timestamps>
> >> </configuration>
> >>
> >> Running the plugin with this configuration would define the M2
> >> property build.date, and any filtered resource file would get
> >> ${build.date} substituted with 2006.02.28 or whatever the date at
> >> build time is.
> >>
> >> WDYT?
> >>
> >> Best regards,
> >> Anders
> >>
> >> ---------------------------------------------------------------------
> >> 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]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>