You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk> on 2007/10/05 09:20:16 UTC

wicket archetype...

writing this line :

mvn archetype:create -DarchetypeGroupId=org.apache.wicket 
-DarchetypeArtifactId=wicket-archetype-quickstart 
-DarchetypeVersion=1.3.0-beta3 -DgroupId=com.mycompany 
-DartifactId=myproject

to create a project yields these warnings:

[WARNING] org.apache.velocity.runtime.exception.ReferenceException: 
reference : template = archetype-resources/pom.xml [line 35,column 34] : 
${wicket.version} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: 
reference : template = archetype-resources/pom.xml [line 41,column 34] : 
${wicket.version} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: 
reference : template = archetype-resources/pom.xml [line 64,column 34] : 
${jetty.version} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: 
reference : template = archetype-resources/pom.xml [line 70,column 34] : 
${jetty.version} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: 
reference : template = archetype-resources/pom.xml [line 76,column 34] : 
${jetty.version} is not a valid reference.


should they be taken into consideration?


I took the command line from http://wicket.apache.org/quickstart.html


regards Nino

Re: wicket archetype...

Posted by Stuart McCulloch <st...@jayway.net>.
On 05/10/2007, Gerolf Seitz <ge...@gmail.com> wrote:
>
> don't worry, this is just a "conflict" between pom-properties and
> velocity.
> both use the same mechanism (${someVar}) to reference a property, which is
> replaced with a certain value.
>
> and since there no properties "jetty.version" and "wicket.version"
> available
> during archetype creation,
> maven (or velocity) shows these warnings.
>
> i guess there is no way to prevent this (other than not using
> maven-properties)?


there are a couple of tricks you can use in your archetype template(s) to
avoid these warnings:

1) add the following velocity macro:

        #set( $dollar = '$' )

    to the top of the file, then use ${dollar}{wicket.version} in place of
${wicket.version}

2) or use the 'literal' velocity tag:

        #literal()
           this text will be left unchanged... ${wicket.version}
           ... even text like ${version} will remain untouched
        #end

    to surround sections where you don't want velocity to do any property
substitution

HTH

i think it's not too good for a first experience for newcomers to start the
> wicket-experience with warnings,
> even though this actually has nothing to do with wicket itself...
>
> gerolf
>
> On 10/5/07, Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>
> wrote:
> >
> > writing this line :
> >
> > mvn archetype:create -DarchetypeGroupId=org.apache.wicket
> > -DarchetypeArtifactId=wicket-archetype-quickstart
> > -DarchetypeVersion=1.3.0-beta3 -DgroupId=com.mycompany
> > -DartifactId=myproject
> >
> > to create a project yields these warnings:
> >
> > [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> > reference : template = archetype-resources/pom.xml [line 35,column 34] :
> > ${wicket.version} is not a valid reference.
> > [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> > reference : template = archetype-resources/pom.xml [line 41,column 34] :
> > ${wicket.version} is not a valid reference.
> > [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> > reference : template = archetype-resources/pom.xml [line 64,column 34] :
> > ${jetty.version} is not a valid reference.
> > [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> > reference : template = archetype-resources/pom.xml [line 70,column 34] :
> > ${jetty.version} is not a valid reference.
> > [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> > reference : template = archetype-resources/pom.xml [line 76,column 34] :
> > ${jetty.version} is not a valid reference.
> >
> >
> > should they be taken into consideration?
> >
> >
> > I took the command line from http://wicket.apache.org/quickstart.html
> >
> >
> > regards Nino
> >
>



-- 
Cheers, Stuart

Re: wicket archetype...

Posted by Gerolf Seitz <ge...@gmail.com>.
don't worry, this is just a "conflict" between pom-properties and velocity.
both use the same mechanism (${someVar}) to reference a property, which is
replaced with a certain value.

and since there no properties "jetty.version" and "wicket.version" available
during archetype creation,
maven (or velocity) shows these warnings.

i guess there is no way to prevent this (other than not using
maven-properties)?
i think it's not too good for a first experience for newcomers to start the
wicket-experience with warnings,
even though this actually has nothing to do with wicket itself...

gerolf

On 10/5/07, Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>
wrote:
>
> writing this line :
>
> mvn archetype:create -DarchetypeGroupId=org.apache.wicket
> -DarchetypeArtifactId=wicket-archetype-quickstart
> -DarchetypeVersion=1.3.0-beta3 -DgroupId=com.mycompany
> -DartifactId=myproject
>
> to create a project yields these warnings:
>
> [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> reference : template = archetype-resources/pom.xml [line 35,column 34] :
> ${wicket.version} is not a valid reference.
> [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> reference : template = archetype-resources/pom.xml [line 41,column 34] :
> ${wicket.version} is not a valid reference.
> [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> reference : template = archetype-resources/pom.xml [line 64,column 34] :
> ${jetty.version} is not a valid reference.
> [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> reference : template = archetype-resources/pom.xml [line 70,column 34] :
> ${jetty.version} is not a valid reference.
> [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
> reference : template = archetype-resources/pom.xml [line 76,column 34] :
> ${jetty.version} is not a valid reference.
>
>
> should they be taken into consideration?
>
>
> I took the command line from http://wicket.apache.org/quickstart.html
>
>
> regards Nino
>

Re: wicket archetype...

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Yeah saw that the pom was generated sucessfully..

I'll go ahead and create a low priority jira issue...

https://issues.apache.org/jira/browse/WICKET-1045

Gwyn Evans wrote:
> On Friday, October 5, 2007, 8:20:16 AM, Nino <ni...@jayway.dk> wrote:
>
>   
>> writing this line :
>>     
>
>   
>> mvn archetype:create -DarchetypeGroupId=org.apache.wicket 
>>     
> ...
>   
>> to create a project yields these warnings:
>> ...
>> ${wicket.version} is not a valid reference.
>>     
> ...
>   
>> ${jetty.version} is not a valid reference.
>>     
>
>   
>> should they be taken into consideration?
>>     
>
> Short answer is no, in that despite them, the generated pom.xml is
> fine.
>
> Looking at it, I'd /guess/ that it's complaining that the properties
> block is at the end of the file, rather than before where the values
> are used.  This doesn't matter to Maven however, but /might/ result in
> the warnings.
>
> Feel free to raise an issue about it though, as that way it won't get
> forgotten & might get addressed when any changes are next made to the
> archetype.
>
> /Gwyn
>
>
>   

Re: wicket archetype...

Posted by Gwyn Evans <gw...@gmail.com>.
On Friday, October 5, 2007, 8:20:16 AM, Nino <ni...@jayway.dk> wrote:

> writing this line :

> mvn archetype:create -DarchetypeGroupId=org.apache.wicket 
...
> to create a project yields these warnings:
> ...
> ${wicket.version} is not a valid reference.
...
> ${jetty.version} is not a valid reference.

> should they be taken into consideration?

Short answer is no, in that despite them, the generated pom.xml is
fine.

Looking at it, I'd /guess/ that it's complaining that the properties
block is at the end of the file, rather than before where the values
are used.  This doesn't matter to Maven however, but /might/ result in
the warnings.

Feel free to raise an issue about it though, as that way it won't get
forgotten & might get addressed when any changes are next made to the
archetype.

/Gwyn