Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6B5C4200BF4 for ; Fri, 6 Jan 2017 15:36:42 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6A02C160B37; Fri, 6 Jan 2017 14:36:42 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6691C160B1F for ; Fri, 6 Jan 2017 15:36:41 +0100 (CET) Received: (qmail 88500 invoked by uid 500); 6 Jan 2017 14:36:40 -0000 Mailing-List: contact dev-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list dev@groovy.apache.org Received: (qmail 88490 invoked by uid 99); 6 Jan 2017 14:36:40 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jan 2017 14:36:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E0883C155F for ; Fri, 6 Jan 2017 14:36:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 69ZCjaRMKVaA for ; Fri, 6 Jan 2017 14:36:38 +0000 (UTC) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 31B525F1B8 for ; Fri, 6 Jan 2017 14:36:38 +0000 (UTC) Received: by mail-wm0-f46.google.com with SMTP id c85so27328202wmi.1 for ; Fri, 06 Jan 2017 06:36:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=tPzd4cMHBuxfUC4Z8rsQkvxsrVpn5572LPNuyOXxVsI=; b=XRn6Yu8xuVxni51N2jQYwV5K63oQNCbnTHa8BtlD5PsozjtNIrajHdEq8ZqHwYMK1W xcSSrgqacmLzYZVcLj2ZEzQXhUm6KB02YdbqlKWzN27j6T2iarCrUAAkDoUUsR6yGBOS l/q7I4ycquWOyUgVzVcAWTwsyL98BZBTXoNd225ba6v1hh7nJZGigIfc6gLYX9+k3JFx o63gAi1ZLamQZIp1Q1bePfaiv2yX3NE0HZW0n6ndmn5YL6AGYpdC1z9qh21+5L7U9Qm8 x3nVPm5qIHDaUEcnGjjgu2Zakm4LOir3snjGIJPqm0GDQK8SjUYpURI6JLKxGVcIbVE/ o6/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=tPzd4cMHBuxfUC4Z8rsQkvxsrVpn5572LPNuyOXxVsI=; b=MVbCCtTvYhHZk+HKRv6WfaNFfQYZFze2N/HH5MFNcTuSMtiZx/CpXTyKMz3EL4d55g BqMwgUiSu72sLGt9ayrNs8nRUxkfZzORHXnBmWALNo+oh8Z12eCWq1WATQ9OBTVjShvO 2hWK6qWpeR6wcMV+fmYT1D116xMCyCkXNC6XVC/tmrz+PHVloxLmVEy0e74+im8cgVkd SfJN9dXhc05xYpdguT2st6xJJhwrfP3kaLM9mGfIBe1YUFe6Wb+Y1t+7LkqJCtuhmptp i6EN0EGN5MeMa2kibeSNIPSMgTMYmG8QhDQYhAJ2VZDdGyJfGwqHJ+7FCfFs5WsGbORx XK+A== X-Gm-Message-State: AIkVDXIf9bTBmAL/3CQGyrlu4ePTL7qZhJJTGnSQ9ni/Dx2GlARL8UsxBKhwtutcbgZNjg3DpWtoIFyL0MwdJA== X-Received: by 10.28.87.21 with SMTP id l21mr4314379wmb.48.1483713397701; Fri, 06 Jan 2017 06:36:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.122.37 with HTTP; Fri, 6 Jan 2017 06:36:17 -0800 (PST) In-Reply-To: <586FAACB.3010008@gmx.org> References: <586FA1A9.2060602@gmx.org> <586FAACB.3010008@gmx.org> From: Romain Manni-Bucau Date: Fri, 6 Jan 2017 15:36:17 +0100 Message-ID: Subject: Re: MavenGrapeEngine? To: dev@groovy.apache.org Content-Type: multipart/alternative; boundary=001a11444f2204c69405456df26e archived-at: Fri, 06 Jan 2017 14:36:42 -0000 --001a11444f2204c69405456df26e Content-Type: text/plain; charset=UTF-8 2017-01-06 15:33 GMT+01:00 Jochen Theodorou : > On 06.01.2017 15:00, Romain Manni-Bucau wrote: > [...] > >> Means SNAPSHOT patterns needs to be identified (likely a flag in the >> @Grab(snapshot=true)?) and groovy should clean up the artifacts before >> resolving to avoid to let ivy mess up its repo. >> > > which means it is more than just a change in the configuration file. > > Both options are valid but I think you had a good point and it can be API intrusive > For maven based artifact >> it also means you run copies instead of maven repository ones which is >> leading to unexpected runtime sometimes. >> > > can you explain a bit more? you mean the local ivy repo with copy? > > Yes, if you don't remove the snapshot copy from ~/.groovy/grapes/ then you use the last resolved one which is likely outdated with maven repo. > - what kind of SPI groovy would use (ATM GrapeEngine lookup is >> quite >> hardcoded): do we want a config in groovy installation + system >> property? >> >> would someone want to define the engine as part of the annotation or >> should this be automatic in the background? We could also think of >> using the Java service provider interface logic - of course then we >> have to think about what to do if multiple engines are there >> >> sounds good in @Grab with probably a default globally settable in the >> script. >> > > yes I think we can do that > > - if we want another engine: how do we manage dependencies? do we >> isolate them from groovy libs? >> >> >> they should be optional for the delivery.... and in the light of >> that I think depending on spring-boot-cli is an option >> >> Alternative is to implement it in groovy without maven in a light >> fashion, with >> https://github.com/apache/tomee/blob/master/container/openej >> b-loader/src/main/java/org/apache/openejb/loader/provisin >> ing/MavenResolver.java >> and >> https://github.com/apache/tomee/blob/master/container/openej >> b-loader/src/main/java/org/apache/openejb/loader/provisin >> ing/HttpResolver.java >> you can resolve most of maven artifacts. This code needs to be reworked >> on its config side cause it is specific to tomee but my point is in < >> 400 LOC you can get a maven resolver you own and therefore supporting >> snapshots is very doable there. >> > > I would prefer depending on something existing, but 400 LOC is not much > and if that goes without further dependencies... well then we should > consider doing that > > Agree, I only know aether (or its forks) which are far from 400 LOC but alternatives welcomed as well if they exist > bye Jochen > > --001a11444f2204c69405456df26e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


2017-01-06 15:33 GMT+01:00 Jochen Theodorou = <blackdrag@gmx.org>:
On 06.01.2017 15:00, Romain Manni-Bucau wrote:
[...]
Means SNAPSHOT patterns needs to be identified (likely a flag in the
@Grab(snapshot=3Dtrue)?) and groovy should clean up the artifacts before resolving to avoid to let ivy mess up its repo.

which means it is more than just a change in the configuration file.


Both options are valid but I th= ink you had a good point and it can be API intrusive
=C2=A0
=
For maven based artifact
it also means you run copies instead of maven repository ones which is
leading to unexpected runtime sometimes.

can you explain a bit more? you mean the local ivy repo with copy?


Yes, if you don't remove th= e snapshot copy from=C2=A0~/.groovy/grapes/ then you use the last resolved = one which is likely outdated with maven repo.
=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - what kind of SPI groovy would use (ATM GrapeE= ngine lookup is quite
=C2=A0 =C2=A0 =C2=A0 =C2=A0 hardcoded): do we want a config in groovy insta= llation + system
=C2=A0 =C2=A0 =C2=A0 =C2=A0 property?

=C2=A0 =C2=A0 would someone want to define the engine as part of the annota= tion or
=C2=A0 =C2=A0 should this be automatic in the background? We could also thi= nk of
=C2=A0 =C2=A0 using the Java service provider interface logic - of course t= hen we
=C2=A0 =C2=A0 have to think about what to do if multiple engines are there<= br>
sounds good in @Grab with probably a default globally settable in the
script.

yes I think we can do that

=C2=A0 =C2=A0 =C2=A0 =C2=A0 - if we want another engine: how do we manage d= ependencies? do we
=C2=A0 =C2=A0 =C2=A0 =C2=A0 isolate them from groovy libs?


=C2=A0 =C2=A0 they should be optional for the delivery.... and in the light= of
=C2=A0 =C2=A0 that I think depending on spring-boot-cli is an option

Alternative is to implement it in groovy without maven in a light
fashion, with
https://github.com/apache/tomee= /blob/master/container/openejb-loader/src/main/java/org/apache/op= enejb/loader/provisining/MavenResolver.java
and
https://github.com/apache/tomee/= blob/master/container/openejb-loader/src/main/java/org/apache/ope= nejb/loader/provisining/HttpResolver.java
you can resolve most of maven artifacts. This code needs to be reworked
on its config side cause it is specific to tomee but my point is in < 400 LOC you can get a maven resolver you own and therefore supporting
snapshots is very doable there.

I would prefer depending on something existing, but 400 LOC is not much and= if that goes without further dependencies... well then we should consider = doing that


Agree, I only know aether (or its fork= s) which are far from 400 LOC but alternatives welcomed as well if they exi= st
=C2=A0
bye Jochen


--001a11444f2204c69405456df26e--