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 24B8410B49 for ; Sat, 6 Jul 2013 06:05:32 +0000 (UTC) Received: (qmail 55169 invoked by uid 500); 6 Jul 2013 06:05:28 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 54726 invoked by uid 500); 6 Jul 2013 06:05:24 -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 54712 invoked by uid 99); 6 Jul 2013 06:05:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Jul 2013 06:05:21 +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 (nike.apache.org: domain of mfriedenhagen@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-ob0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Jul 2013 06:05:15 +0000 Received: by mail-ob0-f176.google.com with SMTP id v19so3700396obq.35 for ; Fri, 05 Jul 2013 23:04:54 -0700 (PDT) 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=SpZlV0tmLW2Kwtz33l8/GopTdh3f2fI05KddjTOhlqU=; b=GPpjt0N3CJJ8HEzB/9cUAArAQP7pTVKZIAi59iqZ5+j9TnnJ3L5Thtfp4Mg3O2tu9L fE7zH6kzQPy35oNJG4XY78ADiDLQFnp/CcsI8LE+qTHHnd6Xq6nx2IntHEEqDK8gAghZ e3dcK+/eU6+IN1i8txMn5/7JHkIe1GLDfwHEyHS20lEEbQF/DWa1re6FdmaRrn7JIlyl AW9IuqLgN0Pj+UWdQ0XLF4znkv1MIv8kTCl872dnCchZA0t1oxZfBXvB6FMS9U7HkyBd DR5cVwbXTsAsqPUPfOrc6xU1IR3uOctIJkKNcAzFZcl3/VnzLy8l0QXgNImAA1xdg4Ob RnPw== MIME-Version: 1.0 X-Received: by 10.182.81.34 with SMTP id w2mr14332209obx.8.1373090694829; Fri, 05 Jul 2013 23:04:54 -0700 (PDT) Received: by 10.182.236.130 with HTTP; Fri, 5 Jul 2013 23:04:54 -0700 (PDT) Received: by 10.182.236.130 with HTTP; Fri, 5 Jul 2013 23:04:54 -0700 (PDT) In-Reply-To: References: Date: Sat, 6 Jul 2013 08:04:54 +0200 Message-ID: Subject: Re: "The Maven way" for delivery pipelines From: Mirko Friedenhagen To: Maven Users List Content-Type: multipart/alternative; boundary=047d7b2e4b5e1c1d2704e0d19726 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b2e4b5e1c1d2704e0d19726 Content-Type: text/plain; charset=UTF-8 Stephen, Russel, thanks for your suggestions so far. I will take a look into the plugins you mentioned. Our operations department is using puppet and I did some tiny steps with. I agree it feels a bit like Maven because it is declarative as well. Now Ruby is IMO Python's perlish brother, so I am not very fond of it :-). Regards Mirko -- Sent from my mobile On Jul 6, 2013 12:24 AM, "Stephen Connolly" wrote: > On Friday, 5 July 2013, Mirko Friedenhagen wrote: > > > Hello, > > > > now after some trial and error with custom packaging and lifecycles I > > ask myself whether I should proceed or do something completely > > different. > > > > What I want to achieve: > > - We have loads of web-applications (WARs with a homegrown > > configuration tooling) > > - Some are single module projects, some are multi-module. > > - All should be deployed to an adhoc tomcat instance after the WAR is > > built to see whether configurations are solid and to do some > > integrative tests. > > - Right now we invoke a shell-script which runs several maven goals > > (not phases) directly: > > mvn clean verify > > mvn internal:create-tomcat (special packaging with logback as logger > etc.) > > mvn internal:start-tomcat > > mvn internal:deploy-war (this one will _modify_ the war's > > configuration on the fly before deployment) > > mvn webtest:test > > mvn internal:stop-tomcat > > > > Now, shell scripts are not very portable and so I thought about two > > solutions: > > > > Solution 1: > > Create a custom lifecycle called webtest > > - My first idea was to create a custom lifecycle[1] which will invoke > > some standard standard goals[2], so the complete vodoo could be done > > with: > > > > mvn clean verify verify-webtest > > > > - I tried this with a tiny IT project, where I configured failsafe to > > do special stuff during the phase webtest of lifecycle webtest. > > - However, now failsafe is invoked twice: > > --- snip --- > > [INFO] --- maven-failsafe-plugin:2.15:integration-test > > (default-integration-test-1) @ foss-jar-maven-plugin-test-foss-war --- > > [INFO] --- maven-failsafe-plugin:2.15:integration-test > > (webtest-integration-test) @ foss-jar-maven-plugin-test-foss-war --- > > --- snap --- > > > > - As the tomcat plugins are invoked as well with the "wrong lifecycle" > > default, I guess this will not work out. > > > > Solution 2: > > > > Would be to create a special packaging webtest and have a module in a > > multi-module project, one creating the war and the webtest module > > picking up the war as dependency and do the vodoo (on demand). > > Then I could imagine having two jobs in Jenkins, one > > deploying/installing the WAR and another Jenkins-Job running the shell > > equivalent from above by only executing module webtest. > > > > Now, I read a lot about Maven being a tool for *building only*, but > > in some way I like Maven and developing plugins is quite easy, so I > > thought it might be nonetheless a good way. > > > > What do you think, do I have a hammer and now everything looks like a > > nail to me? > > > I have been down your road several times... It feels like a bit of a > siren's call to me... > > The most public thing I did down this road is mojo's ship-maven-plugin... > Which does things a, IMHO, more maven way *if* I were to imagine a maven > way for things that take place "beyond the (standard) lifecycle" > > My current thinking is to use chef/puppet/etc for these tasks... But: > > 1. I am disappointed by how difficult these toolchains make things > 2. Puppet is more "maven" in philosophy but at work our ops team voted for > chef, so harder to try the tool I feel should be best > 3. Lab42's module framework for puppet feels better but puppet labs module > framework is "closer" to puppet as its by the main devs... I wish they can > find a way to interop better. > > Or could I use one of the proposed solutions without abusing Maven to > > much? Or is invoking the shell script as we do now a much better > > solution? > > > I actually like shell scripts for this type of thing... > > If it ain't broke... > > > > > > Regards and thank you very much for reading up to here! > > Mirko > > [1] > > > https://github.com/mfriedenhagen/foss-jar-maven-plugin/blob/master/src/main/resources/META-INF/plexus/components.xml#L103 > > [2] > > > https://github.com/mfriedenhagen/foss-jar-maven-plugin/blob/master/src/main/resources/META-INF/plexus/components.xml#L77 > > [3] > > > https://github.com/mfriedenhagen/foss-jar-maven-plugin/blob/master/src/it/test-foss-war/pom.xml#L31 > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > > For additional commands, e-mail: users-help@maven.apache.org > > > > > > > -- > Sent from my phone > --047d7b2e4b5e1c1d2704e0d19726--