maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: Specify enforcer:enforce rules from command line
Date Thu, 25 Oct 2012 05:44:04 GMT
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 <Yunfeng.Wang@ebay.com> wrote:
> I specified rule in pom.xml, after run "mvn enforcer:enforce", still complain no rules
set.
> Really don't know what happened.
>
> Regards
> Simon
> -----Original Message-----
> From: Arnaud bourree [mailto:arnaud.bourree@gmail.com]
> Sent: 2012年10月24日 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 <anders@hammar.net>:
>> 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
>> <arnaud.bourree@gmail.com> 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=com.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


Mime
View raw message