You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by Misagh Moayyed <mi...@tirasa.net> on 2019/09/25 08:05:04 UTC

[DISCUSS] Enabling Apache Maven wrapper

Hello all,

I have proposed a pull request [1] to enable the maven wrapper plugin for Syncope. This is a plugin that allows one to build and run Syncope from source without having to install Maven locally. It's able to download and configure the appropriate maven version automatically, and then proceeds as if it was locally installed and available.

There are a number of advantages to using the wrapper:

- Contributors to Syncope do not have to have Maven downloaded/installed locally, though nothing would prevent them from doing so. 
- This should also prevent conflicts by allowing usage a specific install of maven for Syncope, in case one might need different maven versions on their system for different projects, etc.
- The wrapper makes sure the correct version of maven is downloaded and installed, removing potential confusing around "If I do install maven locally, what version of Maven do I need?"
- The maven version is controlled by the project for CI tests, and not by the CI system itself, which is useful in case CI decides to change/update versions or goes outdated for any reason.
- The maintenance and overhead of the change is very minimal where future changes to the maven version are controlled with a simple properties file.

How do others feel about this change? 

--Misagh

[1] https://github.com/apache/syncope/pull/122

Re: [DISCUSS] Enabling Apache Maven wrapper

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 25/09/19 18:27, Misagh Moayyed wrote:
> This is fair; no problem. Based on your list, I certainly agree that #3 and #4 are complications best not dealt with :) 

Sorry for this: as a community, we cut our teeth in the ASF Incubator, striving to define a release process fully compliant with ASF legal requirements and practical enough for devs.

If you are interested, there is something to read at:

* https://www.apache.org/dev/#licenses

* https://www.apache.org/dev/#releases

Will you close the PR #122 at this point?
Regards.

> ----- Original Message -----
>> From: "Francesco Chicchiriccò" <il...@apache.org>
>> To: "dev" <de...@syncope.apache.org>
>> Sent: Wednesday, September 25, 2019 1:50:24 PM
>> Subject: Re: [DISCUSS] Enabling Apache Maven wrapper
>> On 25/09/19 10:05, Misagh Moayyed wrote:
>>> Hello all,
>>>
>>> I have proposed a pull request [1] to enable the maven wrapper plugin for
>>> Syncope. This is a plugin that allows one to build and run Syncope from source
>>> without having to install Maven locally. It's able to download and configure
>>> the appropriate maven version automatically, and then proceeds as if it was
>>> locally installed and available.
>>>
>>> There are a number of advantages to using the wrapper:
>>>
>>> - Contributors to Syncope do not have to have Maven downloaded/installed
>>> locally, though nothing would prevent them from doing so.
>>> - This should also prevent conflicts by allowing usage a specific install of
>>> maven for Syncope, in case one might need different maven versions on their
>>> system for different projects, etc.
>>> - The wrapper makes sure the correct version of maven is downloaded and
>>> installed, removing potential confusing around "If I do install maven locally,
>>> what version of Maven do I need?"
>>> - The maven version is controlled by the project for CI tests, and not by the CI
>>> system itself, which is useful in case CI decides to change/update versions or
>>> goes outdated for any reason.
>>> - The maintenance and overhead of the change is very minimal where future
>>> changes to the maven version are controlled with a simple properties file.
>>>
>>> How do others feel about this change?
>> Hi Misagh,
>> thanks for bringing this to discussion.
>>
>> Honestly, I don't see much value added by this:
>>
>> 1. Syncope does not simply require "a specific Maven version"; rather, we run
>> the maven-enforcer-plugin as part of the build, which checks Maven version is
>>> = 3.50 and JDK version
>> 2. We've never had troubles with CIs due to Maven version
>>
>> 3. Apache RAT analysis has failed on your PR [3], and I suspect this is because
>> of non-compliant [4] or missing [5] license headers - I am wondering whether
>> these can be changed, or we are not allowed simply because we are importing
>> source files from a different entity than ASF
>>
>> 4. We would be adding binary files [6] to our source tree; this would imply
>> changing our root LICENSE / NOTICE files + adjusting the source package
>> management during release process
>>
>> 5. I haven't made an extensive search, but I could not find any usage of Maven
>> wrapper in any of the ASF projects I am involved in
>>
>> 6. <hyperbolic_mode>Why limit to Maven? Why not bundling JDK? Or operating
>> system?</hyperbolic_mode>
>>
>> Summarizing: I don't find enough reasons to be -1 against such proposed change,
>> but I would rather avoid the amount of troubles it brings (especially for
>> releases), as I see the trade-off with benefits extremely low.
>>
>> Regards.
>>
>>> [1] https://github.com/apache/syncope/pull/122
>> [2] https://github.com/apache/syncope/blob/master/pom.xml#L2123-L2145
>> [3] https://travis-ci.org/apache/syncope/jobs/588979502
>> [4] https://github.com/apache/syncope/pull/122/files#diff-59a310fc0b8358d0c91a717f18f7cfedR1-R15
>> [5] https://github.com/apache/syncope/pull/122/files#diff-de2bfeb3d4c0f4a0b3af8d261a26a21aR1
>> [6] https://github.com/apache/syncope/pull/122/files#diff-2e0bce82bce59a26bc532fbc92db892e

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


Re: [DISCUSS] Enabling Apache Maven wrapper

Posted by Misagh Moayyed <mi...@tirasa.net>.
This is fair; no problem. Based on your list, I certainly agree that #3 and #4 are complications best not dealt with :) 

--Misagh

----- Original Message -----
> From: "Francesco Chicchiriccò" <il...@apache.org>
> To: "dev" <de...@syncope.apache.org>
> Sent: Wednesday, September 25, 2019 1:50:24 PM
> Subject: Re: [DISCUSS] Enabling Apache Maven wrapper

> On 25/09/19 10:05, Misagh Moayyed wrote:
>> Hello all,
>>
>> I have proposed a pull request [1] to enable the maven wrapper plugin for
>> Syncope. This is a plugin that allows one to build and run Syncope from source
>> without having to install Maven locally. It's able to download and configure
>> the appropriate maven version automatically, and then proceeds as if it was
>> locally installed and available.
>>
>> There are a number of advantages to using the wrapper:
>>
>> - Contributors to Syncope do not have to have Maven downloaded/installed
>> locally, though nothing would prevent them from doing so.
>> - This should also prevent conflicts by allowing usage a specific install of
>> maven for Syncope, in case one might need different maven versions on their
>> system for different projects, etc.
>> - The wrapper makes sure the correct version of maven is downloaded and
>> installed, removing potential confusing around "If I do install maven locally,
>> what version of Maven do I need?"
>> - The maven version is controlled by the project for CI tests, and not by the CI
>> system itself, which is useful in case CI decides to change/update versions or
>> goes outdated for any reason.
>> - The maintenance and overhead of the change is very minimal where future
>> changes to the maven version are controlled with a simple properties file.
>>
>> How do others feel about this change?
> Hi Misagh,
> thanks for bringing this to discussion.
> 
> Honestly, I don't see much value added by this:
> 
> 1. Syncope does not simply require "a specific Maven version"; rather, we run
> the maven-enforcer-plugin as part of the build, which checks Maven version is
> >= 3.50 and JDK version
> 
> 2. We've never had troubles with CIs due to Maven version
> 
> 3. Apache RAT analysis has failed on your PR [3], and I suspect this is because
> of non-compliant [4] or missing [5] license headers - I am wondering whether
> these can be changed, or we are not allowed simply because we are importing
> source files from a different entity than ASF
> 
> 4. We would be adding binary files [6] to our source tree; this would imply
> changing our root LICENSE / NOTICE files + adjusting the source package
> management during release process
> 
> 5. I haven't made an extensive search, but I could not find any usage of Maven
> wrapper in any of the ASF projects I am involved in
> 
> 6. <hyperbolic_mode>Why limit to Maven? Why not bundling JDK? Or operating
> system?</hyperbolic_mode>
> 
> Summarizing: I don't find enough reasons to be -1 against such proposed change,
> but I would rather avoid the amount of troubles it brings (especially for
> releases), as I see the trade-off with benefits extremely low.
> 
> Regards.
> 
>> [1] https://github.com/apache/syncope/pull/122
> [2] https://github.com/apache/syncope/blob/master/pom.xml#L2123-L2145
> [3] https://travis-ci.org/apache/syncope/jobs/588979502
> [4]
> https://github.com/apache/syncope/pull/122/files#diff-59a310fc0b8358d0c91a717f18f7cfedR1-R15
> [5]
> https://github.com/apache/syncope/pull/122/files#diff-de2bfeb3d4c0f4a0b3af8d261a26a21aR1
> [6]
> https://github.com/apache/syncope/pull/122/files#diff-2e0bce82bce59a26bc532fbc92db892e
> 
> --
> Francesco Chicchiriccò
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/

Re: [DISCUSS] Enabling Apache Maven wrapper

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 25/09/19 10:05, Misagh Moayyed wrote:
> Hello all,
>
> I have proposed a pull request [1] to enable the maven wrapper plugin for Syncope. This is a plugin that allows one to build and run Syncope from source without having to install Maven locally. It's able to download and configure the appropriate maven version automatically, and then proceeds as if it was locally installed and available.
>
> There are a number of advantages to using the wrapper:
>
> - Contributors to Syncope do not have to have Maven downloaded/installed locally, though nothing would prevent them from doing so. 
> - This should also prevent conflicts by allowing usage a specific install of maven for Syncope, in case one might need different maven versions on their system for different projects, etc.
> - The wrapper makes sure the correct version of maven is downloaded and installed, removing potential confusing around "If I do install maven locally, what version of Maven do I need?"
> - The maven version is controlled by the project for CI tests, and not by the CI system itself, which is useful in case CI decides to change/update versions or goes outdated for any reason.
> - The maintenance and overhead of the change is very minimal where future changes to the maven version are controlled with a simple properties file.
>
> How do others feel about this change? 
Hi Misagh,
thanks for bringing this to discussion.

Honestly, I don't see much value added by this:

1. Syncope does not simply require "a specific Maven version"; rather, we run the maven-enforcer-plugin as part of the build, which checks Maven version is >= 3.50 and JDK version

2. We've never had troubles with CIs due to Maven version

3. Apache RAT analysis has failed on your PR [3], and I suspect this is because of non-compliant [4] or missing [5] license headers - I am wondering whether these can be changed, or we are not allowed simply because we are importing source files from a different entity than ASF

4. We would be adding binary files [6] to our source tree; this would imply changing our root LICENSE / NOTICE files + adjusting the source package management during release process

5. I haven't made an extensive search, but I could not find any usage of Maven wrapper in any of the ASF projects I am involved in

6. <hyperbolic_mode>Why limit to Maven? Why not bundling JDK? Or operating system?</hyperbolic_mode>

Summarizing: I don't find enough reasons to be -1 against such proposed change, but I would rather avoid the amount of troubles it brings (especially for releases), as I see the trade-off with benefits extremely low.

Regards.

> [1] https://github.com/apache/syncope/pull/122
[2] https://github.com/apache/syncope/blob/master/pom.xml#L2123-L2145
[3] https://travis-ci.org/apache/syncope/jobs/588979502
[4] https://github.com/apache/syncope/pull/122/files#diff-59a310fc0b8358d0c91a717f18f7cfedR1-R15
[5] https://github.com/apache/syncope/pull/122/files#diff-de2bfeb3d4c0f4a0b3af8d261a26a21aR1
[6] https://github.com/apache/syncope/pull/122/files#diff-2e0bce82bce59a26bc532fbc92db892e

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


Re: [DISCUSS] Enabling Apache Maven wrapper

Posted by Andrea Patricelli <an...@apache.org>.
Il 25/09/19 10:51, Misagh Moayyed ha scritto:
>> Maybe is out of the scope of the plugin, but my only concern is about
>> the JDK on which maven relies (and Syncope needs to be built to have a
>> consistent artifact). Often the main build problems for users come from
>> "wrong" JDK versions used. Does this plugin also handles JDK versions in
>> a self-contained manner?
> Unfortunately, no. This specifically deals with Maven installs, and the plugin assumes a *correct* JDK version is already available, whatever it happens to be for the project. In fact, I am not aware of any similar solutions for the JDK. Most solutions I see rely on docker that uses a relevant openjdk base image and then the build executes commands inside the docker container's shell. It works, and it does have its own use cases but it's way too complicated to set up and reason about, for my taste.
Ok, thanks for the clarification. Since this solution does not impact a 
lot the code I do not see any problems on applying this PR.
>
> Speaking out loud, this plugin (or future efforts in this area) only impact contributors who deal with the Syncope codebase. Those who, for example, deploy Syncope using overlays and archetypes are unaffected by this, and may face similar issues. It might be interesting to include this sort of thing in the archetype as well, though we'd have a chicken-and-egg problem given that one needs maven to generate the project :) So, probably not worth the effort there.

Yes agree about this remora about adding it to the archetype.

Best regards,
Andrea

-- 
Dott. Andrea Patricelli
Tel. +39 3204524292

Engineer @ Tirasa S.r.l.
Viale Vittoria Colonna 97 - 65127 Pescara
Tel +39 0859116307 / FAX +39 0859111173
http://www.tirasa.net

Apache Syncope PMC Member


Re: [DISCUSS] Enabling Apache Maven wrapper

Posted by Misagh Moayyed <mi...@tirasa.net>.
> Maybe is out of the scope of the plugin, but my only concern is about
> the JDK on which maven relies (and Syncope needs to be built to have a
> consistent artifact). Often the main build problems for users come from
> "wrong" JDK versions used. Does this plugin also handles JDK versions in
> a self-contained manner?

Unfortunately, no. This specifically deals with Maven installs, and the plugin assumes a *correct* JDK version is already available, whatever it happens to be for the project. In fact, I am not aware of any similar solutions for the JDK. Most solutions I see rely on docker that uses a relevant openjdk base image and then the build executes commands inside the docker container's shell. It works, and it does have its own use cases but it's way too complicated to set up and reason about, for my taste. 

Speaking out loud, this plugin (or future efforts in this area) only impact contributors who deal with the Syncope codebase. Those who, for example, deploy Syncope using overlays and archetypes are unaffected by this, and may face similar issues. It might be interesting to include this sort of thing in the archetype as well, though we'd have a chicken-and-egg problem given that one needs maven to generate the project :) So, probably not worth the effort there.

Re: [DISCUSS] Enabling Apache Maven wrapper

Posted by Andrea Patricelli <an...@apache.org>.
Hi Misagh,

I've never heard about this plugin, but sounds good. I'm a fan of 
self-contained solutions :)

So +1 for me.

Maybe is out of the scope of the plugin, but my only concern is about 
the JDK on which maven relies (and Syncope needs to be built to have a 
consistent artifact). Often the main build problems for users come from 
"wrong" JDK versions used. Does this plugin also handles JDK versions in 
a self-contained manner?

I'm referring for example to problems faced in this ML issue [1].

Best regards,
Andrea

[1] 
https://lists.apache.org/thread.html/81777cfa04c8463ca6c3b8e344506982b29d923c8122b913c49273c6@%3Cuser.syncope.apache.org%3E

Il 25/09/19 10:05, Misagh Moayyed ha scritto:
> Hello all,
>
> I have proposed a pull request [1] to enable the maven wrapper plugin for Syncope. This is a plugin that allows one to build and run Syncope from source without having to install Maven locally. It's able to download and configure the appropriate maven version automatically, and then proceeds as if it was locally installed and available.
>
> There are a number of advantages to using the wrapper:
>
> - Contributors to Syncope do not have to have Maven downloaded/installed locally, though nothing would prevent them from doing so.
> - This should also prevent conflicts by allowing usage a specific install of maven for Syncope, in case one might need different maven versions on their system for different projects, etc.
> - The wrapper makes sure the correct version of maven is downloaded and installed, removing potential confusing around "If I do install maven locally, what version of Maven do I need?"
> - The maven version is controlled by the project for CI tests, and not by the CI system itself, which is useful in case CI decides to change/update versions or goes outdated for any reason.
> - The maintenance and overhead of the change is very minimal where future changes to the maven version are controlled with a simple properties file.
>
> How do others feel about this change?
>
> --Misagh
>
> [1] https://github.com/apache/syncope/pull/122

-- 
Dott. Andrea Patricelli
Tel. +39 3204524292

Engineer @ Tirasa S.r.l.
Viale Vittoria Colonna 97 - 65127 Pescara
Tel +39 0859116307 / FAX +39 0859111173
http://www.tirasa.net

Apache Syncope PMC Member