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 <[email protected]> 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: [email protected] > For additional commands, e-mail: [email protected] > >
