You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sasha O <vi...@codebistro.com> on 2007/03/08 07:04:48 UTC

Multi-module project: pick up dependencies?

Dear All,

My project consists of several interdependent modules. Module B depends
on module A.

When I am trying to build module B Maven complains that the module A was
not found in the local repository. I would expect Maven to be able to
figure this out automatically -- this is what dependency management is
all about, right?

Is there a way to build dependencies automatically without requiring me
to 'mvn install' them?

Thank you,
Sasha


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multi-module project: assembly is not picking up dependencies

Posted by Sasha O <vi...@codebistro.com>.
Just checked: the same thing happens on the "Better Builds with Maven"
examples -- 'mvn assembly:assembly' fails. See below.

Tried using Maven 2.0.4 or 2.0.5.

Would appreciate any insight on how to make Maven work for me.

Thanks.

=======================
[INFO] Failed to resolve artifact.

Missing:
----------
1) com.mergere.mvnbook.proficio:proficio-model:jar:1.0-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=com.mergere.mvnbook.proficio
-Dartifact
Id=proficio-model \
          -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency:
        1) com.mergere.mvnbook.proficio:proficio-api:jar:1.0-SNAPSHOT
        2) com.mergere.mvnbook.proficio:proficio-model:jar:1.0-SNAPSHOT

----------
1 required artifact is missing.

for artifact:
  com.mergere.mvnbook.proficio:proficio-api:jar:1.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo.mergere.com/maven2)
=========================


Sasha O wrote:
> Wayne, thanks for your reply.
> 
> It looks like I have module dependencies set up fine so that 'mvn
> compile' and even 'mvn package' work fine at the top level.
> 
> However 'mvn assembly:assembly' fails:
> 
>  Missing:
> ----------
> 1) mycompany:A:jar:1.0-SNAPSHOT
> 
>   Try downloading the file manually from the project website.
> 
>   Then, install it using the command:
>       mvn install:install-file -DgroupId=mycompany -DartifactId=A \
>           -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
> 
>   Path to dependency:
>         1) mycompany:B:jar:1.0-SNAPSHOT
>         2) mycompany:A:jar:1.0-SNAPSHOT
> 
> Any ideas?
> 
> Thanks
> 
> Wayne Fay wrote:
>> Yes. Build from a shared parent directory with proper <modules>
>> defined in the parent pom -- ie parent\modA, parent\modB (depends on
>> A); run "mvn compile" from parent directory.
>>
>> Otherwise, you'll need to install the modules you have as dependencies.
>>
>> Wayne
>>
>> On 3/8/07, Sasha O <vi...@codebistro.com> wrote:
>>> Dear All,
>>>
>>> My project consists of several interdependent modules. Module B depends
>>> on module A.
>>>
>>> When I am trying to build module B Maven complains that the module A was
>>> not found in the local repository. I would expect Maven to be able to
>>> figure this out automatically -- this is what dependency management is
>>> all about, right?
>>>
>>> Is there a way to build dependencies automatically without requiring me
>>> to 'mvn install' them?
>>>
>>> Thank you,
>>> Sasha
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multi-module project: assembly is not picking up dependencies

Posted by Sasha O <vi...@codebistro.com>.
Wayne, thanks for your reply.

It looks like I have module dependencies set up fine so that 'mvn
compile' and even 'mvn package' work fine at the top level.

However 'mvn assembly:assembly' fails:

 Missing:
----------
1) mycompany:A:jar:1.0-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=mycompany -DartifactId=A \
          -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency:
        1) mycompany:B:jar:1.0-SNAPSHOT
        2) mycompany:A:jar:1.0-SNAPSHOT

Any ideas?

Thanks

Wayne Fay wrote:
> Yes. Build from a shared parent directory with proper <modules>
> defined in the parent pom -- ie parent\modA, parent\modB (depends on
> A); run "mvn compile" from parent directory.
> 
> Otherwise, you'll need to install the modules you have as dependencies.
> 
> Wayne
> 
> On 3/8/07, Sasha O <vi...@codebistro.com> wrote:
>> Dear All,
>>
>> My project consists of several interdependent modules. Module B depends
>> on module A.
>>
>> When I am trying to build module B Maven complains that the module A was
>> not found in the local repository. I would expect Maven to be able to
>> figure this out automatically -- this is what dependency management is
>> all about, right?
>>
>> Is there a way to build dependencies automatically without requiring me
>> to 'mvn install' them?
>>
>> Thank you,
>> Sasha
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multi-module project: pick up dependencies?

Posted by Wayne Fay <wa...@gmail.com>.
Yes. Build from a shared parent directory with proper <modules>
defined in the parent pom -- ie parent\modA, parent\modB (depends on
A); run "mvn compile" from parent directory.

Otherwise, you'll need to install the modules you have as dependencies.

Wayne

On 3/8/07, Sasha O <vi...@codebistro.com> wrote:
> Dear All,
>
> My project consists of several interdependent modules. Module B depends
> on module A.
>
> When I am trying to build module B Maven complains that the module A was
> not found in the local repository. I would expect Maven to be able to
> figure this out automatically -- this is what dependency management is
> all about, right?
>
> Is there a way to build dependencies automatically without requiring me
> to 'mvn install' them?
>
> Thank you,
> Sasha
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org