You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Schlotfeldt <mj...@plaudit.com> on 2006/11/21 22:11:53 UTC
Archetype Question
Easy questions (hopefully):
1. When creating a custom archetype how do you list resources to *not
*replace variables from? Or in other words not modify instances of
"${blah}". It would be nice to not only be able to escape
individual instances in a file but also files completely for
things like images.
2. Why the different tags? Or in other words why not just have
"<resources>"? What does "<testResources>" do differently? You
still need to write the entire relative path.
3. Why must all resources be list in archetype.xml? What is the
purpose? When would you not list a file?
Thank you for all the help.
Also there is an error on:
http://maven.apache.org/guides/mini/guide-creating-archetypes.html
About half way down tags are listed with hyphens instead of capitals
between words (eg. "test-resources" instead of "testResources").
Once again, thanks!
- Michael
Re: Archetype Question
Posted by Michael Schlotfeldt <mj...@plaudit.com>.
I found a method that /half-way /seems to work. If you put a "\"
in-front of an expression it is not processed. But the problem is that
the "\" is not removed after processing of the document. I would suggest
a modification be made to the archetype plugin that removes one "\"
before any "${blah}" after processing.
Thoughts and other ideas? I know only a little about the archetype
plugin and velocity so there may be better options.
-Michael
Wendy Smoak wrote:
> On 11/21/06, Michael Schlotfeldt <mj...@plaudit.com> wrote:
>>
>> Found out there is a "filtered" and a "encoding" attribute on the
>> resource
>> tag. Had to read through the source code though.
>
> This still doesn't address the problem of filtering some, but not all,
> expressions in a file, right?
>
> Has anyone found a way to "escape" expressions in Velocity, so it will
> pass them through?
>
Re: Archetype Question
Posted by Heinrich Nirschl <he...@gmail.com>.
On 11/22/06, Wendy Smoak <ws...@gmail.com> wrote:
> Has anyone found a way to "escape" expressions in Velocity, so it will
> pass them through?
One possibility is to define the property start sequence as velocity macro:
#set( $ps = "${" )
... and later in the file
this should remain ${ps}property.remaining.in.file} unescaped
The problem with the regular velocity escaping mechanism is that it
treats properties that are defined differently from properties that
are not defined. This "feature" makes it unusable in my opinion.
Henry
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Archetype Question
Posted by franz see <fr...@gmail.com>.
Good day to you, Wendy,
I haven't looked at arhceytpe's code for quite some time now. But if
archetype filters those resources using ${} and @@ delimeters, you can do
the workaround in [1].
Cheers,
Franz
[1] http://jira.codehaus.org/browse/MRESOURCES-29
Wendy Smoak-3 wrote:
>
> On 11/21/06, Michael Schlotfeldt <mj...@plaudit.com> wrote:
>>
>> Found out there is a "filtered" and a "encoding" attribute on the
>> resource
>> tag. Had to read through the source code though.
>
> This still doesn't address the problem of filtering some, but not all,
> expressions in a file, right?
>
> Has anyone found a way to "escape" expressions in Velocity, so it will
> pass them through?
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Archetype-Question-tf2682275s177.html#a7517251
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Archetype Question
Posted by Wendy Smoak <ws...@gmail.com>.
On 11/21/06, Michael Schlotfeldt <mj...@plaudit.com> wrote:
>
> Found out there is a "filtered" and a "encoding" attribute on the resource
> tag. Had to read through the source code though.
This still doesn't address the problem of filtering some, but not all,
expressions in a file, right?
Has anyone found a way to "escape" expressions in Velocity, so it will
pass them through?
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Archetype Question
Posted by franz see <fr...@gmail.com>.
Good day to you, Michael
See [1] for more information.
Cheers,
Franz
[1]
http://www.nabble.com/archetype-descriptor-schema--tf2181358.html#a6061573
Michael Schlotfeldt-4 wrote:
>
> Found out there is a "filtered" and a "encoding" attribute on the
> resource tag. Had to read through the source code though.
>
>
>
>
> Michael Schlotfeldt wrote:
>> Easy questions (hopefully):
>>
>> 1. When creating a custom archetype how do you list resources to
>> *not *replace variables from? Or in other words not modify
>> instances of "${blah}". It would be nice to not only be able to
>> escape individual instances in a file but also files completely
>> for things like images.
>> 2. Why the different tags? Or in other words why not just have
>> "<resources>"? What does "<testResources>" do differently? You
>> still need to write the entire relative path.
>> 3. Why must all resources be list in archetype.xml? What is the
>> purpose? When would you not list a file?
>>
>> Thank you for all the help.
>>
>> Also there is an error on:
>> http://maven.apache.org/guides/mini/guide-creating-archetypes.html
>>
>> About half way down tags are listed with hyphens instead of capitals
>> between words (eg. "test-resources" instead of "testResources").
>>
>> Once again, thanks!
>> - Michael
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
View this message in context: http://www.nabble.com/Archetype-Question-tf2682275s177.html#a7517228
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Archetype Question
Posted by Michael Schlotfeldt <mj...@plaudit.com>.
Found out there is a "filtered" and a "encoding" attribute on the
resource tag. Had to read through the source code though.
Michael Schlotfeldt wrote:
> Easy questions (hopefully):
>
> 1. When creating a custom archetype how do you list resources to
> *not *replace variables from? Or in other words not modify
> instances of "${blah}". It would be nice to not only be able to
> escape individual instances in a file but also files completely
> for things like images.
> 2. Why the different tags? Or in other words why not just have
> "<resources>"? What does "<testResources>" do differently? You
> still need to write the entire relative path.
> 3. Why must all resources be list in archetype.xml? What is the
> purpose? When would you not list a file?
>
> Thank you for all the help.
>
> Also there is an error on:
> http://maven.apache.org/guides/mini/guide-creating-archetypes.html
>
> About half way down tags are listed with hyphens instead of capitals
> between words (eg. "test-resources" instead of "testResources").
>
> Once again, thanks!
> - Michael
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org