Hi all -

I'm a little confused about how maven resolves dependencies that I have
defined for my project modules.  I have the following project directory
structure:

      cods (main dir )
            CodsCommon (sub-dir)
            CodsWeb (sub-dir)

I have a pom.xml file setup in cods directory, which defines CodsCommon and
CodsWeb as two modules (CodsCommon and CodsWeb each have individual pom.xml
files, as well).

The CodsWeb module has a dependency on CodsCommon - and requires that
CodsCommon be built first. Exerpt from pom.xml file in CodsWeb module looks
like this:
            ...
            <dependency>
                  <groupId>maersk</groupId>
                  <artifactId>CodsCommon</artifactId>
                  <version>1.0-SNAPSHOT</version>
            </dependency>

My question is:  when I run the 'mvn compile' command it all works
properly: the dependency to Common (shown below) gets resolved even though
the artifact does NOT seem to get installed in my .m2 local repository?!
It seems a little strange - I kind of expected my CodsCommon artifact to be
installed after/during command execution..   So the mystery is: the
dependent module didn't get installed in .m2, but somehow this dependency
got resolved at run-time... hence my confusion.

A little clarification please -

Thanks,
James

Reply via email to