i'm trying to enforce a separation of concerns during my compile phase which
needs to be removed during the package phase.  for example, if a developer
introduces a dependency on the persistence layer from the web layer, the
build should not compile.  however, since we're currently deploying to a
co-located environment, the war should be packaged with the persistence jar. 
currently, i have <exclusions> configured to exclude persistence from web. 
this works as i want for breaking the build when a persistence dependency is
introduced into web, but it also excludes the persistence jar from the war,
which results in the deployment breaking at runtime.

is there a better way to do this?  i want to enforce the layer separation
during the compile phase while removing it during the package phase.  i was
thinking that the best way (unless there's a configuration option i don't
know about) is to write a plugin that somehow removes the exclusion during
the package phase.  i'm hoping:

a. for some guidance on whether there's an easier way, or, if that doesn't
exist;
b. validation that the approach from within a plugin described above is the
best approach.

has anybody solved a problem like this?  am i missing something obvious?
-- 
View this message in context: 
http://www.nabble.com/programmatically-remove-exclusion-for-certain-builds--tf3514594s177.html#a9813474
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to