From users-return-1519-apmail-groovy-users-archive=groovy.apache.org@groovy.apache.org Wed Mar 23 09:08:18 2016 Return-Path: X-Original-To: apmail-groovy-users-archive@minotaur.apache.org Delivered-To: apmail-groovy-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7E61619E97 for ; Wed, 23 Mar 2016 09:08:18 +0000 (UTC) Received: (qmail 35840 invoked by uid 500); 23 Mar 2016 09:08:13 -0000 Delivered-To: apmail-groovy-users-archive@groovy.apache.org Received: (qmail 35805 invoked by uid 500); 23 Mar 2016 09:08:13 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 35795 invoked by uid 99); 23 Mar 2016 09:08:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2016 09:08:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id D9F4918021D for ; Wed, 23 Mar 2016 09:08:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.001 X-Spam-Level: X-Spam-Status: No, score=-2.001 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Cdopqiszz7rK for ; Wed, 23 Mar 2016 09:08:11 +0000 (UTC) Received: from cirse-out.extra.cea.fr (cirse-out.extra.cea.fr [132.167.192.142]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 559C35F234 for ; Wed, 23 Mar 2016 09:08:11 +0000 (UTC) Received: from pisaure.intra.cea.fr (pisaure.intra.cea.fr [132.166.88.21]) by cirse.extra.cea.fr (8.15.2/8.15.2/CEAnet-Internet-out-2.4) with ESMTP id u2N985Fd021377 for ; Wed, 23 Mar 2016 10:08:05 +0100 Received: from pisaure.intra.cea.fr (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 64AC520B228 for ; Wed, 23 Mar 2016 10:08:53 +0100 (CET) Received: from muguet2.intra.cea.fr (muguet2.intra.cea.fr [132.166.192.7]) by pisaure.intra.cea.fr (Postfix) with ESMTP id 56CB32007F9 for ; Wed, 23 Mar 2016 10:08:53 +0100 (CET) Received: from excah-b0.intra.cea.fr (excah-b0.intra.cea.fr [132.166.88.85]) by muguet2.intra.cea.fr (8.15.2/8.15.2/CEAnet-Intranet-out-1.4) with ESMTP id u2N984Qs023842 for ; Wed, 23 Mar 2016 10:08:04 +0100 Received: from EXDAG0-A3.intra.cea.fr ([fe80::25a1:c396:2106:4c5b]) by excah-b0.intra.cea.fr ([fe80::7542:b9de:5cc1:f613%10]) with mapi id 14.03.0266.001; Wed, 23 Mar 2016 10:08:04 +0100 From: DECLOEDT Loic EVADERIS To: "users@groovy.apache.org" CC: PAOLI Pierre EVADERIS , GUIU Vincent EVADERIS Subject: groovy issue with @Grab Thread-Topic: groovy issue with @Grab Thread-Index: AdGE4sdZrsSCTmdeT8u1Lfi2ms58Kw== Date: Wed, 23 Mar 2016 09:08:03 +0000 Message-ID: Accept-Language: fr-FR, en-US Content-Language: fr-FR X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [132.166.88.105] x-tm-as-product-ver: SMEX-11.0.0.4179-8.000.1202-22146.005 x-tm-as-result: No--43.266000-0.000000-31 x-tm-as-user-approved-sender: Yes x-tm-as-user-blocked-sender: No Content-Type: multipart/related; boundary="_004_C4B109F0B91C6C4FA3F90466457931851B2F192FEXDAG0A3intrace_"; type="multipart/alternative" MIME-Version: 1.0 --_004_C4B109F0B91C6C4FA3F90466457931851B2F192FEXDAG0A3intrace_ Content-Type: multipart/alternative; boundary="_000_C4B109F0B91C6C4FA3F90466457931851B2F192FEXDAG0A3intrace_" --_000_C4B109F0B91C6C4FA3F90466457931851B2F192FEXDAG0A3intrace_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I am taking the opportunity to inform you of an issue we have seen since a = long time. When a @Grab statement is in a script, the next statement MUST be a variabl= e statement. For example, a code like this: @Grapes([ @Grab('org.apache:commons-lang:2.6') ]) // this var declaration is required to avoid startup error //def i =3D 0 println "test1" println org.apache.commons.lang.WordUtils.capitalize("this is another test"= ) will fail like this: groovy test.groovy org.codehaus.groovy.control.MultipleCompilationErrorsException: startup fai= led: /home/ldecloed/Groovy/workspace/issueGrabStatement/test.groovy: 8: unexpect= ed token: println @ line 8, column 1. println "test1" ^ 1 error Although it works without problem if the 'i' variable declaration is uncomm= ented. Is it a known issue ? Regards, Lo=EFc -- Lo=EFc Decloedt CAD & Software Manager eVaderis [eVaderis-logo-CMJN-small1] Minatec Entreprise BHT 7, Parvis Louis N=E9el 38054 Grenoble Cedex 9 France Office : 04 38 7 80874 --_000_C4B109F0B91C6C4FA3F90466457931851B2F192FEXDAG0A3intrace_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi,

I am taking the opportunity to inform you of an issu= e we have seen since a long time.

When a @Grab statement is in a script, the next stat= ement MUST be a variable statement. For example, a code like this:

= @Grapes([

=   @Grab('org.apache:commons-lang:2.6')

= ])

=  

= // this var declaration is required to avoid startup error

= //def i =3D 0

=  

= println "test1"

=  

= println org.apache.commons.lang.WordUtils.capitalize("this is another = test")

will fail like this:

= groovy test.groovy

= org.codehaus.groovy.control.MultipleCompilationErrorsException: startup fai= led:

= /home/ldecloed/Groovy/workspace/issueGrabStatement/test.groovy: 8: unexpect= ed token: println @ line 8, column 1.

=    println "test1"

=    ^

=  

= 1 error

 

Although it works without problem if the ‘i= 217; variable declaration is uncommented.

Is it a known issue ?

 

Regards,

Lo=EFc

 

--

Lo=EFc Decloedt

CAD & Software Manager

eVaderis

3D"eVaderis-logo-CMJN-small1"

 

Minatec Entreprise BHT

7, Parvis Louis N=E9el

38054 Grenoble Cedex 9

France

Office : 04 38 7 80874

 

--_000_C4B109F0B91C6C4FA3F90466457931851B2F192FEXDAG0A3intrace_-- --_004_C4B109F0B91C6C4FA3F90466457931851B2F192FEXDAG0A3intrace_ Content-Type: image/png; name="image003.png" Content-Description: image003.png Content-Disposition: inline; filename="image003.png"; size=2354; creation-date="Wed, 23 Mar 2016 09:08:03 GMT"; modification-date="Wed, 23 Mar 2016 09:08:03 GMT" Content-ID: Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAAD4AAAASCAYAAAADr20JAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAO xAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUATWljcm9zb2Z0IE9mZmljZX/tNXEAAAiySURBVFhH 1VgHVFRnFv5Ghg5SpYiCoIISEUExgrAoIioJBoRFEIMaFaJo7LFELLEFl9gCrooFFDULG5Um6FpW LKCIBUMLNgQVBaRJm8Lkvn9gKOIxx3P2JHvPmQPz3v//9333fve79w1fImmRoFvjsatlryqRm/8U eYXP0FD3FqUVNahvFqK5oRnowYOqsgLGOAyFv7cLeDxuz3uO697Jn3aV/65nKeB8AppyLoOBGfqJ KaZ4OKK3oQ597yHbIhaLcSfnESKiTmPn/jOI3fstLAb2/b8A3wU4DyICc/hYKopLXsPX0xnWVv27 xKY9o3JycrCzMUfM3pVYuy0a7tNCcS15Bwz1tf/y4DsA56Gqug4/RsRjsLkxtoR+9Qdo2BYEHjav nonUS9nYHhmPnd8H/4G9f+6SVuA8vKmqxbbw4/D1Hgs720Gob2jC0bgLuHW3ECqKinBxsoY30R3o ro65APDg+4UTjsVdREtLC3r04Erir1vvB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