Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 74588 invoked from network); 25 Jan 2007 23:15:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jan 2007 23:15:40 -0000 Received: (qmail 91295 invoked by uid 500); 25 Jan 2007 23:15:45 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 91230 invoked by uid 500); 25 Jan 2007 23:15:45 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 91219 invoked by uid 99); 25 Jan 2007 23:15:45 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jan 2007 15:15:44 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lundquist.mark@gmail.com designates 64.233.184.233 as permitted sender) Received: from [64.233.184.233] (HELO wr-out-0506.google.com) (64.233.184.233) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jan 2007 15:15:35 -0800 Received: by wr-out-0506.google.com with SMTP id i12so557693wra for ; Thu, 25 Jan 2007 15:15:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:in-reply-to:references:content-type:message-id:from:subject:date:to:x-mailer; b=QR5JExAK5icL1CwFfkpyGIVdPXyjAcNy/3viwrsUNUkTiXczZN4JTm9Zh0Br1/9UbbjfpeLw2dU4CJJS515kCZR+dpxGpVNfTFFJEq2CIX/Kx2jj5n+Um564pwj7ixCRPTYIqAh11jEYJ+IBDVXU42Pgqc5PDL3Ex7TCoKGOZNU= Received: by 10.65.254.13 with SMTP id g13mr3972342qbs.1169766913966; Thu, 25 Jan 2007 15:15:13 -0800 (PST) Received: from ?192.168.0.3? ( [67.171.172.83]) by mx.google.com with ESMTP id e19sm3424254qbe.2007.01.25.15.15.12; Thu, 25 Jan 2007 15:15:13 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v624) In-Reply-To: References: <7e5128fa33b3c678f6697c83fdaadf90@comcast.net> <45B37295.4030300@nada.kth.se> <336d0efe8e960a49383dab4e5efb11a9@gmail.com> Content-Type: multipart/alternative; boundary=Apple-Mail-32-333664776 Message-Id: <868ba744c737e393e56dfb79677c25ac@gmail.com> From: Mark Lundquist Subject: Re: Hardcoded artifact versions (was Re: Multiple local snapshots in Maven) Date: Thu, 25 Jan 2007 15:15:09 -0800 To: dev@cocoon.apache.org X-Mailer: Apple Mail (2.624) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-32-333664776 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=WINDOWS-1252; format=flowed On Jan 25, 2007, at 11:12 AM, Alexander Klimetschek wrote: > Mark Lundquist schrieb: >> of course does not help me, because the only=20 >> things you can set in an ad hoc local profile are repository=20 >> locations and properties. Everything else was deemed too dangerous=20= >> [1] by the Maven developers, because it militates against build=20 >> reproducibility (they call it "portability"). IMHO, that was a bad=20= >> decision and the wrong solution to the reproducibility problem! > > Full ACK. When I read about what you can put in a profile and what=20 > not, I was thinking the same thing. They should have simply allowed=20 > it, but with a big warning sign in the documentation to not use it the=20= > wrong way... Well, I've been studying this some more, and I think that even if=20 were overridable within an external profile, it=20= would not be enough (see my recent reply to Jorg)... >> How can I have multiple local builds of the same artifact coexisting=20= >> on my machine, without modifying any Subversion-controlled resources=20= >> (e.g. poms)? That's the question. I'm in need of some brilliant=20 >> ideas here, does somebody have any? > > What's with the properties idea you suggested? Put properties for all=20= > child-pom-versions in the root pom and overwrite them in your profile. It's just sort of disgusting :-/. I think it would work, but... there=20= are like 248 poms in Cocoon, up to 4 levels deep. I doubt we really=20 want to mirror that structure in the root pom. This would have to be=20 kept in sync with the source tree at all times, even for local changes,=20= and that introduces new friction for refactoring efforts, or even just=20= adding a new block. Also, modules will go away and people will forget=20= to delete the corresponding properties from the root pom, so it will=20 get cluttered with obsolete stuff. As I was thinking about this, at one point just a bit ago it seemed to=20= me that this really cries out for "IOC for poms"! I was thinking, what=20= if your external profile could "intercept" any pom in the build and=20 override something therein? Then I started looking through the pom=20 elements, and it appears the only thing that's at all reasonable to=20 override on an ad hoc basis (i.e. without touching controlled files=20 like poms) is the version id for subprojects. I also realized that I=20 was too liberal in my criticism of the Maven approach to ad hoc=20 profiles, because this is a very legitimate measure to preserve build=20 reproducibility in the committer =3D> repository direction. Everything=20= else in the pom would break reproducibility under local overriding, but=20= this one thing does not: the version id to use for (a) building module=20= X and (b) for satisfying dependencies on X within this top-level=20 project. So we don't need or want a general-purpose "IOC" here. What=20= we need is a very specific profile-driven mechanism in Maven for=20 addressing the specific problem of allowing multiple coexisting project=20= builds on one machine so as to not result in artifact clashes in the=20 repository. That's it. A very quick and dirty workaround would be to for Maven to introduce a=20= element (a la settings.xml) in an external profile. =20= It's un-Maveny and inelegant, but it would be relatively easy and=20 low-risk. cheers, =97ml=97 --Apple-Mail-32-333664776 Content-Transfer-Encoding: quoted-printable Content-Type: text/enriched; charset=WINDOWS-1252 On Jan 25, 2007, at 11:12 AM, Alexander Klimetschek wrote: Mark Lundquist schrieb: < of course does not help me, because the only things you can set in an ad hoc local profile are repository locations and properties. Everything else was deemed too dangerous [1] by the Maven developers, because it militates against build reproducibility (they call it "portability"). IMHO, that was a bad decision and the wrong solution to the reproducibility problem! Full ACK. When I read about what you can put in a profile and what not, I was thinking the same thing. They should have simply allowed it, but with a big warning sign in the documentation to not use it the wrong way... Well, I've been studying this some more, and I think that even if < were overridable within an external profile, it would not be enough (see my recent reply to Jorg)... How can I have multiple local builds of the same artifact coexisting on my machine, without modifying any Subversion-controlled resources (e.g. poms)? That's the question.=20 I'm in need of some brilliant ideas here, does somebody have any? What's with the properties idea you suggested? Put properties for all child-pom-versions in the root pom and overwrite them in your profile. It's just sort of disgusting :-/. I think it would work, but... there are like 248 poms in Cocoon, up to 4 levels deep. I doubt we really want to mirror that structure in the root pom. This would have to be kept in sync with the source tree at all times, even for local changes, and that introduces new friction for refactoring efforts, or even just adding a new block. Also, modules will go away and people will forget to delete the corresponding properties from the root pom, so it will get cluttered with obsolete stuff. As I was thinking about this, at one point just a bit ago it seemed to me that this really cries out for "IOC for poms"! I was thinking, what if your external profile could "intercept" any pom in the build and override something therein? Then I started looking through the pom elements, and it appears the only thing that's at all reasonable to override on an ad hoc basis (i.e. without touching controlled files like poms) is the version id for subprojects. I also realized that I was too liberal in my criticism of the Maven approach to ad hoc profiles, because this is a very legitimate measure to preserve build reproducibility in the committer =3D> repository direction. Everything else in the pom would break reproducibility under local overriding, but this one thing does not: the version id to use for (a) building module X and (b) for satisfying dependencies on X within this top-level project. So we don't need or want a general-purpose "IOC" here. What we need is a very specific profile-driven mechanism in Maven for addressing the specific problem of allowing multiple coexisting project builds on one machine so as to not result in artifact clashes in the repository. That's it. A very quick and dirty workaround would be to for Maven to introduce a < element (a la settings.xml) in an external profile. It's un-Maveny and inelegant, but it would be relatively easy and low-risk. cheers, =97ml=97 --Apple-Mail-32-333664776--