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 D3914D88A for ; Tue, 5 Mar 2013 13:20:38 +0000 (UTC) Received: (qmail 79251 invoked by uid 500); 5 Mar 2013 13:20:36 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 78759 invoked by uid 500); 5 Mar 2013 13:20:36 -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 78732 invoked by uid 99); 5 Mar 2013 13:20:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Mar 2013 13:20:35 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of stephen.alan.connolly@gmail.com designates 74.125.82.41 as permitted sender) Received: from [74.125.82.41] (HELO mail-wg0-f41.google.com) (74.125.82.41) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Mar 2013 13:20:30 +0000 Received: by mail-wg0-f41.google.com with SMTP id ds1so2964264wgb.2 for ; Tue, 05 Mar 2013 05:20:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=KyDp2eZBr8rvkBzuKOix0mP3Q7W83EXeKKMExocWeGc=; b=LeKpdg+EXtZb7bSh2wTIEZsM/45tjUvgz6xin1xDhtukT4PYJfISP6PcWYzZ64v5bU 4Tcam1ymtm7/ub0L2+PkFpYkx0lE4EDeERFx1UlPYjF0MSuoUJapd4cnzwkYL6vU63XC nHUlfyEUsxxis++kK50M6rlted+k18bM/AxaLtJsqosuFHzic+vBTuuAtDIAlyb7r28w OPCAgFNeBWH1HgAGynfJIbheZNUr5VJDSpTtPz4Fmh5lbBCKe0I88Ys6C3pYrDRRQW3S aFQomDDw3hLb225KNEa+3dzfmsSywKo3knjTkyyiSjLTkHMGbXHmWG87+7U91ql140tr eYYQ== MIME-Version: 1.0 X-Received: by 10.194.173.167 with SMTP id bl7mr39266938wjc.50.1362489605933; Tue, 05 Mar 2013 05:20:05 -0800 (PST) Received: by 10.194.20.33 with HTTP; Tue, 5 Mar 2013 05:20:05 -0800 (PST) In-Reply-To: <20130305130549.D3D5FC77@athena.apache.org> References: <20130305130549.D3D5FC77@athena.apache.org> Date: Tue, 5 Mar 2013 13:20:05 +0000 Message-ID: Subject: Re: Initialize not running during Install? From: Stephen Connolly To: Maven Users List Content-Type: multipart/alternative; boundary=089e010d8510f8d12d04d72d5462 X-Virus-Checked: Checked by ClamAV on apache.org --089e010d8510f8d12d04d72d5462 Content-Type: text/plain; charset=ISO-8859-1 Before Maven starts executing plugins against projects, Maven first has to construct the build plan. The build plan needs to take into account the inter-project dependencies, so that the projects can be built in the correct sequence. So if A -> B -> C, Maven needs to ensure that C is built before A. This is the case irrespective of whether B is part of the reactor or not... because if C is part of the reactor, then A should be using the artifacts of C that were built from the reactor. So when you have a plugin execution bound to the lifecycle, and it says "I will need the dependencies" then Maven says: oh look, there will be a plugin that needs to resolve dependencies, therefore I need to compute the dependency graph and resolve it in order to ensure that any side-effects of the dependency graph do no affect my planned build order. So when you go "mvn initialize", Maven looks at the plugins, says only one plugin execution for this lifecycle, that doesn't need the dependencies resolved, fine the build plan is not going to be affected by inter-module dependencies, lets go When you go "mvn install", Maven looks at the plugins, sees some plugins will be needing to resolve dependencies (e.g. compiler:compile, compiler:test-compile, surefire:test) and says... hmmm I had better take a look at the dependencies to see if they may impact my build plan... oh dear I cannot find this dependency anywhere... fail the build, because it's going to fail anyway and better to fail fast than waste the developers time. I hope this explains Vincent's answer better for you. -Stephen On 5 March 2013 13:06, Macbeth, Andrew (US SSA) < andrew.macbeth@baesystems.com> wrote: > Anders, > I included the debug output and pom.xml's in my previous message. > Wondering if they didn't make it through to you. I've reattached them to > this message. If attachments aren't making it through, I'll resend with > contents pasted into the body of this message. > > A quick visual comparison of the debug output of initialize vs. install > indicates that the following does appear in initialize and does not appear > in install: > > [INFO] Installing ***/***/***/***/lib/jnetpcap.jar to > ***/***/.m2/repository/jnetpcap/jnetpcap/1.3.0/jnetpcap-1.3.0.jar > > Andy > > -----Original Message----- > From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On > Behalf Of Anders Hammar > Sent: Friday, March 01, 2013 2:18 AM > To: Maven Users List > Subject: Re: Initialize not running during Install? > > I doubt that this plugin is not executed when you perform a "mvn install" > if it executes for "mvn initialize". If it would be the case, it's a bug > in Maven core. > > If you're using Maven 3, the console output will very clearly state the > plugins being executed. Could you execute "mvn install" and ensure the > plugin is not being executed. Compare to the output of "mvn initialize". > > If you still think something is wrong, we need a test case to try to > reproduce. > > /Anders > > > On Thu, Feb 28, 2013 at 3:47 PM, Macbeth, Andrew (US SSA) < > andrew.macbeth@baesystems.com> wrote: > > > I am attempting to configure maven-install-plugin:install-file in my > > pom.xml. I want to install a third-party jar into my local repo. I > > prefer to run this in the pom.xml instead of command line so that > > developers on the team are unaffected and do not have to manually > > perform the install. An extract from my pom.xml is below. > > is set to run during the initialize phase. When I > > execute "mvn initialize" the jar is successfully installed into my > > local repo. However, when I run "mvn install", it does not get installed > (yes, I am clearing out the local repo between runs). > > Very puzzling. I have attached the parent and module poms, and the > > debug outputs from mvn initialize and mvn install.**** > > > > Help.**** > > > > ** ** > > > > **** > > > > **** > > > > **** > > > > **** > > > > > > org.apache.maven.plugins**** > > > > > > maven-install-plugin**** > > > > > > 2.4**** > > > > > > ** > > ** > > > > > > **** > > > > > > install-jnetpcap**** > > > > > > initialize**** > > > > > > **** > > > > > > install-file**** > > > > > > **** > > > > > > **** > > > > > > jnetpcap**** > > > > > > jnetpcap**** > > > > > > 1.3.0**** > > > > > > jar**** > > > > > > ${project.basedir}/lib/jnetpcap.jar**** > > > > > > true**** > > > > > > **** > > > > > > **** > > > > > > * > > *** > > > > **** > > > > **** > > > > **** > > > > **** > > > > ** ** > > > > ** ** > > > > Andrew J. Macbeth**** > > > > BAE Systems, Inc., ES-AIT**** > > > > 6 New England Executive Park, Burlington, MA**** > > > > (781) 262-4742**** > > > > ** ** > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > > For additional commands, e-mail: users-help@maven.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > For additional commands, e-mail: users-help@maven.apache.org > --089e010d8510f8d12d04d72d5462--