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 E9AF61072E for ; Thu, 7 Nov 2013 20:23:49 +0000 (UTC) Received: (qmail 56938 invoked by uid 500); 7 Nov 2013 20:23:48 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 56870 invoked by uid 500); 7 Nov 2013 20:23:48 -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 56862 invoked by uid 99); 7 Nov 2013 20:23:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Nov 2013 20:23:48 +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 douglass.doug@gmail.com designates 209.85.216.44 as permitted sender) Received: from [209.85.216.44] (HELO mail-qa0-f44.google.com) (209.85.216.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Nov 2013 20:23:43 +0000 Received: by mail-qa0-f44.google.com with SMTP id f11so906981qae.17 for ; Thu, 07 Nov 2013 12:23:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=zdmN0HCMudpZ4YCLF7z4ShCwVxLE53Nhy2zrtVPqbnE=; b=KhDMvEH93jveIoJoA2LsOPugX4YuE2QZahg5foM8wyH+eX1AFLgBo18AosliYCvDMs 6/qQh6o84h8balN5xAMz1kaxOuvoAA3PnMm32vaDdGF0emCqYiStQuNC0Inuo/syckZt gfQIjtk8lYSBFEKH3y5oN5JR1CWw62j3XA7tNo8rg92wcS5/uUUjH2NvlKeb+qZ/J6hq StzmZBJBxn+6zngeP9N9eknbC5H1oYTlv2x9uBkuVG/p7xDjf2VAiEoSVe1udgykAelB TKIvmzJzkrpS0Ftx12aeXnPPgSHu7883O7Rzfozkdb7cgjhcZ2las7zmDMEFP8iky1RI 6jUQ== MIME-Version: 1.0 X-Received: by 10.49.24.74 with SMTP id s10mr16450525qef.24.1383855802928; Thu, 07 Nov 2013 12:23:22 -0800 (PST) Received: by 10.224.32.70 with HTTP; Thu, 7 Nov 2013 12:23:22 -0800 (PST) In-Reply-To: <47FDDA82-A02A-44A4-8684-93A04F1CA5CA@Kriegisch.name> References: <20131107154608.DC96F11C0244@dd12814.kasserver.com> <47FDDA82-A02A-44A4-8684-93A04F1CA5CA@Kriegisch.name> Date: Thu, 7 Nov 2013 13:23:22 -0700 Message-ID: Subject: Re: Why is "mvn validate compile" different from "mvn validate; mvn compile"? From: Doug Douglass To: Maven Users List Content-Type: multipart/alternative; boundary=047d7b2ed78f8dd5c604ea9c09e9 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b2ed78f8dd5c604ea9c09e9 Content-Type: text/plain; charset=UTF-8 On Thu, Nov 7, 2013 at 12:41 PM, Alexander Kriegisch < Alexander@kriegisch.name> wrote: > Only "mvn compile" yields the exact same result as "mvn validate compile", > I just did it like this explicitly to make a point and show clearly what > hapens. So again: Why, pray tell, does my two-phase build work if first I > only do "mvn validate" and then "mvn compile", but not with only "mvn > compile"? The question is still unanswered. Two people told me I made a > mistake but did not explain which one and where the different behaviour > comes from. > > You're right, I didn't answer your original question. The different is because "mvn validate compile" and/or "mvn compile" is a single invocation of maven and dependencies are resolved once (by default, w/o any other plugins/configuration). "mvn validate; mvn compile" are 2 separate invocations of maven; the first one does your "download external, non-mavenised" business, which makes those dependencies available for the second. I still suggest you read Steven's post as you're question/problem indicates you're heading down the not-uncommon path of trying to script your build (like we all did in the Ant days) vs. giving into The Maven Way. There's lots of similar conversations in the list archives, the blog post is the result of many such "debates". I'll apologize in advance if this is not your case. Cheers, Doug --047d7b2ed78f8dd5c604ea9c09e9--