On Tue, Apr 21, 2009 at 4:49 PM, Pete Muir <pmuir(a)redhat.com> wrote:
On 21 Apr 2009, at 22:44, Dan Allen wrote:
>> Ok, well we can add extra rules to this module:
>> * no non-optional dependencies on other jars (must be self contained)
>> * bean validation must have no deps outside BV api
>> I think it would be sensible to add a short contract.txt to each module
>> to include these requirements. Shane, could you add these?
> Technically that is the purpose of the maven enforcer plugin. With
> patience, it can be configured to fail the build when certain dependencies
> show up (or are outside of a pattern list).
You need more than that - you need to execute an test for each piece of
functionality that has such a contract and ensure it runs with only it's
deps in the classpath. The enforcer plugin is more about enforcing a rule on
a dependency management, not on how people write code AFAIK.
True, I was thinking more in terms of an alternative to contract.txt, which
just makes me cringe. We should enforce the requirement declaratively (and
tie it into the build), then write tests if necessary that validate it
Senior Software Engineer, Red Hat | Author of Seam in Action
NOTE: While I make a strong effort to keep up with my email on a daily
basis, personal or other work matters can sometimes keep me away
from my email. If you contact me, but don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.