Re: Gradle for FreeMarker, anyone? (Was: Maven for Freemarker)

2016-12-31 Thread Daniel Dekany
Hello,

It would be great if you can look at the Ant build and tell your
opinion about transforming the same functionality to Gradle. By same
functionality I mean getting nearly identical "artifacts" at the end,
otherwise everything can change. (For example, you will find that
there are some tricky things going on with Ivy; we might not need that
anymore.) And of course, you are welcome to actually do the
transition.

If you look at http://freemarker.org/sourcecode.html, you will find
that we have 3 projects. The topic is now the "freemarker" project
(and there the work should be done in a feature branch coming out from
the "2.3-gae" branch). "freemarker-docgen" and "freemarker-site",
which also run on Ant, could be migrated separately, later.


Saturday, December 31, 2016, 7:38:32 PM, Taher Alkhateeb wrote:

> Hello Everyone,
>
> We recently switched Apache OFBiz from Ant to Gradle and it was an 
> amazing experience. I was the main developer working on the transition
> and I think if something so complex and wired up with hundreds of 
> libraries like OFBiz can do it, then I think it would be a much more 
> pleasant experience with FreeMarker.
>
> Transitioning to Gradle, however, requires a shift of the way you think,
> it is not an imperative style of "do this then do that" and it has 
> multiple build phases (initialization, configuration and execution). 
> Gradle is also subject to frequent changes more than ant or Maven. For
> example, in versions 3+ the left shift operator "<<" was deprecated even
> though heavily used in projects and is subject for total removal in 
> version 5.
>
> Overall, I would say between the three build systems, Gradle is the most
> powerful hands down as it mixes the convention-over-configuration 
> philosophy of maven while at the same time allowing overriding any 
> configuration setting. It also provides a powerful DSL on top of a full
> programming language (Groovy)
>
> If you folks would like to proceed with the transition, and need extra
> hands, I'd love to help however I can.
>
> Cheers,
>
> Taher Alkhateeb
>
>
> On 2016-12-31 02:43 (+0300), Daniel Dekany  wrote:
 >> Friday, December 30, 2016, 11:44:35 PM, Apache wrote:>
 >>
 >> > I\u2019m not sure what \u201cfuture-proof\u201d means.>
 >>
 >> By that I mean that if we have to do something non-standard, it's>
 >> probably easier to achieve with Gradle.>
 >>
 >> Also, if we include FM2 in this, then we surely has to do non-standard>
 >> things. In FM2 the resulting freemarker.jar has to be the same>
 >> monolithic jar, etc.>
 >>
 >> Last not least, if someone is interested in Gradle, and so wants to>
 >> tackle this task, then I believe we should just go for Gradle.>
 >> Especially as it can be started right now with FM2, while with Maven,>
 >> he had to wait until FM3 gets somewhere.>
 >>
 >> -- >
 >> Thanks,>
 >> Daniel Dekany>
 >>
 >>
 >> > Maven is basically the standard the other build tools have to be>
 >> > compatible with. The Maven team has been discussing ways to enhance>
 >> > the pom.xml to open up new features for quite some time and do seem>
 >> > to be making some progress.>
 >> >>
 >> > The big downside with an Ant build is that everything is custom.>
 >> > Maven takes the opposite approach - everything is standard, while>
 >> > Gradle is somewhere in the middle.>
 >> >>
 >> > Ralph>
 >> >>
 >> >> On Dec 30, 2016, at 2:05 PM, Daniel Dekany  
wrote:>>
 >> >> >
 >> >> I think recreating the Ant build of FM 2 in Gradle (with nearly>
 >> >> identical output) would be a good start. For starters, it's useful 
in>>
 >> >> itself, like it makes FM 2 look less ancient. (-; It's parhaps also>
 >> >> useful if we want to become Android friendly. Then, it will be 
easier>>
 >> >> to proceed with a modular Gradle build in FM 3. (I'm leaning towards>
 >> >> Gradle as opposed to Maven because it gives us more flexibility, so>
 >> >> it's more future proof. As history has shown, FreeMarker often needs>
 >> >> that.)>
 >> >> >
 >> >> If you or anyone else feels like playing with the FM2 Ant to Gradle>
 >> >> conversion, go ahead!>
 >> >> >
 >> >> >
 >> >> Thursday, September 22, 2016, 1:08:18 PM, Mauricio Nu%uFFFDez wrote:>
 >> >> >
 >> >>> Hi Daniel,>
 >> >>> >
 >> >>> Thanks for your feedback. I'm pushing to my personal github. I 
have a>>
 >> >>> parent pom with a submodule core and a submodule ext. I want to 
check>>
 >> >>> alternatives for the different artifacts. Maybe with reflection, as>
 >> >>> suggested by the previous effort, or retrotranslator.>
 >> >>> >
 >> >>> https://github.com/mauronunez/incubator-freemarker/tree/maven ( 
my fork,>>
 >> >>> branch "maven" )>
 >> >>> >
 >> >>> I have more experience with maven, but I think this as 
intermediate step>>
 >> >>> for Gradle.>
 >> >>> About maven for FM2, yes, I agree with to keep it as is, not 
impacting>>
 >> >>> users. I want to contribute my changes to FM3, but now, FM2 it's 
a good>>
 >> >>> codebase to test, and 

Re: Gradle for FreeMarker, anyone? (Was: Maven for Freemarker)

2016-12-31 Thread Taher Alkhateeb

Hello Everyone,

We recently switched Apache OFBiz from Ant to Gradle and it was an 
amazing experience. I was the main developer working on the transition 
and I think if something so complex and wired up with hundreds of 
libraries like OFBiz can do it, then I think it would be a much more 
pleasant experience with FreeMarker.


Transitioning to Gradle, however, requires a shift of the way you think, 
it is not an imperative style of "do this then do that" and it has 
multiple build phases (initialization, configuration and execution). 
Gradle is also subject to frequent changes more than ant or Maven. For 
example, in versions 3+ the left shift operator "<<" was deprecated even 
though heavily used in projects and is subject for total removal in 
version 5.


Overall, I would say between the three build systems, Gradle is the most 
powerful hands down as it mixes the convention-over-configuration 
philosophy of maven while at the same time allowing overriding any 
configuration setting. It also provides a powerful DSL on top of a full 
programming language (Groovy)


If you folks would like to proceed with the transition, and need extra 
hands, I'd love to help however I can.


Cheers,

Taher Alkhateeb


On 2016-12-31 02:43 (+0300), Daniel Dekany  wrote:
> Friday, December 30, 2016, 11:44:35 PM, Apache wrote:>
>
> > I\u2019m not sure what \u201cfuture-proof\u201d means.>
>
> By that I mean that if we have to do something non-standard, it's>
> probably easier to achieve with Gradle.>
>
> Also, if we include FM2 in this, then we surely has to do non-standard>
> things. In FM2 the resulting freemarker.jar has to be the same>
> monolithic jar, etc.>
>
> Last not least, if someone is interested in Gradle, and so wants to>
> tackle this task, then I believe we should just go for Gradle.>
> Especially as it can be started right now with FM2, while with Maven,>
> he had to wait until FM3 gets somewhere.>
>
> -- >
> Thanks,>
> Daniel Dekany>
>
>
> > Maven is basically the standard the other build tools have to be>
> > compatible with. The Maven team has been discussing ways to enhance>
> > the pom.xml to open up new features for quite some time and do seem>
> > to be making some progress.>
> >>
> > The big downside with an Ant build is that everything is custom.>
> > Maven takes the opposite approach - everything is standard, while>
> > Gradle is somewhere in the middle.>
> >>
> > Ralph>
> >>
> >> On Dec 30, 2016, at 2:05 PM, Daniel Dekany  
wrote:>

> >> >
> >> I think recreating the Ant build of FM 2 in Gradle (with nearly>
> >> identical output) would be a good start. For starters, it's useful 
in>

> >> itself, like it makes FM 2 look less ancient. (-; It's parhaps also>
> >> useful if we want to become Android friendly. Then, it will be 
easier>

> >> to proceed with a modular Gradle build in FM 3. (I'm leaning towards>
> >> Gradle as opposed to Maven because it gives us more flexibility, so>
> >> it's more future proof. As history has shown, FreeMarker often needs>
> >> that.)>
> >> >
> >> If you or anyone else feels like playing with the FM2 Ant to Gradle>
> >> conversion, go ahead!>
> >> >
> >> >
> >> Thursday, September 22, 2016, 1:08:18 PM, Mauricio Nu%uFFFDez wrote:>
> >> >
> >>> Hi Daniel,>
> >>> >
> >>> Thanks for your feedback. I'm pushing to my personal github. I 
have a>
> >>> parent pom with a submodule core and a submodule ext. I want to 
check>

> >>> alternatives for the different artifacts. Maybe with reflection, as>
> >>> suggested by the previous effort, or retrotranslator.>
> >>> >
> >>> https://github.com/mauronunez/incubator-freemarker/tree/maven ( 
my fork,>

> >>> branch "maven" )>
> >>> >
> >>> I have more experience with maven, but I think this as 
intermediate step>

> >>> for Gradle.>
> >>> About maven for FM2, yes, I agree with to keep it as is, not 
impacting>
> >>> users. I want to contribute my changes to FM3, but now, FM2 it's 
a good>

> >>> codebase to test, and to be more involved as developer.>
> >>> >
> >>> Btw, I've create a pull request to fix some Junit tests.>
> >>> >
> >>> Regards,>
> >>> >
> >>> Mauricio>
> >>> >
> >>> 2016-09-21 14:49 GMT-03:00 Daniel Dekany :>
> >>> >
>  Hi,>
>  >
>  In FreeMarker 3 we want to modularize the project, so that there 
will>
>  be at least a freemarker-core and then a separate artifacts for 
each>
>  extension (like freemarker-jsp, etc.). Thus so far I agree with 
what>

>  you are doing. If it can be done with FreeMarker 2 though, I'm not>
>  sure, because we have to keep strict backward compatibility 
there, and>
>  also we have to consider how much hassle such a change causes 
for the>

>  users. (There are orders magnitude more users than contributors.>
>  Something that's nice for the contributors might bears no value 
for>
>  the users, or even just makes dependency management more fragile 
for>

>  them.)>
>  >
>