maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Fox <bri...@infinity.nu>
Subject Re: Have maven stop compilation when some rule is broken
Date Mon, 18 May 2009 17:23:54 GMT
The maven-enforcer-plugin is well suited for this. You could use one of the
existing rules, perhaps the failIfFileExists or easily write your own rule.

On Mon, May 18, 2009 at 12:47 PM, bgik <bruce_kilby@hotmail.com> wrote:

>
> Hi
> I have a 3rd party lib that i have no control over.
>
> In my env it makes no sense to create 2 instances of a given class from
> this
> lib, in fact it may cause issues, so i have updated my codebase to wrap one
> in a singleton. Going forward there's nothing to stop anyone creating
> another one though.
>
> What i would like is for
>
> mvn compile
>
> to actually fail even though my code is syntactically correct if it
> encounters any attempt to create a 2nd instance of this class.
>
> Is there a way to do this? I presume I could write some plugin but i'd like
> to avoid that if possible as time is short
>
> many thanks
> --
> View this message in context:
> http://www.nabble.com/Have-maven-stop-compilation-when-some-rule-is-broken-tp23601222p23601222.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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message