You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by yugantshah <yu...@gmail.com> on 2017/11/20 06:08:07 UTC

Compiling groovy with java9 using maven with spring boot

Hello,

Tried to compile a spring boot application with groovy+java9, however it
does not detect the main class which is in groovy.

Can anyone please point to a sample which consists of 
groovy , java9 , maven with spring boot



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Re: Compiling groovy with java9 using maven with spring boot

Posted by Leonard Brünings <gr...@bruenings-it.net>.
Hi,

its correct not to include a module-info.java, however groovy should 
define its Automatic-Module-Name.

http://blog.joda.org/2017/05/java-se-9-jpms-automatic-modules.html

Many other projects are already doing it, e.g., 
https://github.com/mockito/mockito/issues/1189

Until the fine grained modules are defined, we should choose an umbrella 
module, akin to `java.se`
which can later evolve to depend on the smaller modules.
See Module Graph 
https://docs.oracle.com/javase/9/docs/api/java.se.ee-summary.html


cheers

Leonard


Am 20.11.2017 um 15:04 schrieb Cédric Champeau:
> Thank you Paul!
>
> 2017-11-20 14:59 GMT+01:00 Paul King <paulk@asert.com.au 
> <ma...@asert.com.au>>:
>
>     I created an issue to track this:
>     https://issues.apache.org/jira/browse/GROOVY-8387
>     <https://issues.apache.org/jira/browse/GROOVY-8387>
>
>     On Mon, Nov 20, 2017 at 5:47 PM, Uwe Schindler <uwe@thetaphi.de
>     <ma...@thetaphi.de>> wrote:
>
>         Hi,
>
>         Yes, this is risky when you update ASM to 6.0. I had the same
>         issue during repackage, but I fixed it:
>
>         https://github.com/policeman-tools/forbidden-apis/commit/1654d5d38e40ee500ca7ae82b146ed6fcfba0827
>         <https://github.com/policeman-tools/forbidden-apis/commit/1654d5d38e40ee500ca7ae82b146ed6fcfba0827>
>
>
>
>         Am 20. November 2017 08:34:02 MEZ schrieb "Cédric Champeau"
>         <cedric.champeau@gmail.com <ma...@gmail.com>>:
>
>             I don't find any evidence of `module-info` file on
>             `master` or 2.6.X. On the other hand, we have the ASM
>             module-info file bundled, because we repackage. This is a
>             mistake that needs to be fixed. So, false alarm, Daniel:
>             WE didn't add a module-info file: a dependency of ours,
>             ASM, has one, and when we create our jars it should be
>             removed.
>
>             2017-11-20 8:28 GMT+01:00 Cédric Champeau
>             <cedric.champeau@gmail.com
>             <ma...@gmail.com>>:
>
>                 We should remove it: it doesn't make sense to have a
>                 module info at this point, when we don't even know
>                 what we require, export, and when all of our
>                 dependencies are not modules. And I'm not talking
>                 about our different artifacts. If this was an
>                 experiment, it shouldn't have landed on master. It
>                 will cause more harm than anything else if people try
>                 Groovy as a module.
>
>
>                 2017-11-20 8:20 GMT+01:00 Daniel Sun
>                 <realbluesun@hotmail.com
>                 <ma...@hotmail.com>>:
>
>                     Hi Cédric,
>
>                           I do not know who contributed the
>                     module-info, which seems to exist
>                     for a long time.
>
>                     Cheers,
>                     Daniel.Sun
>
>
>
>                     --
>                     Sent from:
>                     http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>                     <http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html>
>
>
>
>
>         --
>         Uwe Schindler
>         Achterdiek 19, 28357 Bremen
>         <https://maps.google.com/?q=Achterdiek+19,+28357+Bremen&entry=gmail&source=g>
>         https://www.thetaphi.de
>
>
>


Re: Compiling groovy with java9 using maven with spring boot

Posted by Cédric Champeau <ce...@gmail.com>.
Thank you Paul!

2017-11-20 14:59 GMT+01:00 Paul King <pa...@asert.com.au>:

> I created an issue to track this:
> https://issues.apache.org/jira/browse/GROOVY-8387
>
> On Mon, Nov 20, 2017 at 5:47 PM, Uwe Schindler <uw...@thetaphi.de> wrote:
>
>> Hi,
>>
>> Yes, this is risky when you update ASM to 6.0. I had the same issue
>> during repackage, but I fixed it:
>>
>> https://github.com/policeman-tools/forbidden-apis/commit/165
>> 4d5d38e40ee500ca7ae82b146ed6fcfba0827
>>
>>
>> Am 20. November 2017 08:34:02 MEZ schrieb "Cédric Champeau" <
>> cedric.champeau@gmail.com>:
>>>
>>> I don't find any evidence of `module-info` file on `master` or 2.6.X. On
>>> the other hand, we have the ASM module-info file bundled, because we
>>> repackage. This is a mistake that needs to be fixed. So, false alarm,
>>> Daniel: WE didn't add a module-info file: a dependency of ours, ASM, has
>>> one, and when we create our jars it should be removed.
>>>
>>> 2017-11-20 8:28 GMT+01:00 Cédric Champeau <ce...@gmail.com>:
>>>
>>>> We should remove it: it doesn't make sense to have a module info at
>>>> this point, when we don't even know what we require, export, and when all
>>>> of our dependencies are not modules. And I'm not talking about our
>>>> different artifacts. If this was an experiment, it shouldn't have landed on
>>>> master. It will cause more harm than anything else if people try Groovy as
>>>> a module.
>>>>
>>>>
>>>> 2017-11-20 8:20 GMT+01:00 Daniel Sun <re...@hotmail.com>:
>>>>
>>>>> Hi  Cédric,
>>>>>
>>>>>       I do not know who contributed the module-info, which seems to
>>>>> exist
>>>>> for a long time.
>>>>>
>>>>> Cheers,
>>>>> Daniel.Sun
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>>>>>
>>>>
>>>>
>>>
>> --
>> Uwe Schindler
>> Achterdiek 19, 28357 Bremen
>> <https://maps.google.com/?q=Achterdiek+19,+28357+Bremen&entry=gmail&source=g>
>> https://www.thetaphi.de
>>
>
>

Re: Compiling groovy with java9 using maven with spring boot

Posted by Paul King <pa...@asert.com.au>.
I created an issue to track this:
https://issues.apache.org/jira/browse/GROOVY-8387

On Mon, Nov 20, 2017 at 5:47 PM, Uwe Schindler <uw...@thetaphi.de> wrote:

> Hi,
>
> Yes, this is risky when you update ASM to 6.0. I had the same issue during
> repackage, but I fixed it:
>
> https://github.com/policeman-tools/forbidden-apis/commit/
> 1654d5d38e40ee500ca7ae82b146ed6fcfba0827
>
>
> Am 20. November 2017 08:34:02 MEZ schrieb "Cédric Champeau" <
> cedric.champeau@gmail.com>:
>>
>> I don't find any evidence of `module-info` file on `master` or 2.6.X. On
>> the other hand, we have the ASM module-info file bundled, because we
>> repackage. This is a mistake that needs to be fixed. So, false alarm,
>> Daniel: WE didn't add a module-info file: a dependency of ours, ASM, has
>> one, and when we create our jars it should be removed.
>>
>> 2017-11-20 8:28 GMT+01:00 Cédric Champeau <ce...@gmail.com>:
>>
>>> We should remove it: it doesn't make sense to have a module info at this
>>> point, when we don't even know what we require, export, and when all of our
>>> dependencies are not modules. And I'm not talking about our different
>>> artifacts. If this was an experiment, it shouldn't have landed on master.
>>> It will cause more harm than anything else if people try Groovy as a module.
>>>
>>>
>>> 2017-11-20 8:20 GMT+01:00 Daniel Sun <re...@hotmail.com>:
>>>
>>>> Hi  Cédric,
>>>>
>>>>       I do not know who contributed the module-info, which seems to
>>>> exist
>>>> for a long time.
>>>>
>>>> Cheers,
>>>> Daniel.Sun
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>>>>
>>>
>>>
>>
> --
> Uwe Schindler
> Achterdiek 19, 28357 Bremen
> <https://maps.google.com/?q=Achterdiek+19,+28357+Bremen&entry=gmail&source=g>
> https://www.thetaphi.de
>

Re: Compiling groovy with java9 using maven with spring boot

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,

Yes, this is risky when you update ASM to 6.0. I had the same issue during repackage, but I fixed it:

https://github.com/policeman-tools/forbidden-apis/commit/1654d5d38e40ee500ca7ae82b146ed6fcfba0827

Am 20. November 2017 08:34:02 MEZ schrieb "Cédric Champeau" <ce...@gmail.com>:
>I don't find any evidence of `module-info` file on `master` or 2.6.X.
>On
>the other hand, we have the ASM module-info file bundled, because we
>repackage. This is a mistake that needs to be fixed. So, false alarm,
>Daniel: WE didn't add a module-info file: a dependency of ours, ASM,
>has
>one, and when we create our jars it should be removed.
>
>2017-11-20 8:28 GMT+01:00 Cédric Champeau <ce...@gmail.com>:
>
>> We should remove it: it doesn't make sense to have a module info at
>this
>> point, when we don't even know what we require, export, and when all
>of our
>> dependencies are not modules. And I'm not talking about our different
>> artifacts. If this was an experiment, it shouldn't have landed on
>master.
>> It will cause more harm than anything else if people try Groovy as a
>module.
>>
>>
>> 2017-11-20 8:20 GMT+01:00 Daniel Sun <re...@hotmail.com>:
>>
>>> Hi  Cédric,
>>>
>>>       I do not know who contributed the module-info, which seems to
>exist
>>> for a long time.
>>>
>>> Cheers,
>>> Daniel.Sun
>>>
>>>
>>>
>>> --
>>> Sent from:
>http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>>>
>>
>>

--
Uwe Schindler
Achterdiek 19, 28357 Bremen
https://www.thetaphi.de

Re: Compiling groovy with java9 using maven with spring boot

Posted by Cédric Champeau <ce...@gmail.com>.
I don't find any evidence of `module-info` file on `master` or 2.6.X. On
the other hand, we have the ASM module-info file bundled, because we
repackage. This is a mistake that needs to be fixed. So, false alarm,
Daniel: WE didn't add a module-info file: a dependency of ours, ASM, has
one, and when we create our jars it should be removed.

2017-11-20 8:28 GMT+01:00 Cédric Champeau <ce...@gmail.com>:

> We should remove it: it doesn't make sense to have a module info at this
> point, when we don't even know what we require, export, and when all of our
> dependencies are not modules. And I'm not talking about our different
> artifacts. If this was an experiment, it shouldn't have landed on master.
> It will cause more harm than anything else if people try Groovy as a module.
>
>
> 2017-11-20 8:20 GMT+01:00 Daniel Sun <re...@hotmail.com>:
>
>> Hi  Cédric,
>>
>>       I do not know who contributed the module-info, which seems to exist
>> for a long time.
>>
>> Cheers,
>> Daniel.Sun
>>
>>
>>
>> --
>> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>>
>
>

Re: Compiling groovy with java9 using maven with spring boot

Posted by Cédric Champeau <ce...@gmail.com>.
We should remove it: it doesn't make sense to have a module info at this
point, when we don't even know what we require, export, and when all of our
dependencies are not modules. And I'm not talking about our different
artifacts. If this was an experiment, it shouldn't have landed on master.
It will cause more harm than anything else if people try Groovy as a module.


2017-11-20 8:20 GMT+01:00 Daniel Sun <re...@hotmail.com>:

> Hi  Cédric,
>
>       I do not know who contributed the module-info, which seems to exist
> for a long time.
>
> Cheers,
> Daniel.Sun
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>

Re: Compiling groovy with java9 using maven with spring boot

Posted by Daniel Sun <re...@hotmail.com>.
Hi  Cédric,

      I do not know who contributed the module-info, which seems to exist
for a long time.

Cheers,
Daniel.Sun



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Re: Compiling groovy with java9 using maven with spring boot

Posted by Cédric Champeau <ce...@gmail.com>.
Since when did we integrate a module info file? We should not. Please, stop
integrating such changes without discussions.

Le 20 nov. 2017 8:10 AM, "Daniel Sun" <re...@hotmail.com> a écrit :

> Please try to use Groovy 2.6.0, which is designed as a fat module and
> contains a module-info class file.
>
> Cheers,
> Daniel.Sun
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>

Re: Compiling groovy with java9 using maven with spring boot

Posted by Daniel Sun <re...@hotmail.com>.
Please try to use Groovy 2.6.0, which is designed as a fat module and
contains a module-info class file.

Cheers,
Daniel.Sun



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html