Re: Dependency management problem with classifier tag - bug?

2006-06-21 Thread Jose Gonzalez Gomez

I understand from your words that if you have a classifier the dependency is
identified not only with groupId and artifactId but also with classifier, so
if you have two dependencies with different classifiers you should include
both dependencies in the dependency management section, each with its
corresponding classifier, and then you would identify the dependency in the
child pom using groupId, artifactId and classifier, am I right?

2006/6/20, Carlos Sanchez [EMAIL PROTECTED]:


because you may have two dependencies with different classifiers

On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote:
 Ok, now it's working... may I ask what is the logic behind this? I mean,
why
 must classifier be included in the child pom?

 Thanks a lot, best regards
 Jose

 2006/6/20, Carlos Sanchez [EMAIL PROTECTED]:
 
  no, classifier in both
 
  On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote:
   Do you mean this?
  
   parent pom:
 dependency
   groupIdorg.testng/groupId
   artifactIdtestng/artifactId
   version4.7/version
   scopetest/scope
 /dependency
  
   child pom:
   dependency
 groupIdorg.testng/groupId
 artifactIdtestng/artifactId
 classifierjdk15/classifier
   /dependency
  
   I tried it, and it also fails
  
   2006/6/20, Carlos Sanchez [EMAIL PROTECTED]:
   
you have to add the classifier in the child
   
On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED]
wrote:
 Hi there,

 I'm having a really strange problem related to dependency
  management. I
have
 a parent pom with some dependencies declared in the dependency
management
 section, and a child pom inheriting from it. One of the
dependencies
  is
the
 testng jar. Here you have excerpts from both files:

 Parent pom:
 ?xml version=1.0 encoding=UTF-8?
 project
   modelVersion4.0.0/modelVersion
   groupIdorg.surveyforge/groupId
   artifactIdsurveyforge/artifactId
   packagingpom/packaging
   nameSurveyForge/name
   version0.1-SNAPSHOT/version
 [...]
   dependencyManagement
 dependencies
 [...]
   dependency
 groupIdorg.testng/groupId
 artifactIdtestng/artifactId
 version4.7/version
 classifierjdk15/classifier
 scopetest/scope
   /dependency
 [...]
 /dependencies
   /dependencyManagement
 [...]
 /project


 Child pom:
 ?xml version=1.0 encoding=UTF-8?
 project
   parent
 groupIdorg.surveyforge/groupId
 artifactIdsurveyforge/artifactId
 version0.1-SNAPSHOT/version
   /parent
   modelVersion4.0.0/modelVersion
   artifactIdsurveyforge-classification/artifactId
   nameSurveyForge Classification API/name
 [...]
   dependencies
 dependency
   groupIdorg.testng/groupId
   artifactIdtestng/artifactId
 /dependency
 [...]
   /dependencies
 [...]
 /project

 If I try to run any goal I get with these two files I get the
  following:
 [INFO] Scanning for projects...
 [INFO]

 

 [ERROR] FATAL ERROR
 [INFO]

 

 [INFO] Error building POM (may not be this project's POM).


 Project ID: org.surveyforge:surveyforge-classification
 POM Location:

U:\proyectos\otros\surveyforge\surveyforge-classification\pom.xml
 Validation Messages:

 [0]  'dependencies.dependency.version' is missing for
org.testng:testng


 Reason: Failed to validate POM


 [INFO]

 

 [INFO] Trace
 org.apache.maven.reactor.MavenExecutionException: Failed to
validate
  POM
 at org.apache.maven.DefaultMaven.getProjects(
  DefaultMaven.java
:365)
 at org.apache.maven.DefaultMaven.doExecute(
DefaultMaven.java
:278)
 at org.apache.maven.DefaultMaven.execute(
DefaultMaven.java
  :115)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
  Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(
 NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(
 DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.codehaus.classworlds.Launcher.launchEnhanced(
Launcher.java
 :315)
 at org.codehaus.classworlds.Launcher.launch(
Launcher.java
  :255)
 at org.codehaus.classworlds.Launcher.mainWithExitCode(
Launcher.java
 :430)
 at org.codehaus.classworlds.Launcher.main(Launcher.java
:375)
 

Re: Dependency management problem with classifier tag - bug?

2006-06-21 Thread Carlos Sanchez

correct IIRC

On 6/21/06, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote:

I understand from your words that if you have a classifier the dependency is
identified not only with groupId and artifactId but also with classifier, so
if you have two dependencies with different classifiers you should include
both dependencies in the dependency management section, each with its
corresponding classifier, and then you would identify the dependency in the
child pom using groupId, artifactId and classifier, am I right?

2006/6/20, Carlos Sanchez [EMAIL PROTECTED]:

 because you may have two dependencies with different classifiers

 On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote:
  Ok, now it's working... may I ask what is the logic behind this? I mean,
 why
  must classifier be included in the child pom?
 
  Thanks a lot, best regards
  Jose
 
  2006/6/20, Carlos Sanchez [EMAIL PROTECTED]:
  
   no, classifier in both
  
   On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote:
Do you mean this?
   
parent pom:
  dependency
groupIdorg.testng/groupId
artifactIdtestng/artifactId
version4.7/version
scopetest/scope
  /dependency
   
child pom:
dependency
  groupIdorg.testng/groupId
  artifactIdtestng/artifactId
  classifierjdk15/classifier
/dependency
   
I tried it, and it also fails
   
2006/6/20, Carlos Sanchez [EMAIL PROTECTED]:

 you have to add the classifier in the child

 On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED]
 wrote:
  Hi there,
 
  I'm having a really strange problem related to dependency
   management. I
 have
  a parent pom with some dependencies declared in the dependency
 management
  section, and a child pom inheriting from it. One of the
 dependencies
   is
 the
  testng jar. Here you have excerpts from both files:
 
  Parent pom:
  ?xml version=1.0 encoding=UTF-8?
  project
modelVersion4.0.0/modelVersion
groupIdorg.surveyforge/groupId
artifactIdsurveyforge/artifactId
packagingpom/packaging
nameSurveyForge/name
version0.1-SNAPSHOT/version
  [...]
dependencyManagement
  dependencies
  [...]
dependency
  groupIdorg.testng/groupId
  artifactIdtestng/artifactId
  version4.7/version
  classifierjdk15/classifier
  scopetest/scope
/dependency
  [...]
  /dependencies
/dependencyManagement
  [...]
  /project
 
 
  Child pom:
  ?xml version=1.0 encoding=UTF-8?
  project
parent
  groupIdorg.surveyforge/groupId
  artifactIdsurveyforge/artifactId
  version0.1-SNAPSHOT/version
/parent
modelVersion4.0.0/modelVersion
artifactIdsurveyforge-classification/artifactId
nameSurveyForge Classification API/name
  [...]
dependencies
  dependency
groupIdorg.testng/groupId
artifactIdtestng/artifactId
  /dependency
  [...]
/dependencies
  [...]
  /project
 
  If I try to run any goal I get with these two files I get the
   following:
  [INFO] Scanning for projects...
  [INFO]
 
  
 
  [ERROR] FATAL ERROR
  [INFO]
 
  
 
  [INFO] Error building POM (may not be this project's POM).
 
 
  Project ID: org.surveyforge:surveyforge-classification
  POM Location:
 
 U:\proyectos\otros\surveyforge\surveyforge-classification\pom.xml
  Validation Messages:
 
  [0]  'dependencies.dependency.version' is missing for
 org.testng:testng
 
 
  Reason: Failed to validate POM
 
 
  [INFO]
 
  
 
  [INFO] Trace
  org.apache.maven.reactor.MavenExecutionException: Failed to
 validate
   POM
  at org.apache.maven.DefaultMaven.getProjects(
   DefaultMaven.java
 :365)
  at org.apache.maven.DefaultMaven.doExecute(
 DefaultMaven.java
 :278)
  at org.apache.maven.DefaultMaven.execute(
 DefaultMaven.java
   :115)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
   Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(
  NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(
  DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.codehaus.classworlds.Launcher.launchEnhanced(
 Launcher.java
  :315)
  at 

Dependency management problem with classifier tag - bug?

2006-06-20 Thread Jose Gonzalez Gomez

Hi there,

I'm having a really strange problem related to dependency management. I have
a parent pom with some dependencies declared in the dependency management
section, and a child pom inheriting from it. One of the dependencies is the
testng jar. Here you have excerpts from both files:

Parent pom:
?xml version=1.0 encoding=UTF-8?
project
 modelVersion4.0.0/modelVersion
 groupIdorg.surveyforge/groupId
 artifactIdsurveyforge/artifactId
 packagingpom/packaging
 nameSurveyForge/name
 version0.1-SNAPSHOT/version
[...]
 dependencyManagement
   dependencies
[...]
 dependency
   groupIdorg.testng/groupId
   artifactIdtestng/artifactId
   version4.7/version
   classifierjdk15/classifier
   scopetest/scope
 /dependency
[...]
   /dependencies
 /dependencyManagement
[...]
/project


Child pom:
?xml version=1.0 encoding=UTF-8?
project
 parent
   groupIdorg.surveyforge/groupId
   artifactIdsurveyforge/artifactId
   version0.1-SNAPSHOT/version
 /parent
 modelVersion4.0.0/modelVersion
 artifactIdsurveyforge-classification/artifactId
 nameSurveyForge Classification API/name
[...]
 dependencies
   dependency
 groupIdorg.testng/groupId
 artifactIdtestng/artifactId
   /dependency
[...]
 /dependencies
[...]
/project

If I try to run any goal I get with these two files I get the following:
[INFO] Scanning for projects...
[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] Error building POM (may not be this project's POM).


Project ID: org.surveyforge:surveyforge-classification
POM Location:
U:\proyectos\otros\surveyforge\surveyforge-classification\pom.xml
Validation Messages:

   [0]  'dependencies.dependency.version' is missing for org.testng:testng


Reason: Failed to validate POM


[INFO]

[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to validate POM
   at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:278)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
:315)
   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
:430)
   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to
validate POM
   at
org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(
DefaultMavenProjectBuilder.java:926)
   at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal
(DefaultMavenProjectBuilder.java:737)
   at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal
(DefaultMavenProjectBuilder.java:416)
   at org.apache.maven.project.DefaultMavenProjectBuilder.build(
DefaultMavenProjectBuilder.java:192)
   at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:515)
   at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java
:447)
   at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java
:491)
   at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:351)
   ... 11 more
[INFO]

[INFO] Total time:  1 second
[INFO] Finished at: Tue Jun 20 12:11:45 CEST 2006
[INFO] Final Memory: 1M/2M
[INFO]



If I take away the classifier tag in the parent pom maven is able to
validate the pom, but (obviously) fails because it cannot download the jar.
If I include the whole dependency in the child pom and take it away from the
parent pom I also get a correct execution.

Any ideas? Is the classifier tag allowed in the dependency management
section? Is this a bug?

Best regards
Jose


Re: Dependency management problem with classifier tag - bug?

2006-06-20 Thread Carlos Sanchez

you have to add the classifier in the child

On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote:

Hi there,

I'm having a really strange problem related to dependency management. I have
a parent pom with some dependencies declared in the dependency management
section, and a child pom inheriting from it. One of the dependencies is the
testng jar. Here you have excerpts from both files:

Parent pom:
?xml version=1.0 encoding=UTF-8?
project
  modelVersion4.0.0/modelVersion
  groupIdorg.surveyforge/groupId
  artifactIdsurveyforge/artifactId
  packagingpom/packaging
  nameSurveyForge/name
  version0.1-SNAPSHOT/version
[...]
  dependencyManagement
dependencies
[...]
  dependency
groupIdorg.testng/groupId
artifactIdtestng/artifactId
version4.7/version
classifierjdk15/classifier
scopetest/scope
  /dependency
[...]
/dependencies
  /dependencyManagement
[...]
/project


Child pom:
?xml version=1.0 encoding=UTF-8?
project
  parent
groupIdorg.surveyforge/groupId
artifactIdsurveyforge/artifactId
version0.1-SNAPSHOT/version
  /parent
  modelVersion4.0.0/modelVersion
  artifactIdsurveyforge-classification/artifactId
  nameSurveyForge Classification API/name
[...]
  dependencies
dependency
  groupIdorg.testng/groupId
  artifactIdtestng/artifactId
/dependency
[...]
  /dependencies
[...]
/project

If I try to run any goal I get with these two files I get the following:
[INFO] Scanning for projects...
[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] Error building POM (may not be this project's POM).


Project ID: org.surveyforge:surveyforge-classification
POM Location:
U:\proyectos\otros\surveyforge\surveyforge-classification\pom.xml
Validation Messages:

[0]  'dependencies.dependency.version' is missing for org.testng:testng


Reason: Failed to validate POM


[INFO]

[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to validate POM
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:278)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to
validate POM
at
org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(
DefaultMavenProjectBuilder.java:926)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal
(DefaultMavenProjectBuilder.java:737)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal
(DefaultMavenProjectBuilder.java:416)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(
DefaultMavenProjectBuilder.java:192)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:515)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java
:447)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java
:491)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:351)
... 11 more
[INFO]

[INFO] Total time:  1 second
[INFO] Finished at: Tue Jun 20 12:11:45 CEST 2006
[INFO] Final Memory: 1M/2M
[INFO]



If I take away the classifier tag in the parent pom maven is able to
validate the pom, but (obviously) fails because it cannot download the jar.
If I include the whole dependency in the child pom and take it away from the
parent pom I also get a correct execution.

Any ideas? Is the classifier tag allowed in the dependency management
section? Is this a bug?

Best regards
Jose





--
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
-- The Princess Bride

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dependency management problem with classifier tag - bug?

2006-06-20 Thread Jose Gonzalez Gomez

Do you mean this?

parent pom:
 dependency
   groupIdorg.testng/groupId
   artifactIdtestng/artifactId
   version4.7/version
   scopetest/scope
 /dependency

child pom:
   dependency
 groupIdorg.testng/groupId
 artifactIdtestng/artifactId
 classifierjdk15/classifier
   /dependency

I tried it, and it also fails

2006/6/20, Carlos Sanchez [EMAIL PROTECTED]:


you have to add the classifier in the child

On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote:
 Hi there,

 I'm having a really strange problem related to dependency management. I
have
 a parent pom with some dependencies declared in the dependency
management
 section, and a child pom inheriting from it. One of the dependencies is
the
 testng jar. Here you have excerpts from both files:

 Parent pom:
 ?xml version=1.0 encoding=UTF-8?
 project
   modelVersion4.0.0/modelVersion
   groupIdorg.surveyforge/groupId
   artifactIdsurveyforge/artifactId
   packagingpom/packaging
   nameSurveyForge/name
   version0.1-SNAPSHOT/version
 [...]
   dependencyManagement
 dependencies
 [...]
   dependency
 groupIdorg.testng/groupId
 artifactIdtestng/artifactId
 version4.7/version
 classifierjdk15/classifier
 scopetest/scope
   /dependency
 [...]
 /dependencies
   /dependencyManagement
 [...]
 /project


 Child pom:
 ?xml version=1.0 encoding=UTF-8?
 project
   parent
 groupIdorg.surveyforge/groupId
 artifactIdsurveyforge/artifactId
 version0.1-SNAPSHOT/version
   /parent
   modelVersion4.0.0/modelVersion
   artifactIdsurveyforge-classification/artifactId
   nameSurveyForge Classification API/name
 [...]
   dependencies
 dependency
   groupIdorg.testng/groupId
   artifactIdtestng/artifactId
 /dependency
 [...]
   /dependencies
 [...]
 /project

 If I try to run any goal I get with these two files I get the following:
 [INFO] Scanning for projects...
 [INFO]
 
 [ERROR] FATAL ERROR
 [INFO]
 
 [INFO] Error building POM (may not be this project's POM).


 Project ID: org.surveyforge:surveyforge-classification
 POM Location:
 U:\proyectos\otros\surveyforge\surveyforge-classification\pom.xml
 Validation Messages:

 [0]  'dependencies.dependency.version' is missing for
org.testng:testng


 Reason: Failed to validate POM


 [INFO]
 
 [INFO] Trace
 org.apache.maven.reactor.MavenExecutionException: Failed to validate POM
 at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java
:365)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
:278)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(
 NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(
 DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.codehaus.classworlds.Launcher.launchEnhanced(
Launcher.java
 :315)
 at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
 at org.codehaus.classworlds.Launcher.mainWithExitCode(
Launcher.java
 :430)
 at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
 Caused by: org.apache.maven.project.InvalidProjectModelException: Failed
to
 validate POM
 at
 org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(
 DefaultMavenProjectBuilder.java:926)
 at
org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal
 (DefaultMavenProjectBuilder.java:737)
 at

org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal
 (DefaultMavenProjectBuilder.java:416)
 at org.apache.maven.project.DefaultMavenProjectBuilder.build(
 DefaultMavenProjectBuilder.java:192)
 at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java
:515)
 at org.apache.maven.DefaultMaven.collectProjects(
DefaultMaven.java
 :447)
 at org.apache.maven.DefaultMaven.collectProjects(
DefaultMaven.java
 :491)
 at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java
:351)
 ... 11 more
 [INFO]
 
 [INFO] Total time:  1 second
 [INFO] Finished at: Tue Jun 20 12:11:45 CEST 2006
 [INFO] Final Memory: 1M/2M
 [INFO]
 


 If I take away the classifier tag in the parent pom maven is able to
 validate the pom, but (obviously) fails because it cannot download the
jar.
 If I include the whole dependency in the child pom and take it away from
the
 parent pom I 

Re: Dependency management problem with classifier tag - bug?

2006-06-20 Thread Carlos Sanchez

no, classifier in both

On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote:

Do you mean this?

parent pom:
  dependency
groupIdorg.testng/groupId
artifactIdtestng/artifactId
version4.7/version
scopetest/scope
  /dependency

child pom:
dependency
  groupIdorg.testng/groupId
  artifactIdtestng/artifactId
  classifierjdk15/classifier
/dependency

I tried it, and it also fails

2006/6/20, Carlos Sanchez [EMAIL PROTECTED]:

 you have to add the classifier in the child

 On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote:
  Hi there,
 
  I'm having a really strange problem related to dependency management. I
 have
  a parent pom with some dependencies declared in the dependency
 management
  section, and a child pom inheriting from it. One of the dependencies is
 the
  testng jar. Here you have excerpts from both files:
 
  Parent pom:
  ?xml version=1.0 encoding=UTF-8?
  project
modelVersion4.0.0/modelVersion
groupIdorg.surveyforge/groupId
artifactIdsurveyforge/artifactId
packagingpom/packaging
nameSurveyForge/name
version0.1-SNAPSHOT/version
  [...]
dependencyManagement
  dependencies
  [...]
dependency
  groupIdorg.testng/groupId
  artifactIdtestng/artifactId
  version4.7/version
  classifierjdk15/classifier
  scopetest/scope
/dependency
  [...]
  /dependencies
/dependencyManagement
  [...]
  /project
 
 
  Child pom:
  ?xml version=1.0 encoding=UTF-8?
  project
parent
  groupIdorg.surveyforge/groupId
  artifactIdsurveyforge/artifactId
  version0.1-SNAPSHOT/version
/parent
modelVersion4.0.0/modelVersion
artifactIdsurveyforge-classification/artifactId
nameSurveyForge Classification API/name
  [...]
dependencies
  dependency
groupIdorg.testng/groupId
artifactIdtestng/artifactId
  /dependency
  [...]
/dependencies
  [...]
  /project
 
  If I try to run any goal I get with these two files I get the following:
  [INFO] Scanning for projects...
  [INFO]
  
  [ERROR] FATAL ERROR
  [INFO]
  
  [INFO] Error building POM (may not be this project's POM).
 
 
  Project ID: org.surveyforge:surveyforge-classification
  POM Location:
  U:\proyectos\otros\surveyforge\surveyforge-classification\pom.xml
  Validation Messages:
 
  [0]  'dependencies.dependency.version' is missing for
 org.testng:testng
 
 
  Reason: Failed to validate POM
 
 
  [INFO]
  
  [INFO] Trace
  org.apache.maven.reactor.MavenExecutionException: Failed to validate POM
  at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java
 :365)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
 :278)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(
  NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(
  DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.codehaus.classworlds.Launcher.launchEnhanced(
 Launcher.java
  :315)
  at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
  at org.codehaus.classworlds.Launcher.mainWithExitCode(
 Launcher.java
  :430)
  at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
  Caused by: org.apache.maven.project.InvalidProjectModelException: Failed
 to
  validate POM
  at
  org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(
  DefaultMavenProjectBuilder.java:926)
  at
 org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal
  (DefaultMavenProjectBuilder.java:737)
  at
 
 
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal
  (DefaultMavenProjectBuilder.java:416)
  at org.apache.maven.project.DefaultMavenProjectBuilder.build(
  DefaultMavenProjectBuilder.java:192)
  at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java
 :515)
  at org.apache.maven.DefaultMaven.collectProjects(
 DefaultMaven.java
  :447)
  at org.apache.maven.DefaultMaven.collectProjects(
 DefaultMaven.java
  :491)
  at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java
 :351)
  ... 11 more
  [INFO]
  
  [INFO] Total time:  1 second
  [INFO] Finished at: Tue Jun 20 12:11:45 CEST 2006
  [INFO] Final Memory: 1M/2M
  [INFO]
  
 
 
  If I 

Re: Dependency management problem with classifier tag - bug?

2006-06-20 Thread Carlos Sanchez

because you may have two dependencies with different classifiers

On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote:

Ok, now it's working... may I ask what is the logic behind this? I mean, why
must classifier be included in the child pom?

Thanks a lot, best regards
Jose

2006/6/20, Carlos Sanchez [EMAIL PROTECTED]:

 no, classifier in both

 On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote:
  Do you mean this?
 
  parent pom:
dependency
  groupIdorg.testng/groupId
  artifactIdtestng/artifactId
  version4.7/version
  scopetest/scope
/dependency
 
  child pom:
  dependency
groupIdorg.testng/groupId
artifactIdtestng/artifactId
classifierjdk15/classifier
  /dependency
 
  I tried it, and it also fails
 
  2006/6/20, Carlos Sanchez [EMAIL PROTECTED]:
  
   you have to add the classifier in the child
  
   On 6/20/06, Jose Gonzalez Gomez [EMAIL PROTECTED] wrote:
Hi there,
   
I'm having a really strange problem related to dependency
 management. I
   have
a parent pom with some dependencies declared in the dependency
   management
section, and a child pom inheriting from it. One of the dependencies
 is
   the
testng jar. Here you have excerpts from both files:
   
Parent pom:
?xml version=1.0 encoding=UTF-8?
project
  modelVersion4.0.0/modelVersion
  groupIdorg.surveyforge/groupId
  artifactIdsurveyforge/artifactId
  packagingpom/packaging
  nameSurveyForge/name
  version0.1-SNAPSHOT/version
[...]
  dependencyManagement
dependencies
[...]
  dependency
groupIdorg.testng/groupId
artifactIdtestng/artifactId
version4.7/version
classifierjdk15/classifier
scopetest/scope
  /dependency
[...]
/dependencies
  /dependencyManagement
[...]
/project
   
   
Child pom:
?xml version=1.0 encoding=UTF-8?
project
  parent
groupIdorg.surveyforge/groupId
artifactIdsurveyforge/artifactId
version0.1-SNAPSHOT/version
  /parent
  modelVersion4.0.0/modelVersion
  artifactIdsurveyforge-classification/artifactId
  nameSurveyForge Classification API/name
[...]
  dependencies
dependency
  groupIdorg.testng/groupId
  artifactIdtestng/artifactId
/dependency
[...]
  /dependencies
[...]
/project
   
If I try to run any goal I get with these two files I get the
 following:
[INFO] Scanning for projects...
[INFO]
   
 
[ERROR] FATAL ERROR
[INFO]
   
 
[INFO] Error building POM (may not be this project's POM).
   
   
Project ID: org.surveyforge:surveyforge-classification
POM Location:
U:\proyectos\otros\surveyforge\surveyforge-classification\pom.xml
Validation Messages:
   
[0]  'dependencies.dependency.version' is missing for
   org.testng:testng
   
   
Reason: Failed to validate POM
   
   
[INFO]
   
 
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to validate
 POM
at org.apache.maven.DefaultMaven.getProjects(
 DefaultMaven.java
   :365)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
   :278)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java
 :115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(
   Launcher.java
:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java
 :255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(
   Launcher.java
:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException:
 Failed
   to
validate POM
at
   
 org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(
DefaultMavenProjectBuilder.java:926)
at
   org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal
(DefaultMavenProjectBuilder.java:737)
at
   
  
 
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal
(DefaultMavenProjectBuilder.java:416)
at org.apache.maven.project.DefaultMavenProjectBuilder.build
 (
DefaultMavenProjectBuilder.java:192)
at