cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: Java bean puzzle. using ecliplse plugin or not.
Date Thu, 24 Jul 2008 08:50:36 GMT
David Legg pisze:
> Ken,
>> Thankyou very much, David. I can confirm that the spring-bean now does 
>> work properly.
> Thanks for confirming that.
>> How do we report this to the developers?
> Normally, you would open a new item in the bugs database (called JIRA) [1].
> However, I've just looked at the latest version of that file in the SVN 
> repository and it looks like it is fixed already.  I think it is in the 
> 'trunk' at this location: -
>  [svn 
> trunk]\tools\archetypes\cocoon-22-archetype-block\src\main\resources\archetype-resources\src\main\resources\COB-INF\demo\spring-bean.jx.xml

>  The code looks like this: -
>  <demo>
>    <module>${groupId}:${artifactId}</module>
>    <spring>#{message}</spring>
>  </demo>
> I suspect though that getting this change incorporated into the wide 
> world is a little more involved than just issuing a new release of 
> Cocoon because someone has to upload the new version to the official 
> maven site I think.

Unfortunately, it's not fixed in trunk. Take a look at the history of this file[1] and you
will see 
that is has not changed for more than a year now.

The problem we see here is that archetype plug-in for Maven tries to find all expressions
in files 
that it creates and tries to resolve these expressions to correct values. The good example
${artifactId} expression that we see above. Archetype plug-in will resolve it to artifactId
of the 
block that it prepares.

Unfortunately, #{message} is treated as an expressions too but it shouldn't. It's aimed at
plug-in but Cocoon's template generator.

According to this[2] page (archetype uses velocity) the fix should be easy: we need to escape
character using "\#" and everything should work just fine...

> Anyhow... the main thing is it has been covered and at some point the 
> corrected version will be available.  In the meantime we can sit back; 
> smug in the knowledge that we know the answer ;-)

As you see, there is a bug here so one should create a JIRA report. :-)

I'll try to fix this issue ASAP.

Best regards,
Grzegorz Kossakowski

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message