Laird, Barrie

Thanks for taking the time with some useful explanations
I'd like to put more detail into my problem in the hope that you may be able
to spot something I am doing wrong:

I started off with parent and child poms with no dependency management -
along the lines of:

Parent pom (without dependencyManagement)

                <dependencies>
                        <dependency>
                                <groupId>log4j</groupId>
                                <artifactId>log4j</artifactId>
                                <version>${log4j-version}</version>
                        </dependency>

.
.
.
                </dependencies>

Child pom (without dependencyManagement)

        <dependencies>
                        <dependency>
                                        <groupId>log4j</groupId>
                                        <artifactId>log4j</artifactId>
                                        <version>${log4j-version}</version>
                        </dependency>
.
.
.
        </dependencies>

As I said, 'mvn clean deploy' completed successfully with no compilation
errors


I then changed the parent and child poms to use dependency management -
along the lines of:

Parent pom (with dependencyManagement)
        <dependencyManagement>
                <dependencies>
                        <dependency>
                                <groupId>log4j</groupId>
                                <artifactId>log4j</artifactId>
                                <version>${log4j-version}</version>
                        </dependency>

.
.
.
                </dependencies>
        </dependencyManagement>


Child pom (with dependencyManagement)

        <dependencies>
                        <dependency>
                                        <groupId>log4j</groupId>
                                        <artifactId>log4j</artifactId>
                        </dependency>
.
.
.
        </dependencies>

I arranged that each child pom only referenced the dependencies it needed
- with the parent pom having all dependencies required by all children
After that I got the compilation error
Interestingly, I got the same error trace when invoking 'mvn
dependency:analyze'

>The compilation error you're talking about looks like something more
>substantial than a bad dependency--you're getting a compiler error from
>within javac itself.

However,  the compilation error did not occur in the situation without
dependencyManagement    
If there is a genuine compilation error, would it be expected to show in
both cases

Is that the correct way to use dependencyManagement ?

Thanks for reading and any help / suggestions
Geoff



--
View this message in context: 
http://maven.40175.n5.nabble.com/Adding-dependency-management-to-parent-pom-causes-errors-tp5784035p5784252.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to