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 6260C119DD for ; Thu, 24 Jul 2014 17:02:46 +0000 (UTC) Received: (qmail 64557 invoked by uid 500); 24 Jul 2014 17:02:44 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 64481 invoked by uid 500); 24 Jul 2014 17:02:44 -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 64468 invoked by uid 99); 24 Jul 2014 17:02:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2014 17:02:44 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of hanumannallapati@gmail.com does not designate 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2014 17:02:42 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1XAMPJ-00076G-Ri for users@maven.apache.org; Thu, 24 Jul 2014 10:02:17 -0700 Date: Thu, 24 Jul 2014 10:02:17 -0700 (PDT) From: hanuman To: users@maven.apache.org Message-ID: <1406221337839-5800947.post@n5.nabble.com> Subject: Conditionally executing a script in profile MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi All, I am trying to execute a particular sql script conditionally in a profile(POM.XML). Example: assume I had a following profile in a POM.xml if I run "mvn -Pload-test-data -e it's executing all scripts mentioned in SrcFiles tag. But I am trying to execute "script3.sql" only when a particular flag is passed as 'y' i.e..,I am looking for a command like mvn -Pload-test-data -e -Dref_flag='y' then only execute script3.sql otherwise not. Could you please assist me how we can do that? Thanks very much for regardin my query. Profile in my POM.xml:: load-test-data com.voca.maven.plugins maven-database-util-plugin 0.9 load-test-data execute fps-fpsedw-db util/script1.sql util/script2.sql util/script3.sql -- View this message in context: http://maven.40175.n5.nabble.com/Conditionally-executing-a-script-in-profile-tp5800947.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org