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 74B63E70E for ; Fri, 11 Jan 2013 16:26:41 +0000 (UTC) Received: (qmail 15917 invoked by uid 500); 11 Jan 2013 16:26:39 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 15805 invoked by uid 500); 11 Jan 2013 16:26:39 -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 15797 invoked by uid 99); 11 Jan 2013 16:26:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 16:26:39 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [81.169.146.160] (HELO mo-p00-ob.rzone.de) (81.169.146.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 16:26:31 +0000 X-RZG-AUTH: :JmMBZ0eIcbKJR7aGLMhBBT1soiSFCF2VUlDciDoyyo4CET7dX03v/78tPL7N8A0= X-RZG-CLASS-ID: mo00 Received: from omgreatgod.store (com4.strato.de [81.169.145.237]) by smtp.strato.de (jored mo8) (RZmta 31.12 AUTH) with (RC4-MD5 encrypted) ESMTPA id f018dcp0BGNrPs for ; Fri, 11 Jan 2013 17:26:10 +0100 (CET) Date: Fri, 11 Jan 2013 17:26:10 +0100 (CET) From: =?UTF-8?Q?=22J=C3=B6rg_Hohwiller=22?= Reply-To: =?UTF-8?Q?=22J=C3=B6rg_Hohwiller=22?= To: Maven Users List Message-ID: <549090771.139511.1357921570797.JavaMail.open-xchange@webmail.strato.com> In-Reply-To: References: <50EEF22E.3000001@rlnx.com> Subject: Re: Deploy a project to multiple locations MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_139510_1928416654.1357921570735" X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v6.20.7-Rev9 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_139510_1928416654.1357921570735 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi everybody, first you should be more precise on what you really want to do, e.g. by mak= ing an example. I assume that you are talking about environment specific settings. So e.g. you have different environments like test, stage, live or maybe als= o linux, windows, mac. The best practice is to keep all environment specific settings out of your artifacts so they are portable. Ship them with some reasonable fallbacks. On the target environment define the custom settings there in a way that overrides the defaults. E.g. assume you have: myproject-default.properties that is deployed inside your jar. And myproject-environment.properties that, if found overrides the defaults. You can do that with Properties.load or with springframework, etc. Dig into m-m-m.sf.net if you look for an example. If you are reading from classpath and have a webapp you can put myproject-enviroment.properties into the lib directory of your catalina-base. This approach worked fine for me in many different projects. Building an artifact differently for different profiles is always causing p= ain! Cheers J=C3=B6rg "Rainer V=C3=B6lschow" hat am 11. Januar 2013 um 11:39 geschrieben: > Hi Patrick, > > one part of my question was, how can I pass the profiles to pom.xml > > > If what you want is to deploy a war with different servers (possibly wi= th > > different configurations), you could use profiles. > > It seems there is no way that I can use Maven only. So I go into > myself and try to look for an alternative way. > > 2013/1/10 Patrick Turcotte : > > Hi, > > > > If what you want is to deploy a war with different servers (possibly wi= th > > different configurations), you could use profiles. > > > > And if you want to do it for all of them in one go, you could write a s= cript > > (bat, bash) that would wrap it. > > > > Patrick > > > > > > On 13-01-10 10:43 AM, Rainer V=C3=B6lschow wrote: > >> > >> Hello folks, > >> > >> at my work I've got the task to develop a maven build script, that is > >> able to deploy a project to different server enviroments. According my > >> resaerch in the Internet, it seems that the maven-invoker-plugin is > >> the only once option for that. I visited the homepage of that plugin > >> serveral times, but I couldn't get any idea how can I achive this. > >> Where I'm stuck is, how can I get all defined profiles and pass it to > >> the invoke-plugin? > >> > >> Thanks in Advance > >> Rainer > >> > >> PS: Any alternatives idears to rech the goal are welcome. :-) > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > >> For additional commands, e-mail: users-help@maven.apache.org > >> > > > > > > -- > > Patrick Turcotte > > Directeur technologique > > ------------------------------------------------ > > patrick.turcotte@revolutionlinux.com > > (819) 780-8955, poste 1129 > > Sans frais 1-800-996-8955, poste 1129 > > > > > > > > --------------------------------------------------------------------- > > 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 > ------=_Part_139510_1928416654.1357921570735--