@TupleConstructor: what am I doing wrong?

2018-01-11 Thread Mauro Molinari
Hello all, I'm getting crazy because I can't understand what I'm doing wrong. Consider this (it can be pasted on the Groovy console): |import groovy.transform.TupleConstructor|| || ||public class Foobar {|| ||  private Long id;|| ||  public Long getId() { return this.id; }|| ||  public

setting up maven environment

2018-01-11 Thread Martin Mucha
Hi, can anyone help how to setup maven project, which build groovy scripts? I have working maven project, which builds java sources. I would like to build groovy scripts as well, into class files. Internet is filled with not-working solutions, I cannot see any mention in documentation anywhere.

Re: setting up maven environment

2018-01-11 Thread Martin Mucha
Thanks for link, sadly this seems to be one the links on web, which does not work/contain complete information. Build fails with: An Ant BuildException has occured: taskdef class org.codehaus.groovy.ant.Groovyc cannot be found Ok nevermind, let me restate the question. I got furthest with

Re: setting up maven environment

2018-01-11 Thread Martin Mucha
Thanks for link! But ... I'm sorry, my module have java and groovy files in it, and as documentation explains, this compiler has issues to build such modules... And, I'm not trying to be sarcastic/whatever here, if other modules, which don't have issues with that, are surprisingly hard to

Re: setting up maven environment

2018-01-11 Thread Daniel Sun
FYI, http://docs.groovy-lang.org/latest/html/documentation/tools-groovyc.html#_maven_integration Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: setting up maven environment

2018-01-11 Thread Guillaume Laforge
And a link to GMavenPlus: https://github.com/groovy/GMavenPlus/wiki Guillaume On Thu, Jan 11, 2018 at 3:44 PM, Daniel Sun wrote: > FYI, > http://docs.groovy-lang.org/latest/html/documentation/ > tools-groovyc.html#_maven_integration > > Cheers, > Daniel.Sun > > > > >

Re: @TupleConstructor: what am I doing wrong?

2018-01-11 Thread Paul King
I haven't checked the code yet but I think @Builder and @ToString originally had similar issues and we added an `allProperties` attribute with default true. Perhaps that is needed here too. I'll try to check the code shortly. On Thu, Jan 11, 2018 at 11:57 PM, Mauro Molinari

Interest in a @UtilityClass AST transform

2018-01-11 Thread Paul King
Hi all, Would there be interest in a @UtilityClass annotation - similar to lombok's: https://projectlombok.org/features/experimental/UtilityClass It is similar to @Category in some ways but with some useful differences. What do folks think? Cheers, Paul.

Re: Interest in a @UtilityClass AST transform

2018-01-11 Thread David Clark
I vote yes. Is @UtilityClass the expected name? Something like @AllStatic or just @Static makes more sense to me, but if @UtilityClass is in widespread use, then keep the name. On 01/11/2018 06:57 PM, Paul King wrote: Hi all, Would there be interest in a @UtilityClass annotation -

Re: Interest in a @UtilityClass AST transform

2018-01-11 Thread MG
I feel that this would register only on the ok-to-have level for me, for the simple reason, that 1. You do not typically have a lot of utility-classes (or function-classes) in a project 2. Afaiks all you save is the static keyword before every method, because if you incorrectly

Re: Interest in a @UtilityClass AST transform

2018-01-11 Thread MG
I think the name is good. I feel @Static would be a natural choice to be extended to support typical METHODS or FIELDS paramters, to only make these static, which does not make sense for an utility class, which by definition is static-only. On 12.01.2018 02:44, David Clark wrote: I vote