That sounds a normal Maven behavior as it should pull jar from your
local/remote repo rather than target during any build cycle.

On Tue, Oct 7, 2008 at 6:25 AM, M. Hansen <[EMAIL PROTECTED]> wrote:

> Hi,
>
> In svn we have our projects organized in a flat hierarchy like this:
>
> myproject/myartifactparent/pom.xml
> myproject/myartifactjar/pom.xml
> myproject/myartifactear/pom.xml
> myproject/myartifactwar/pom.xml
>
> myproject/myartifactparent/pom.xml looks like this:
>
> ...
>    <modelVersion>4.0.0</modelVersion>
>    <groupId>mygroup</groupId>
>    <artifactId>myartifactparent</artifactId>
>    <packaging>pom</packaging>
>    <version>1.0-SNAPSHOT</version>
>    <modules>
>        <module>../myartifactjar</module>
>        <module>../myartifactwar</module>
>        <module>../myartifactear</module>
>    </modules>
> ...
>
> My question is the following. To build the whole project we use
> myproject/myartifactparent/pom.xml and we issue 'mvn install'. We would
> like
> to be able to just use 'mvn package' but apparently it not enough as module
> dependencies specified in the modules section of
> myproject/myartifactparent/pom.xml are not honoured as we thought. If
> myartifactwar depends on myartifactjar, myartifactjar is fetched from the
> Maven repository and not from the target directory of the myartifactjar
> directory that has just been build. Is this the right behaviour of Maven?
> If
> so it would be a nice feature if one could build a multiproject without
> being forced to install artifacts locally.
>
> /MH
>

Reply via email to