Return-Path: Delivered-To: apmail-maven-dev-archive@www.apache.org Received: (qmail 15275 invoked from network); 6 Dec 2004 11:55:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Dec 2004 11:55:04 -0000 Received: (qmail 31707 invoked by uid 500); 6 Dec 2004 11:55:02 -0000 Delivered-To: apmail-maven-dev-archive@maven.apache.org Received: (qmail 31686 invoked by uid 500); 6 Dec 2004 11:55:02 -0000 Mailing-List: contact dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Maven Developers List" Reply-To: "Maven Developers List" Delivered-To: mailing list dev@maven.apache.org Received: (qmail 31671 invoked by uid 99); 6 Dec 2004 11:55:02 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from no-dns-yet.demon.co.uk (HELO wormtongue.diagonal-solutions.local) (80.177.235.34) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 06 Dec 2004 03:55:00 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Passing properties into subprojects using the reactor Date: Mon, 6 Dec 2004 11:54:56 -0000 Message-ID: <1C28FBD976CEA449A8ADE5AD214D7307366512@wormtongue.diagonal-solutions.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Passing properties into subprojects using the reactor Thread-Index: AcTbimfBtTnOxN0WQ76Rsq0SoY6NVg== From: "Kristopher Brown" To: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, I'm trying to pass properties into subprojects using the reactor, and I've provided an example of the script used at the end. I'm not 100% certain, but I've had a good look through the reactor tag code, and followed that through to PluginManager#attainGoals(Project, List) which sets up the new context and creates it with the Root Context. I'm presuming that if I invoke "maven example:goal-mp" from my example in ProjectA and it reacts across ProjectX and ProjectY, then the following context graphs are made (roughly speaking) ProjectA: Root <- ProjectA ProjectX: Root <- ProjectX ProjectY: Root <- Projecty Rather than,=20 ProjectA: Root <- ProjectA ProjectX: Root <- ProjectA <- ProjectX ProjectY: Root <- ProjectA <- ProjectY Presuming the behaviour is intentional, I was wondering if it might be worthwhile adding a mechanism to the maven:maven and maven:reactor tags allowing the user to pass through some properties or perhaps allowing the context of the calling project (i.e. Project A) to be added to the context graph. Incidentally, if I provided the property on the command line (i.e. "maven example:goal-mp -DexampleProp=3Dtest") it works, so I guess the system properties are loaded into the root context. I also did a search of the mailing lists to check that its not something mentioned recently, and found the following: Search: http://marc.theaimsgroup.com/?l=3Dturbine-maven-user&w=3D2&r=3D1&s=3Dreac= tor+pas sing+values&q=3Db Interesting Response: http://marc.theaimsgroup.com/?l=3Dturbine-maven-user&m=3D109724500600171&= w=3D2 The response states that you can get around the issue by forcing the property into the root context using something like: I'm using the interaction tag, so that's not immediately useful (i.e. it doesn't have a scope property), although I could modify a few lines and have it working. It just seems wrong to me that I have to push them into the root context. I tried it too and it didn't work (I guess I've got the wrong name for the context?). So, in summary my questions are: 1) Am I missing something obvious such as an additional property that can help me out? 2) Is my understanding of contexts correct? 3) Is setting values on the parent context good or bad practice? 4) Would it be worth while adding properties to the reactor/maven tag to pass through the current context or some properties. Thanks in advance Kris. exampleProp is ${exampleProp} --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org For additional commands, e-mail: dev-help@maven.apache.org