You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jorg Heymans <jh...@domek.be> on 2005/10/18 10:14:54 UTC

archetypes: prevent resources from being parsed

Hi,

How can I tell m2 that it shouldn't look for variable tags in certain
archetype resources ?

I'm getting
[WARNING] org.apache.velocity.runtime.exception.ReferenceException:
reference : template = archetype-resources/src/main/webapp/sitemap.xmap
[line 28,column 11] : $Id is not a valid reference.

which is harmless, but worse :

[ERROR] ResourceManager.getResource() parse exception:
org.apache.velocity.exception.ParseErrorException: Lexical error:
org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line
44, column 36.  Encountered: <EOF> after : ""

for cocoon.gif declared as :

<resources>
    <resource>src/main/webapp/resources/icons/cocoon.ico</resource>
    <resource>src/main/webapp/resources/images/cocoon.gif</resource>

Note that cocoon.ico does not trigger the error.


Thanks
Jorg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: archetypes: prevent resources from being parsed

Posted by Jason van Zyl <ja...@maven.org>.
On Thu, 2005-10-20 at 16:54 +0200, Jorg Heymans wrote:
> Jason van Zyl wrote:
> > 
> > We'll need to change the archetype model to allow for this. Currently
> > velocity tries to filter everything in the archetype.
> 
> How about a per resource flag like eg interpolate-vars="true|false" ,
> possibly also configurable on the <sources> <testSources> etc level ?
> 
> That should cover most needs, no idea though how easy it is to implement.

Maybe you can pop into IRC as I took a stab at redesigning the
descriptor:


http://svn.apache.org/viewcvs.cgi/*checkout*/maven/components/trunk/maven-archetype/archetype-model.xml?rev=326957&content-type=text%2Fplain

Or I can post something to the wiki.

Trying to deal with 

o flexible descriptor
o account for filtering (or not)
o easy creation of the archetypes
o metadata for the parameters that might be used
  - validation
  - localization of messages

I would like to make a tool that could be embedded. So that archetypes
can easily be used from IDEs and the CLI.

If you can't chat in IRC I can give you access to the wiki and we can
work from there (irc.codehaus.org #maven).

> 
> Jorg
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
-- 
jvz.

Jason van Zyl
jason at maven.org
http://maven.apache.org

believe nothing, no matter where you read it,
or who has said it,
not even if i have said it,
unless it agrees with your own reason
and your own common sense.

 -- Buddha


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: archetypes: prevent resources from being parsed

Posted by Jorg Heymans <jh...@domek.be>.
Jason van Zyl wrote:
> 
> We'll need to change the archetype model to allow for this. Currently
> velocity tries to filter everything in the archetype.

How about a per resource flag like eg interpolate-vars="true|false" ,
possibly also configurable on the <sources> <testSources> etc level ?

That should cover most needs, no idea though how easy it is to implement.


Jorg






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: archetypes: prevent resources from being parsed

Posted by Jason van Zyl <ja...@maven.org>.
On Tue, 2005-10-18 at 10:14 +0200, Jorg Heymans wrote:
> Hi,
> 
> How can I tell m2 that it shouldn't look for variable tags in certain
> archetype resources ?

We'll need to change the archetype model to allow for this. Currently
velocity tries to filter everything in the archetype.

-- 
jvz.

Jason van Zyl
jason at maven.org
http://maven.apache.org

A party which is not afraid of letting culture,
business, and welfare go to ruin completely can
be omnipotent for a while.

  -- Jakob Burckhardt


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org