You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nathan Quirynen <na...@pensionarchitects.be> on 2013/05/16 11:22:38 UTC

Symbol value random characters

Hi,

Using a maven filter file I set the symbol tapestry.application-version 
and want to show it in a page:

*AppModule.java*
     public static void 
contributeSymbolSource(OrderedConfiguration<SymbolProvider> config) {
         config.add("AppVersion", new 
ClasspathResourceSymbolProvider("appversion.properties"));
     }

*appversion.properties*
     tapestry.application-version=${project.version}

*Index.java*
     public String getVersion() {
         return 
symbolSource.valueForSymbol(SymbolConstants.APPLICATION_VERSION);
     }

*Index.tml*
     ${version}


So if I put in my filter file *project.version=1.2.3*, it shows 1.2.3. 
But sometimes it shows some random characters like: 620e73a4ab76d66.
Any idea what could be causing this?
-- 

Een klare kijk op aanvullende pensioenen

*Nathan Quirynen*
03 340 04 60 | 0494 28 45 15
nathan@pensionarchitects.be <ma...@pensionarchitects.be>

Follow us on Web <http://www.pensionarchitects.be> | Twitter 
<http://www.twitter.com/pen_arch> | LinkedIn 
<http://www.linkedin.com/company/pension-architects> | RSS 
<http://feeds.feedburner.com/pensionarchitects> | YouTube 
<http://www.youtube.com/pensionarchitects>


Re: Symbol value random characters

Posted by Lance Java <la...@googlemail.com>.
Tapestry provides a random hex string default value for the application
version. I'm guessing that's what you're seeing. There must be some
circumstances under which tapestry can't find the override in your property
file.

Re: Symbol value random characters

Posted by Nathan Quirynen <na...@pensionarchitects.be>.
On 16/05/13 12:26, Lance Java wrote:
> ${project.version} is a reserved property in maven. I'm guessing maven is
> using its own value instead of your filter. Check by inspecting
> appversion.properties in your jar/war.
>
I removed the *project.version=1.2.3 *from my filter file, so it 
actually takes the version attribute set in my pom.xml. It does always 
write the correct value to the appversion.properties file.
When I just rebuild my project couple of times without making any 
changes, sometimes I get the right value shown in my page, sometimes 
something like 620e73a4ab76d66 (having the right value in 
appversion.properties file).

-- 

Een klare kijk op aanvullende pensioenen

*Nathan Quirynen*
03 340 04 60 | 0494 28 45 15
nathan@pensionarchitects.be <ma...@pensionarchitects.be>

Follow us on Web <http://www.pensionarchitects.be> | Twitter 
<http://www.twitter.com/pen_arch> | LinkedIn 
<http://www.linkedin.com/company/pension-architects> | RSS 
<http://feeds.feedburner.com/pensionarchitects> | YouTube 
<http://www.youtube.com/pensionarchitects>


Re: Symbol value random characters

Posted by Lance Java <la...@googlemail.com>.
${project.version} is a reserved property in maven. I'm guessing maven is
using its own value instead of your filter. Check by inspecting
appversion.properties in your jar/war.