You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by aldana <al...@gmx.de> on 2009/04/29 16:27:15 UTC

Problem with parent-pom and referencing version classifier

Hi,

I am having:

<dependency>
 <groupId>net.sf.json-lib</groupId>
 <artifactId>json-lib</artifactId>
 <version>2.2.3</version>
 <classifier>jdk15</classifier>
</dependency>


I want to keep version information in parent pom in dependency management.
But when extracting this to <dependencyManagement> in parent-pom, I get
following error:

'dependencies.dependency.version' is missing for net.sf.json-lib:json-lib

All other dependencies version extractions to parent-pom work. Only this
json-lib makes problems. I noticed that is the only one with the classifier
information. Could this be the issue.

I can both reproduce on linux with 2.0.9 and 2.1.0.


-----
manuel aldana
aldana((at))gmx.de
software-engineering blog: http://www.aldana-online.de
-- 
View this message in context: http://www.nabble.com/Problem-with-parent-pom-and-referencing-version-classifier-tp23296079p23296079.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Problem with parent-pom and referencing version classifier

Posted by Nick Stolwijk <ni...@gmail.com>.
A dependency is identified by three things: groupId, artifactId and
classifier. Only the version is configured by dependencyManagement. So
you can say: I want this artifact (groupId, artifactId, classifier)
and let my parent decide which version I get.

With regards,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Thu, Apr 30, 2009 at 5:21 PM, Grant Rettke <gr...@acm.org> wrote:
> On Wed, Apr 29, 2009 at 10:26 AM, Nick Stolwijk <ni...@gmail.com> wrote:
>> You have to specify the classifier in the dependencymanagement section
>> as well as in the dependency section as it identifies the dependency.
>
> Why do you have to put it both places?
>
> By doing so, won't the children inherit the dependency, and thus, not
> need to utilize dependencyManagement?
>
> ---------------------------------------------------------------------
> 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: Problem with parent-pom and referencing version classifier

Posted by Grant Rettke <gr...@acm.org>.
On Wed, Apr 29, 2009 at 10:26 AM, Nick Stolwijk <ni...@gmail.com> wrote:
> You have to specify the classifier in the dependencymanagement section
> as well as in the dependency section as it identifies the dependency.

Why do you have to put it both places?

By doing so, won't the children inherit the dependency, and thus, not
need to utilize dependencyManagement?

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


Re: Problem with parent-pom and referencing version classifier

Posted by aldana <al...@gmx.de>.
Thanks this worked.

this was weirdly the combination I did not try out...


Nick Stolwijk-4 wrote:
> 
> You have to specify the classifier in the dependencymanagement section
> as well as in the dependency section as it identifies the dependency.
> 
> Hth,
> 
> Nick Stolwijk
> ~Java Developer~
> 
> Iprofs BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> www.iprofs.nl
> 
> 
> 
> On Wed, Apr 29, 2009 at 4:27 PM, aldana <al...@gmx.de> wrote:
>>
>> Hi,
>>
>> I am having:
>>
>> <dependency>
>>  <groupId>net.sf.json-lib</groupId>
>>  <artifactId>json-lib</artifactId>
>>  <version>2.2.3</version>
>>  <classifier>jdk15</classifier>
>> </dependency>
>>
>>
>> I want to keep version information in parent pom in dependency
>> management.
>> But when extracting this to <dependencyManagement> in parent-pom, I get
>> following error:
>>
>> 'dependencies.dependency.version' is missing for net.sf.json-lib:json-lib
>>
>> All other dependencies version extractions to parent-pom work. Only this
>> json-lib makes problems. I noticed that is the only one with the
>> classifier
>> information. Could this be the issue.
>>
>> I can both reproduce on linux with 2.0.9 and 2.1.0.
>>
>>
>> -----
>> manuel aldana
>> aldana((at))gmx.de
>> software-engineering blog: http://www.aldana-online.de
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-parent-pom-and-referencing-version-classifier-tp23296079p23296079.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 


-----
manuel aldana
aldana((at))gmx.de
software-engineering blog: http://www.aldana-online.de
-- 
View this message in context: http://www.nabble.com/Problem-with-parent-pom-and-referencing-version-classifier-tp23296079p23315534.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Problem with parent-pom and referencing version classifier

Posted by Nick Stolwijk <ni...@gmail.com>.
You have to specify the classifier in the dependencymanagement section
as well as in the dependency section as it identifies the dependency.

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Wed, Apr 29, 2009 at 4:27 PM, aldana <al...@gmx.de> wrote:
>
> Hi,
>
> I am having:
>
> <dependency>
>  <groupId>net.sf.json-lib</groupId>
>  <artifactId>json-lib</artifactId>
>  <version>2.2.3</version>
>  <classifier>jdk15</classifier>
> </dependency>
>
>
> I want to keep version information in parent pom in dependency management.
> But when extracting this to <dependencyManagement> in parent-pom, I get
> following error:
>
> 'dependencies.dependency.version' is missing for net.sf.json-lib:json-lib
>
> All other dependencies version extractions to parent-pom work. Only this
> json-lib makes problems. I noticed that is the only one with the classifier
> information. Could this be the issue.
>
> I can both reproduce on linux with 2.0.9 and 2.1.0.
>
>
> -----
> manuel aldana
> aldana((at))gmx.de
> software-engineering blog: http://www.aldana-online.de
> --
> View this message in context: http://www.nabble.com/Problem-with-parent-pom-and-referencing-version-classifier-tp23296079p23296079.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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