You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "KARR, DAVID" <dk...@att.com> on 2012/12/20 18:09:59 UTC

Detecting any dependencies specified without versions?

I just noticed that our large project has a lot of poms with dependencies with no version specified.  I'd like to detect that at build time.  I see that the enforcer plugin comes close out of the box, with the "requirePluginVersions" rule.  However, there doesn't appear to be a "requireDependencyVersions" rule, at least out of the box.

Is there an easy way to make this work?  Has anyone written and released a custom "requireDependencyVersions" rule?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Detecting any dependencies specified without versions?

Posted by "KARR, DAVID" <dk...@att.com>.
> -----Original Message-----
> From: Karl Heinz Marbaise [mailto:khmarbaise@gmx.de]
> Sent: Thursday, December 20, 2012 9:17 AM
> To: Maven Users List; users@maven.apache.org
> Subject: Re: Detecting any dependencies specified without versions?
> 
> Hi,
> 
> if you have really dependencies without version the build will fail in
> Maven.
> This sounds more like having a dependencyManagement block somewhere in
> the parents which define the appropriate versions which is ok.
> 
> The question is what you like to achieve?

Hmm.  I looked at this because someone was having trouble with their build after they went through a class that was using a newer version of a major framework we use.  I theorized that something was now using the newer artifacts in their .m2/repository.  I had her move her .m2/repository out of the way and rebuild.  That fixed the problem.  After I saw your reply, I verified that one of the parent poms has a dependencyManagement entry for the artifact that might have been causing the problem.  It was correctly referencing the version that we use, so her problem must have been caused by something else.

I see that our build references SNAPSHOT versions all over the place, but not for the artifact that I believe caused this problem.  There is also one LATEST reference, but I also think that's not related to the problem.  We should definitely clean these up, but after reexamining this I guess removing the "repository" tree fixed some other problem.

Another group of devs are going through the same class this week, so perhaps I'll have another chance to diagnose this. :)

> -------- Original-Nachricht --------
> > Datum: Thu, 20 Dec 2012 17:09:59 +0000
> > Von: "KARR, DAVID" <dk...@att.com>
> > An: Maven Users List <us...@maven.apache.org>
> > Betreff: Detecting any dependencies specified without versions?
> 
> > I just noticed that our large project has a lot of poms with
> dependencies
> > with no version specified.  I'd like to detect that at build time.  I
> see
> > that the enforcer plugin comes close out of the box, with the
> > "requirePluginVersions" rule.  However, there doesn't appear to be a
> > "requireDependencyVersions" rule, at least out of the box.
> >
> > Is there an easy way to make this work?  Has anyone written and
> released a
> > custom "requireDependencyVersions" rule?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


Re: Detecting any dependencies specified without versions?

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,

if you have really dependencies without version the build will fail in Maven.
This sounds more like having a dependencyManagement block somewhere in the parents which define the appropriate versions which is ok.

The question is what you like to achieve?

Kind regards
Karl-Heinz Marbaise
-------- Original-Nachricht --------
> Datum: Thu, 20 Dec 2012 17:09:59 +0000
> Von: "KARR, DAVID" <dk...@att.com>
> An: Maven Users List <us...@maven.apache.org>
> Betreff: Detecting any dependencies specified without versions?

> I just noticed that our large project has a lot of poms with dependencies
> with no version specified.  I'd like to detect that at build time.  I see
> that the enforcer plugin comes close out of the box, with the
> "requirePluginVersions" rule.  However, there doesn't appear to be a
> "requireDependencyVersions" rule, at least out of the box.
> 
> Is there an easy way to make this work?  Has anyone written and released a
> custom "requireDependencyVersions" rule?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org