Hi there,

I'm trying to utilise dependency management but am obviously missing something.

I've got
/pom.xml
/frameworks/pom.xml
/frameworks/fwk1
...
/frameworks/fwkN
/app1/pom.xml

-- root parent pom --
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>...</groupId>
      <artifactId>...</artifactId>
      <type>...</type>
      <version>...</version>
    </dependency>
  </dependencies>
</dependencyManagement>

-- /frameworks/pom.xml --
<dependencies>
        <dependency>
                <groupId>...</groupId>
                <artifactId>...</artifactId>
                <scope>provided</scope>
        </dependency>
</dependencies>

And so forth. Previously I had no dependencyManagement at all. So the only mention of the version of a dependency is in the management section. However, now when I do a 'mvn clean' I get the following.

What am I missing? Thanks.
Obviously - adding the version to the /frameworks/pom.xml's dependencies works but I thought that was the whole idea behind the dependencyManagement declarations in the parent pom? Or is that only relevant for child poms where the packaging is not of type pom?

$ mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).

Project ID: foo.bar:frameworks
POM Location: <...>/foobar/frameworks/pom.xml
Validation Messages:

    [0]  'dependencies.dependency.version' is missing for <...>
    [1]  'dependencies.dependency.version' is missing for <...>
    [2]  'dependencies.dependency.version' is missing for <...>
    [3]  'dependencies.dependency.version' is missing for <...>

Reason: Failed to validate POM for project foo.bar:frameworks at <...>/ foobar/frameworks/pom.xml

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to validate POM for project foo.bar:frameworks at <...>/foobar/frameworks/pom.xml
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:376)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:289)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        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)

with regards,
--

Lachlan Deck




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

Reply via email to