Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 663A47DD2 for ; Thu, 8 Sep 2011 06:28:49 +0000 (UTC) Received: (qmail 65530 invoked by uid 500); 8 Sep 2011 06:28:45 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 64740 invoked by uid 500); 8 Sep 2011 06:28:33 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 64726 invoked by uid 99); 8 Sep 2011 06:28:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2011 06:28:27 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bmathus@gmail.com designates 209.85.220.171 as permitted sender) Received: from [209.85.220.171] (HELO mail-vx0-f171.google.com) (209.85.220.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2011 06:28:20 +0000 Received: by vxh2 with SMTP id 2so409940vxh.30 for ; Wed, 07 Sep 2011 23:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=whCdBMBAoFgtsb13CcMEEGqQDena9I9sQZdfBzBlrJ0=; b=pjO3FUaivmmjfPT5mSgCJQLnCdEjRLBFRJWOa2/1M1EyDMqJVGY/e+aaLGEsCX4FRv 7IiuvSD4Ojw4a/ZwZbJMdUTFn94nIMzT6K7wITE92RwJNsljOytX1G4Fo3tcw785YzS8 oY4GE/qBcbCZxJ3N4qsD2l8lud6PYmxI9UB1U= MIME-Version: 1.0 Received: by 10.52.94.240 with SMTP id df16mr287540vdb.161.1315463279654; Wed, 07 Sep 2011 23:27:59 -0700 (PDT) Sender: bmathus@gmail.com Received: by 10.220.201.8 with HTTP; Wed, 7 Sep 2011 23:27:58 -0700 (PDT) Received: by 10.220.201.8 with HTTP; Wed, 7 Sep 2011 23:27:58 -0700 (PDT) In-Reply-To: References: Date: Thu, 8 Sep 2011 08:27:58 +0200 X-Google-Sender-Auth: DAewriG86kAprvtdpkiR5rXX42I Message-ID: Subject: Re: Plugin insantiation: once per execution? Once per build? From: Baptiste MATHUS To: Maven Users List Content-Type: multipart/alternative; boundary=20cf307cfc107fb8f604ac682916 X-Virus-Checked: Checked by ClamAV on apache.org --20cf307cfc107fb8f604ac682916 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I suppose that you ask that.because you're writing a mojo yourself. I don't know the answer but it seems to me it would quite simple to check it by code: just add a log in your constructor and see if displays once or man= y times. By the way, also think abt "thread-safing" your code to prevent having bugs using -T switch. Cheers Le 7 sept. 2011 21:21, "Laird Nelson" a =C3=A9crit : > What is the lifespan of a Mojo? > > Is a new one created for each execution? Is it discarded thereafter, or > does Maven retain a reference to it? > > Or is only one created and then reconfigured/reset? > > I didn't find any obvious documentation explaining this, but as usual my > apologies if I've overlooked something. > > Thanks, > Laird > > -- > http://about.me/lairdnelson --20cf307cfc107fb8f604ac682916--