[jboss-dev] Why Maven sucks (part 1)

Paul Gier pgier at redhat.com
Mon Apr 21 11:47:53 EDT 2008


Carlo de Wolf wrote:

> 
> Now if it was a tool focussed on dependency management (like Ivy) it 
> would have solved the real problem: snapshots. So let's do an example:
> - as trunk -> ejb3-core-0.1-SNAPSHOT -> 
> ejb3-interceptors-0.13-0-SNAPSHOT -> aop-2.1-SNAPSHOT (for the example)
> If I happen to deploy a new snapshot of aop, it'll break AS build. Why: 
> ejb3-core is not compatible and Maven blindly loads it up. This is not 
> possible in Ivy, it's snapshot repository looks like:
> - as trunk -> ejb3-core-0.1-20080421 -> 
> ejb3-interceptors-0.13.0-20080421 -> aop-2.1-20080420.
> If I happen to deploy a new snapshot of aop you get and I run a nightly 
> build on ejb3 you get:
> - as trunk -> ejb3-core-0.1-20080421 -> 
> ejb3-interceptors-0.13.0-20080421 -> aop-2.1-20080420
> - ejb3-interceptors-0.13-0-20080422 -> aop-2.1-20080422
> Since ejb3-core didn't properly build there is no new snapshot for it 
> and AS build is unaffected.
> Combine this with unit tests and you got a pretty stable setup.
> 

We can do this using maven also.  If you want to tie the build to a specific 
snapshot, just put the full snapshot version in the dependency.  So for example, 
ejb3-interceptors you could put version "0.13.0-20080417.210958-18".  And maven 
will keep using that snapshot build until you change the dependency.  The 
-SNAPSHOT convention is just for convenience if you just want to build with the 
latest until a release comes out.

As far as the unit tests, by default maven will not deploy unless all tests have 
passed.  If you want it to deploy regardless of test failures then you have to 
put <testFailureIgnore>true</testFailureIgnore> in your surefire configuration. 
  We currently have this parameter set in some poms and it should probably just 
be removed.



More information about the jboss-development mailing list