You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Torsten Schlabach <ts...@gmx.net> on 2007/09/25 15:59:44 UTC

What is a used, undeclared dependency?

Hi?

I am analyzing my project with the dependency plugin:

http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html

It says I have used, undeclared dependencies.

Does that mean, my code depends on libs which I have failed to declare 
as a dependency, but Maven applied some magic to provide them anyway?

Regards,
Torsten

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


RE: What is a used, undeclared dependency?

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Torsten,
You got it. Because compile picks up transitive dependencies, you are
actually relying on someone else's dependency to get compiled. That
means you lose control over which version is used and the actual
dependency tree isn't accurately reflecting your project.

--Brian

-----Original Message-----
From: Torsten Schlabach [mailto:tschlabach@gmx.net] 
Sent: Tuesday, September 25, 2007 10:00 AM
To: Maven Users List
Subject: What is a used, undeclared dependency?

Hi?

I am analyzing my project with the dependency plugin:

http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.htm
l

It says I have used, undeclared dependencies.

Does that mean, my code depends on libs which I have failed to declare 
as a dependency, but Maven applied some magic to provide them anyway?

Regards,
Torsten

---------------------------------------------------------------------
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: What is a used, undeclared dependency?

Posted by Tim Kettler <ti...@udo.edu>.
Mark Hobson schrieb:
> On 25/09/2007, Tim Kettler <ti...@udo.edu> wrote:
>> Wouldn't this be a useful rule for the enforcer plugin?
> 
> It can be used in a similar manner to the enforcer rules:
> 
> https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-dependency-plugin/src/site/apt/examples/failing-the-build-on-dependency-analysis-warnings.apt
> 

Ah, Thanks for the pointer.

-Tim

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


Re: What is a used, undeclared dependency?

Posted by Mark Hobson <ma...@gmail.com>.
On 25/09/2007, Tim Kettler <ti...@udo.edu> wrote:
> Wouldn't this be a useful rule for the enforcer plugin?

It can be used in a similar manner to the enforcer rules:

https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-dependency-plugin/src/site/apt/examples/failing-the-build-on-dependency-analysis-warnings.apt

Mark

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


Re: What is a used, undeclared dependency?

Posted by Tim Kettler <ti...@udo.edu>.
Wouldn't this be a useful rule for the enforcer plugin?

-Tim

Brian E. Fox schrieb:
> It should be declared if you are using it. If not, and that dependency
> goes away because it's not used by your dependency anymore, your build
> will suddenly fail.
> 
> -----Original Message-----
> From: Torsten Schlabach [mailto:TSchlabach@gmx.net] 
> Sent: Tuesday, September 25, 2007 10:24 AM
> To: users@maven.apache.org
> Subject: Re: What is a used, undeclared dependency?
> 
> Thanks Tim!
> 
> So there is nothing wrong with having a used but undeclared dependency?
> 
> Regards,
> Torsten
> 
> -------- Original-Nachricht --------
>> Datum: Tue, 25 Sep 2007 16:07:59 +0200
>> Von: Tim Kettler <ti...@udo.edu>
>> An: Maven Users List <us...@maven.apache.org>
>> Betreff: Re: What is a used, undeclared dependency?
> 
>> Hi,
>>
>> Torsten Schlabach schrieb:
>>> Hi?
>>>
>>> I am analyzing my project with the dependency plugin:
>>>
>>>
> http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.htm
> l
>>> It says I have used, undeclared dependencies.
>>>
>>> Does that mean, my code depends on libs which I have failed to
> declare 
>>> as a dependency, but Maven applied some magic to provide them
> anyway?
>> Maven is good, but not that good. The libraries are pulled in as a 
>> transitive dependency of one of your declared dependencies.
>>
>>> Regards,
>>> Torsten
>> -Tim
>>
> ---------------------------------------------------------------------
>>> 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
> 
> ---------------------------------------------------------------------
> 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


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


RE: What is a used, undeclared dependency?

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
It should be declared if you are using it. If not, and that dependency
goes away because it's not used by your dependency anymore, your build
will suddenly fail.

-----Original Message-----
From: Torsten Schlabach [mailto:TSchlabach@gmx.net] 
Sent: Tuesday, September 25, 2007 10:24 AM
To: users@maven.apache.org
Subject: Re: What is a used, undeclared dependency?

Thanks Tim!

So there is nothing wrong with having a used but undeclared dependency?

Regards,
Torsten

-------- Original-Nachricht --------
> Datum: Tue, 25 Sep 2007 16:07:59 +0200
> Von: Tim Kettler <ti...@udo.edu>
> An: Maven Users List <us...@maven.apache.org>
> Betreff: Re: What is a used, undeclared dependency?

> Hi,
> 
> Torsten Schlabach schrieb:
> > Hi?
> > 
> > I am analyzing my project with the dependency plugin:
> > 
> >
>
http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.htm
l
> > 
> > It says I have used, undeclared dependencies.
> > 
> > Does that mean, my code depends on libs which I have failed to
declare 
> > as a dependency, but Maven applied some magic to provide them
anyway?
> 
> Maven is good, but not that good. The libraries are pulled in as a 
> transitive dependency of one of your declared dependencies.
> 
> > 
> > Regards,
> > Torsten
> 
> -Tim
> 
> >
---------------------------------------------------------------------
> > 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

---------------------------------------------------------------------
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: What is a used, undeclared dependency?

Posted by Torsten Schlabach <TS...@gmx.net>.
Thanks Tim!

So there is nothing wrong with having a used but undeclared dependency?

Regards,
Torsten

-------- Original-Nachricht --------
> Datum: Tue, 25 Sep 2007 16:07:59 +0200
> Von: Tim Kettler <ti...@udo.edu>
> An: Maven Users List <us...@maven.apache.org>
> Betreff: Re: What is a used, undeclared dependency?

> Hi,
> 
> Torsten Schlabach schrieb:
> > Hi?
> > 
> > I am analyzing my project with the dependency plugin:
> > 
> >
> http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html
> > 
> > It says I have used, undeclared dependencies.
> > 
> > Does that mean, my code depends on libs which I have failed to declare 
> > as a dependency, but Maven applied some magic to provide them anyway?
> 
> Maven is good, but not that good. The libraries are pulled in as a 
> transitive dependency of one of your declared dependencies.
> 
> > 
> > Regards,
> > Torsten
> 
> -Tim
> 
> > ---------------------------------------------------------------------
> > 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

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


Re: What is a used, undeclared dependency?

Posted by Tim Kettler <ti...@udo.edu>.
Hi,

Torsten Schlabach schrieb:
> Hi?
> 
> I am analyzing my project with the dependency plugin:
> 
> http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html
> 
> It says I have used, undeclared dependencies.
> 
> Does that mean, my code depends on libs which I have failed to declare 
> as a dependency, but Maven applied some magic to provide them anyway?

Maven is good, but not that good. The libraries are pulled in as a 
transitive dependency of one of your declared dependencies.

> 
> Regards,
> Torsten

-Tim

> ---------------------------------------------------------------------
> 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