Return-Path: X-Original-To: apmail-ant-user-archive@www.apache.org Delivered-To: apmail-ant-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 538E5EDAC for ; Fri, 1 Feb 2013 02:08:12 +0000 (UTC) Received: (qmail 21637 invoked by uid 500); 1 Feb 2013 02:08:11 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 21558 invoked by uid 500); 1 Feb 2013 02:08:11 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 21545 invoked by uid 99); 1 Feb 2013 02:08:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2013 02:08:11 +0000 X-ASF-Spam-Status: No, hits=3.2 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of antoine@gmx.de designates 212.227.17.20 as permitted sender) Received: from [212.227.17.20] (HELO mout.gmx.net) (212.227.17.20) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2013 02:08:03 +0000 Received: from mailout-de.gmx.net ([10.1.76.28]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MYqSb-1UV7LZ2H9H-00Vfa0 for ; Fri, 01 Feb 2013 03:07:42 +0100 Received: (qmail invoked by alias); 01 Feb 2013 02:07:41 -0000 Received: from pool-72-89-106-218.nycmny.east.verizon.net (EHLO [192.168.1.72]) [72.89.106.218] by mail.gmx.net (mp028) with SMTP; 01 Feb 2013 03:07:41 +0100 X-Authenticated: #22961642 X-Provags-ID: V01U2FsdGVkX18h3nYd8D8h7rR/nz5D5DKpQtpqQDMcOq/PE7PKci QxY+WezPuUU/pM From: Antoine Levy Lambert Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_58E3FCC0-1C11-4654-8624-2E4F29FB51AC" Subject: Re: Problem with GPG plugin from Ant task Date: Thu, 31 Jan 2013 21:07:39 -0500 In-Reply-To: To: "Ant Users List" References: ,<64A433F3-7CF2-4BEC-8708-8F19FCCC75C2@gmx.de>, Message-Id: X-Mailer: Apple Mail (2.1283) X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_58E3FCC0-1C11-4654-8624-2E4F29FB51AC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Hello Martin, there is already an ant task in this codebase [1]: Antoine [1] = http://svn.apache.org/repos/asf/commons/sandbox/openpgp/trunk/src/main/jav= a/org/apache/commons/openpgp/ant/OpenPgpSignerTask.java On Jan 31, 2013, at 3:49 PM, Martin Gainty wrote: >=20 > Antoine >=20 > can we take the Mojo source and re-factor to ANT taskdef class? > package org.apache.maven.plugin.gpg; /* * Licensed to the Apache = Software Foundation (ASF) under one * or more contributor license = agreements. See the NOTICE file * distributed with this work for = additional information * regarding copyright ownership. The ASF = licenses this file * to you under the Apache License, Version 2.0 (the * = "License"); you may not use this file except in compliance * with the = License. You may obtain a copy of the License at * * = http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by = applicable law or agreed to in writing, * software distributed under the = License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR = CONDITIONS OF ANY * KIND, either express or implied. See the License = for the * specific language governing permissions and limitations * = under the License. */ >=20 > import java.io.File;import java.io.IOException;import = java.util.ArrayList;import java.util.Iterator;import = java.util.List;import org.apache.maven.artifact.Artifact;import = org.apache.maven.plugin.MojoExecutionException;import = org.apache.maven.plugin.MojoFailureException;import = org.apache.maven.project.MavenProject;import = org.apache.maven.project.MavenProjectHelper;import = org.codehaus.plexus.util.FileUtils;import = org.codehaus.plexus.util.SelectorUtils; >=20 >=20 >=20 >=20 > http://maven.apache.org/plugins/maven-gpg-plugin/project-info.html >=20 > Martin Gainty=20 > ______________________________________________=20 > Jogi =E9s Bizalmass=E1gi kinyilatkoztat=E1s/Verzicht und = Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit=E9 > Ez az > =FCzenet bizalmas. Ha nem =F6n az akinek sz=E1nva volt, akkor k=E9rj=FC= k, hogy > jelentse azt nek=FCnk vissza. Semmif=E9le tov=E1bb=EDt=E1sa vagy = m=E1solat=E1nak > k=E9sz=EDt=E9se nem megengedett. Ez az =FCzenet csak ismeret cser=E9t = szolg=E1l =E9s > semmif=E9le jogi alkalmazhat=F3s=E1ga sincs. Mivel az electronikus = =FCzenetek > k=F6nnyen megv=E1ltoztathat=F3ak, ez=E9rt minket semmi felel=F6s=E9g = nem terhelhet > ezen =FCzenet tartalma miatt. >=20 > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene = Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede = unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. = Diese Nachricht dient lediglich dem Austausch von Informationen und = entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten = Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt = uebernehmen. > Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous = n'=EAtes pas le destinataire pr=E9vu, nous te demandons avec bont=E9 que = pour satisfaire informez l'exp=E9diteur. N'importe quelle diffusion non = autoris=E9e ou la copie de ceci est interdite. Ce message sert =E0 = l'information seulement et n'aura pas n'importe quel effet l=E9galement = obligatoire. =C9tant donn=E9 que les email peuvent facilement =EAtre = sujets =E0 la manipulation, nous ne pouvons accepter aucune = responsabilit=E9 pour le contenu fourni. >=20 >> Date: Wed, 30 Jan 2013 19:08:33 -0800 >> Subject: Re: Problem with GPG plugin from Ant task >> From: lewis.mcgibbney@gmail.com >> To: user@ant.apache.org >>=20 >> Hi Antoine, >> Thank you very much for your suggestion. I need to be honest with you >> though and say that we ended up changing the entire build to Maven to = fix >> the problem and now everything works fine. It was sapping hours of my = time >> looking for an answer so we made the decision to shift :0( >> Thank you for the feedback, hopefully now that this thread exists = others >> can benefit. >> Best >> Lewis >>=20 >> On Wed, Jan 30, 2013 at 6:22 PM, Antoine Levy Lambert = wrote: >>=20 >>> Hello Lewis, >>>=20 >>> there is a project in the commons sandbox at Apache with which you = can PGP >>> sign artifacts in an Ant build >>>=20 >>> The source code is there [1] >>>=20 >>> There is an example of usage of this here [2] >>>=20 >>> We use that when producing releases of Ant. >>>=20 >>> Maybe this can help you ? >>>=20 >>> Regards, >>>=20 >>> Antoine >>>=20 >>> [1] http://svn.apache.org/repos/asf/commons/sandbox/openpgp/trunk/ >>> [2] = http://svn.apache.org/repos/asf/ant/core/trunk/release/signit.xml >>>=20 >>>=20 >>>=20 >>> On Jan 29, 2013, at 6:47 PM, Lewis John Mcgibbney wrote: >>>=20 >>>> Hi, >>>> Having looked high and low for a resolution, I've been unable to = find >>> one. >>>> I'm in the process of pushing a release on a small project which = uses ant >>>> tasks + maven for the build lifecycle. >>>> I am attempting to deploy to sonatype staging repository with the >>> following >>>> configuration >>>>=20 >>>> ... >>>> >>>> >>> value=3D"sonatype-nexus-snapshots" /> >>>> >>> = value=3D"https://oss.sonatype.org/content/repositories/snapshots/ >>> "; >>>> /> >>>> >>> value=3D"sonatype-nexus-staging" /> >>>> >>> value=3D" >>>> https://oss.sonatype.org/service/local/staging/deploy/maven2/"; >>>> /> >>>> ... >>>> >>> description=3D"--> deploy release version to Maven staging >>>> repository" >>>> xmlns:artifact=3D"urn:maven-artifact-ant"> >>>> >>>> >>>> >>>=20 >>>>=20 >>> = value=3D"org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-fil= e" >>>> /> >>>> >>>> >>>> >>>> >>>> >>>> >>>>=20 >>>> >>>> >>>> >>>=20 >>>>=20 >>> = value=3D"org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-fil= e" >>>> /> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>>=20 >>>> >>>> >>>> >>>=20 >>>>=20 >>> = value=3D"org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-fil= e" >>>> /> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>>=20 >>>> However when I run the stage target, I get the following >>>>=20 >>>> [artifact:mvn] [INFO] task-segment: >>>> = [org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file] >>>> (aggregator-style) >>>> [artifact:mvn] [INFO] >>>> = ------------------------------------------------------------------------ >>>> [artifact:mvn] [INFO] [gpg:sign-and-deploy-file] >>>> [artifact:mvn] [INFO] >>>> = ------------------------------------------------------------------------ >>>> [artifact:mvn] [ERROR] BUILD FAILURE >>>> [artifact:mvn] [INFO] >>>> = ------------------------------------------------------------------------ >>>> [artifact:mvn] [INFO] Cannot obtain passphrase in batch mode >>>> [artifact:mvn] [INFO] >>>> = ------------------------------------------------------------------------ >>>> [artifact:mvn] [INFO] For more information, run Maven with the -e = switch >>>> [artifact:mvn] [INFO] >>>> = ------------------------------------------------------------------------ >>>> [artifact:mvn] [INFO] Total time: 2 seconds >>>> [artifact:mvn] [INFO] Finished at: Sun Jan 27 21:37:35 PST 2013 >>>> [artifact:mvn] [INFO] Final Memory: 16M/40M >>>> [artifact:mvn] [INFO] >>>> = ------------------------------------------------------------------------ >>>> [artifact:mvn] Java Result: 1 >>>>=20 >>>> There is very little on the dreaded "Cannot obtain passphrase in = batch >>>> mode". >>>> Even when I use overrides on the command line e.g. ant stage >>>> -Dpassphrase=3D${passphrase}, I still get the above. >>>>=20 >>>> Does anyone have a suggestion on how I can run Maven (from an Ant >>>> task) to operate in interactive (non-batch) mode? >>>>=20 >>>> Any ideas? Thanks very much in advance >>>>=20 >>>> Lewis >>>>=20 >>>>=20 >>>>=20 >>>> -- >>>> *Lewis* >>>=20 >>>=20 >>=20 >>=20 >> --=20 >> *Lewis* > =20 --Apple-Mail=_58E3FCC0-1C11-4654-8624-2E4F29FB51AC--