[jboss-dev] Why Maven sucks (part 1)
Adrian Brock
abrock at redhat.com
Tue Apr 22 05:59:39 EDT 2008
On Mon, 2008-04-21 at 13:47 -0500, Paul Gier wrote:
> Carlo de Wolf wrote:
> > Paul Gier wrote:
> >> 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.
> >
> > It must be automated. Whenever someone does a mvn deploy, the pom.xml
> > should be replaced by one not containing any snapshots, but only full
> > versions.
> >
>
> Just so it's clear what you are asking for, you want dependencies with
> (-SNAPSHOT) to be replaced with the specific snapshot version (-timstamp-build)
> during deployment? I could probably add this as an option to the deploy plugin,
> but I don't know if this would solve the problem.
>
It wouldn't. The whole point of getting rid of snapshots is so you can
reproduce the build with a tagged release.
People need to stop being lazy and create proper releases.
SNAPSHOTS are only useful when you want to know whether a new release
will work another project.
e.g. before I release the next version of jboss-vfs, I create a SNAPSHOT
in my *local* repository and update the jbossas build to use it.
If it works, I do a proper release (NOT a mvn deploy of the SNAPSHOT)
for others to use.
> Just as an example, let's say you deploy an ejb3 module that has a dependency on
> jboss-aop. You deploy and it resolves to aop snapshot build 9. The app server
> has a dependency on the current aop snapshot (2.0-SNAPSHOT) and they both point
> to build 9 so all is fine. Then aop deploys a new snapshot (build number 10).
> The app server depends on aop (-SNAPSHOT) so it gets the new version. Now the
> app server wants build 10, but ejb3 wants snapshot version 9. The app server
> IMO should win because the direct dependency should take priority over the
> transitive ejb dependency. To solve this issue you would still have to change
> the app server dependency to tie it to the specific snapshot of aop.
>
>
>
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
More information about the jboss-development
mailing list