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 DB775D1EA for ; Thu, 25 Oct 2012 05:44:36 +0000 (UTC) Received: (qmail 18433 invoked by uid 500); 25 Oct 2012 05:44:34 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 18308 invoked by uid 500); 25 Oct 2012 05:44:33 -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 18274 invoked by uid 99); 25 Oct 2012 05:44:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2012 05:44:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of anders.g.hammar@gmail.com designates 209.85.216.171 as permitted sender) Received: from [209.85.216.171] (HELO mail-qc0-f171.google.com) (209.85.216.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2012 05:44:24 +0000 Received: by mail-qc0-f171.google.com with SMTP id d1so635151qca.30 for ; Wed, 24 Oct 2012 22:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=bab3r79WJfkChcrIxQFaamIk1E9s6rtUAW1v8n+Xun8=; b=ZgR35ExeZBG2KD0gaSPMBhgYOHC8bKBOLFee2EikNekFUXh54cWo/2gMSAs1XAxhwN VP6tnzkwFh/3BIUNBZOqOrhqw9LYj+FIFkKbrCWcBs7CZf/VDURnytFCB0rkpW5CGoiw G0WqoaJCdEsv0CiBGmTgd/P5gVPkbO27qe6WPNOfuHyG+Ec8UMmYz3wHfN9SNRgVA1DW ST8bNmmAndGClw5gxK2YoOqX6Qkuc71kGA9hAV+WkdJBDi8rYay4+p70L4P3D3fb3Cs3 zjjgD9x/Vcb3y7MNWczz2C++10ZNh8dybPExw8qi3Sj+bW+1bD2drM2YCJxt9OgTSv0G 7jwQ== MIME-Version: 1.0 Received: by 10.224.31.204 with SMTP id z12mr8383321qac.32.1351143844234; Wed, 24 Oct 2012 22:44:04 -0700 (PDT) Sender: anders.g.hammar@gmail.com Received: by 10.49.130.198 with HTTP; Wed, 24 Oct 2012 22:44:04 -0700 (PDT) In-Reply-To: <255343FA5EEE4D4599D4588EE379349B23A72FC1@RHV-EXRDA-S21.corp.ebay.com> References: <255343FA5EEE4D4599D4588EE379349B23A72FC1@RHV-EXRDA-S21.corp.ebay.com> Date: Thu, 25 Oct 2012 07:44:04 +0200 X-Google-Sender-Auth: bI00bx09Xx02qFHpiH_bApLTrKk Message-ID: Subject: Re: Specify enforcer:enforce rules from command line From: Anders Hammar To: Maven Users List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org You probably have the configuration in the wrong place. Is it on plugin level or execution level? It has to be on plugin level if you're to run "mvn enforcer:enforce". Also, it should be in the pluginManagement section. /Anders On Thu, Oct 25, 2012 at 7:27 AM, Wang, Simon wrote: > I specified rule in pom.xml, after run "mvn enforcer:enforce", still comp= lain no rules set. > Really don't know what happened. > > Regards > Simon > -----Original Message----- > From: Arnaud bourree [mailto:arnaud.bourree@gmail.com] > Sent: 2012=E5=B9=B410=E6=9C=8824=E6=97=A5 22:18 > To: Maven Users List > Subject: Re: Specify enforcer:enforce rules from command line > > I create issue MENFORCER-142 > > I found a partial work-around: running mvn enforcer:enforce fail if there= is no rules set :-/ > > But that not enough for me. > > Regards, > > Arnaud. > > > 2012/10/23 Anders Hammar : >> Don't think it's possible. The enforcer plugin is meant to be bound to >> the build lifecycle so it should be configured in the pom. But I guess >> an enhancement ticket with a patch could change that? :-) >> >> /Anders >> >> On Tue, Oct 23, 2012 at 5:50 PM, Arnaud bourree >> wrote: >>> Hello, >>> >>> How could we specify enforcer:enforce rules from command line? >>> >>> I want to run command line like following without updating any pom.xml: >>> mvn enforcer:enforce -Drules=3Dcom.acme.UseAcmeParentPom >>> >>> The goal of this enforcer:enforce rule is to check that Acme's >>> developers write pom.xml which inherit from acme's parent pom.xml And >>> because they may not inherit from acme's parent pom.xml, I cannot >>> specify enforcer rule in. >>> >>> Regards, >>> >>> Arnaud. >>> >>> --------------------------------------------------------------------- >>> 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 >> > > --------------------------------------------------------------------- > 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