cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paulo Roberto Massa Cereda <cereda.pa...@gmail.com>
Subject Re: Cayenne with the last Velocity release
Date Sat, 09 Jun 2012 14:58:00 GMT
Hi Ari and Michael,

Thanks a lot for your feedback. I made some adjustments and I could 
deploy Velocity 1.7 with Cayenne. :)

Em 09/06/2012 06:21, Aristedes Maniatis escreveu:
 > Alternatively, the velocity templates in Cayenne are quite simple.
 > Perhaps you'd be able to review what would be needed in upgrading
 > them to velocity 1.7. I don't think it should be too hard... we'd
 > be happy to see your patches for inclusion in Cayenne. Personally I
 > don't use Velocity outside of Cayenne, so I don't know what is
 > involved in the upgrade.

Bear with me, I'm a humble Cayenne newcomer. :) I'll take a look in how 
Cayenne deals with Velocity, check the possible conflicts and report 
back to you (maybe in the dev list?). As Michael mentioned in his reply, 
the use is probably trivial enough to not break Cayenne in a possible 
Velocity upgrade. :)

One "recent" feature from Velocity that I use *a lot* is the static 
classes support -- probably from 1.6 on, IIRC. I usually have to export 
data to several formats, including ReST and LaTeX, and some helper 
static classes might help in the process. For example, I use LambdaJ to 
write more fluent template code, or use some utilitary classes instead 
of a hardcoded data preprocessing (e.g, remove accents from a string). 
That way, my templates are more flexible, at the cost of complexity. But 
we do love write code, don't we? :P

Em 09/06/2012 09:19, Michael Gentry escreveu:
 > If you are using Maven to build your project, exclude Velocity from
 > the Cayenne dependency:
 > [ XML code ]
 > Then include your 1.7 dependency and Maven should package the correct
 > Velocity jar for you.  Cayenne's usage of Velocity is trivial and it
 > shouldn't be impacted by the version switch.

Thanks, I'll use this dependency entry for my next Cayenne/Velocity 
combo applications. :) Sadly, this current project of mine makes use of 
some third-party libraries which are not in the remote Maven repository 
or, if so, they are not updated to their last releases (some features I 
use are only available in the last versions). I could "install" those 
.jar's into my local repository, but I ended up with a local .jar approach.

Em 09/06/2012 09:34, Michael Gentry escreveu:
 > Sorry, I missed that.  What are you using to build?  If you are
 > manually managing JARs, you could always unpack the Cayenne JAR, rip
 > the old Velocity JAR out of it, and re-package it.

I'm currently using a "normal" Java application from the NetBeans IDE. I 
did the trick of ripping the Velocity entries in the vpp.jar (it was the 
only .jar I found with an explicit Velocity structure), repackaged and 
added to the application. It worked like a charm. :)

Thank you very much for your help and attention. I'm looking forward to 
contributing to the project ASAP. :)

Best wishes,

Paulo

Em 09/06/2012 09:34, Michael Gentry escreveu:
> "The project I have is not Maven-based..."
>
> Sorry, I missed that.  What are you using to build?  If you are
> manually managing JARs, you could always unpack the Cayenne JAR, rip
> the old Velocity JAR out of it, and re-package it.
>
> mrg
>
>
> On Sat, Jun 9, 2012 at 8:19 AM, Michael Gentry <mgentry@masslight.net> wrote:
>> Hi Paulo,
>>
>> If you are using Maven to build your project, exclude Velocity from
>> the Cayenne dependency:
>>
>> <dependency>
>>   <groupId>org.apache.cayenne</groupId>
>>   <artifactId>cayenne-server</artifactId>
>>   <version>3.0.2</version>
>>   <type>jar</type>
>>   <scope>compile</scope>
>>   <exclusions>
>>     <exclusion>
>>       <groupId>velocity</groupId>
>>       <artifactId>velocity</artifactId>
>>     </exclusion>
>>   </exclusions>
>> </dependency>
>>
>> Then include your 1.7 dependency and Maven should package the correct
>> Velocity jar for you.  Cayenne's usage of Velocity is trivial and it
>> shouldn't be impacted by the version switch.
>>
>> If you are using a different tool to build, I'm sure there is an
>> exclusion option for it as well.
>>
>> mrg
>>
>>
>> On Fri, Jun 8, 2012 at 9:43 PM, Paulo Roberto Massa Cereda
>> <cereda.paulo@gmail.com> wrote:
>>> Dear friends,
>>>
>>> First of all, kudos to all developers for this great project. :) I have to
>>> say I'm really impressed and satisfied with Cayenne. It really makes things
>>> easier to model and implement.
>>>
>>> First of all, apologies if this subject is recurring in the mailing list. I
>>> tried to follow some past messages hoping to find a workaround, but I had no
>>> luck so far.
>>>
>>> One specific application of mine makes heavy use of Velocity for generating
>>> reports and other kinds of documents. Most of my templates are really
>>> complex, they make use of several features included in the most recent
>>> Velocity release (1.7). Long story short: these templates are not properly
>>> generated from Velocity shipped with Cayenne. :)
>>>
>>> I would like to hear from you experienced Cayenne users if anyone has a
>>> successful story of Cayenne working with Velocity 1.7. The project I have is
>>> not Maven-based, but I don't see any restrictions in a possible migration if
>>> a possible solution requires it.
>>>
>>> Thanks a lot for your time, and again thanks for making Cayenne a jewel in
>>> software development.
>>>
>>> Best wishes,
>>>
>>> Paulo


Mime
View raw message