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 4F68DE968 for ; Thu, 27 Dec 2012 15:46:08 +0000 (UTC) Received: (qmail 51036 invoked by uid 500); 27 Dec 2012 15:46:06 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 50963 invoked by uid 500); 27 Dec 2012 15:46:05 -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 50952 invoked by uid 99); 27 Dec 2012 15:46:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Dec 2012 15:46:05 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of maven.2.user@gmail.com designates 209.85.216.176 as permitted sender) Received: from [209.85.216.176] (HELO mail-qc0-f176.google.com) (209.85.216.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Dec 2012 15:45:58 +0000 Received: by mail-qc0-f176.google.com with SMTP id n41so5001030qco.35 for ; Thu, 27 Dec 2012 07:45:38 -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=6zdH+ifVHZgv6ddZJAssYeOMEN8bw6M4IfAZbWIlEMc=; b=MrJ8zV+ZopNPyYOhlIHfxLmCbvLZLDcOCJnqXn+Kyvp6i2lYSpC/CwRF68Mf2wlLzr 3r8HYODGzpsKPvnZ+w0HQVhMTi3GUQ383qkXrkVg65Z1WFFcDBJ0ft0G0LVrmCTXazK8 xF91nj9+Wd+YzWTAZ2aHiySDgd31w1lL8fECUTdpUPylRz+5qNUqyd5sTVWt5lz7PNK9 JUJeG0X6fWWhM0jef89CgllBnsRZRQwj9AJ660fKuRNCPiwwUrAdpGPXQpsPEglKRvlv TC3QijlKGcrx7M9jmHea8LEXQu9jGpQBXvhC1R6f+PxIHb8yzj3Zqa8AAY96YWGZ2ln6 W9ew== MIME-Version: 1.0 Received: by 10.49.62.39 with SMTP id v7mr16637201qer.15.1356623138211; Thu, 27 Dec 2012 07:45:38 -0800 (PST) Received: by 10.229.90.151 with HTTP; Thu, 27 Dec 2012 07:45:37 -0800 (PST) In-Reply-To: References: <50D4C4D4.40903@gmail.com> Date: Thu, 27 Dec 2012 10:45:37 -0500 Message-ID: Subject: Re: Maven profiles and resource filtering From: Maven User To: Maven Users List Content-Type: multipart/alternative; boundary=047d7bdc11e43f490b04d1d770e8 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bdc11e43f490b04d1d770e8 Content-Type: text/plain; charset=ISO-8859-1 Our pattern is anything in nexus comes from jenkins. All jobs have a "prod" profile activated. ALL this profile does is uses assembly descriptors that produce zips instead of directories, includes stuff from src/main/resources in a "templates" directory and inserts ERB style templating syntax so chef can deploy. If anything is missing, the absent property is caught during our nightly "phoenix" build (and fix fast). No one is introducing properties moments before going to production (and they'd not be incorporated anyway due to our branch management strategy. If you have profiles that you use for building a release - and those make the output is RADICALLY different - then yeah, that's a terrible idea!!! On Wed, Dec 26, 2012 at 1:23 PM, Stephen Connolly < stephen.alan.connolly@gmail.com> wrote: > Which profile was version 1.2.1 built with? > > 1 hour later... Oh that was built with dev and should have been built with > prod... There was one hour of my life wasted > > You are following an anti-pattern. Please don't. You are free to ignore my > advice, just don't come cribbing and moaning to me later when it all blows > up in your face ;-) > > On Wednesday, 26 December 2012, Maven User wrote: > > > Stephen - can you clarify which points you're against? > > > > If there are profiles (and filter files) for every environment they > deploy > > to - then yeah, don't do that. > > > > BUT - for example, if there are exactly two (one for dev, defaults in > poms, > > overrides in each person's settings.xml) and one for prod (which inserts > > OTHER templates to be use by an orchestration system against these "new" > > templates), then I see no harm - but they'll have to make sure each > > property is defined (somewhere). > > > > > > > > > > On Fri, Dec 21, 2012 at 3:32 PM, Stephen Connolly < > > stephen.alan.connolly@gmail.com > wrote: > > > > > > > > > > > http://developer-blog.cloudbees.com/2012/11/maven-profiles-and-maven-way.html > > > > > > Please don't do maven the way you are doing it > > > > > > On Friday, 21 December 2012, Niranjan Rao wrote: > > > > > > > Greetings, > > > > > > > > We have bunch of profiles and corresponding resource filtering which > > all > > > > works great. One frequent problem that we encounter team members > often > > > > forget to add new values in profile/filter property file of other > > > profiles > > > > than the one they are currently using. Naturally results are > > disastrous. > > > > Normally we can find quickly which property is not filtered > correctly > > > and > > > > fix it but this is tedious. > > > > > > > > I am wondering if there is any way to catch missing properties at > build > > > > time. That is when maven sees a property definition during filtering > > > phase > > > > which has variable declaration and could not locate the value, can it > > > raise > > > > the error and let the build fail? > > > > > > > > Thanks, > > > > > > > > Niranjan > > > > > > > > > > ------------------------------**------------------------------**--------- > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > > > > > For additional commands, e-mail: users-help@maven.apache.org > > > > > > > > > > > > > > > --047d7bdc11e43f490b04d1d770e8--