You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rodrigo Ruiz <rr...@gridsystems.com> on 2007/01/31 14:30:55 UTC

[M2] Siblilng dependencies not found when building a multi-module project

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I am working in a rather large multi-module project in which several
modules depend on sibling and parent artifacts (within the same project).

Using Maven 2.0.4, if I try to compile / package / install / deploy the
whole project with a clean local repository (e.g. the first time I do a
checkout), the process fails at compile time because it does not find
any installed artifact in the local repository.

Is this a reported bug? I haven't found any related JIRA report.

My guess is that the Maven dependency resolution system is not including
the generated artifacts once they have been built. Is there any way to
achieve this?

Even with "mvn install", it tries to compile all modules before
packaging or installing them, thus failing when it finds the first
module with "internal" dependencies.

Thanks in advance,
Rodrigo Ruiz

- --
- -------------------------------------------------------------------
GRID SYSTEMS, S.A.             Rodrigo Ruiz
Parc Bit - Edificio 17         Research Coordinator
07121 Palma de Mallorca
Baleares - Spain
http://www.gridsystems.com/
- -------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)

iD8DBQFFwJoPp9m/F5UenDoRAqeiAJ4nRwI8/2QB2qipXobWAdxPWJt8iwCeMXOr
mnoHAh6oZIuEu1X0pTt+ICs=
=1Neo
-----END PGP SIGNATURE-----

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


Re: [M2] Siblilng dependencies not found when building a multi-module project

Posted by Rodrigo Ruiz <rr...@gridsystems.com>.
Thank you very much! It works like a charm :-)

Best regards,
Rodrigo Ruiz

Jörg Schaible wrote:
> Hi Rodrigo,
> 
> Rodrigo Ruiz wrote:
> 
>> Hi Wayne, thanks for your prompt response :-)
>>
>> I have tried to create a simple testcase for my problem, and I have
>> discovered that the problem is not where I thought it was :-P
>>
>> The problem is not in the compilation step. The problem appears with
>> 'mvn assembly:assembly', and I have found it in my project because the
>> assemblies are created as part of the package phase:
>>
>>  <plugin>
>>    <artifactId>maven-assembly-plugin</artifactId>
>>    <executions>
>>      <execution>
>>        <id>make-assembly</id>
>>        <phase>package</phase>
>>        <goals>
>>          <goal>attached</goal>
>>        </goals>
>>      </execution>
>>    </executions>
>>    <configuration>
>>      <descriptors>
>>        <descriptor>${basedir}/src/main/assembly/bin.xml</descriptor>
>>        <descriptor>${basedir}/src/main/assembly/src.xml</descriptor>
>>      </descriptors>
>>    </configuration>
>>  </plugin>
>>
>> My intention with this configuration was to ensure that the assemblies
>> are installed whenever I invoke "mvn install" or "mvn deploy".
>>
>> Should I use a different phase for this?
> 
> Use goal "single", "attached" confuses multi-module builds.
> 
> - Jörg
> 
> 

-- 
-------------------------------------------------------------------
GRID SYSTEMS, S.A.             Rodrigo Ruiz
Parc Bit - Edificio 17         Research Coordinator
07121 Palma de Mallorca        rruiz@gridsystems.com
Baleares - Spain               Tel: +34 971 435 085
http://www.gridsystems.com/    Fax: +34 971 435 082
-------------------------------------------------------------------

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


Re: [M2] Siblilng dependencies not found when building a multi-module project

Posted by Jörg Schaible <jo...@gmx.de>.
Hi Rodrigo,

Rodrigo Ruiz wrote:

> Hi Wayne, thanks for your prompt response :-)
> 
> I have tried to create a simple testcase for my problem, and I have
> discovered that the problem is not where I thought it was :-P
> 
> The problem is not in the compilation step. The problem appears with
> 'mvn assembly:assembly', and I have found it in my project because the
> assemblies are created as part of the package phase:
> 
>  <plugin>
>    <artifactId>maven-assembly-plugin</artifactId>
>    <executions>
>      <execution>
>        <id>make-assembly</id>
>        <phase>package</phase>
>        <goals>
>          <goal>attached</goal>
>        </goals>
>      </execution>
>    </executions>
>    <configuration>
>      <descriptors>
>        <descriptor>${basedir}/src/main/assembly/bin.xml</descriptor>
>        <descriptor>${basedir}/src/main/assembly/src.xml</descriptor>
>      </descriptors>
>    </configuration>
>  </plugin>
> 
> My intention with this configuration was to ensure that the assemblies
> are installed whenever I invoke "mvn install" or "mvn deploy".
> 
> Should I use a different phase for this?

Use goal "single", "attached" confuses multi-module builds.

- Jörg


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


Re: [M2] Siblilng dependencies not found when building a multi-module project

Posted by Rodrigo Ruiz <rr...@gridsystems.com>.
Hi Wayne, thanks for your prompt response :-)

I have tried to create a simple testcase for my problem, and I have
discovered that the problem is not where I thought it was :-P

The problem is not in the compilation step. The problem appears with
'mvn assembly:assembly', and I have found it in my project because the
assemblies are created as part of the package phase:

 <plugin>
   <artifactId>maven-assembly-plugin</artifactId>
   <executions>
     <execution>
       <id>make-assembly</id>
       <phase>package</phase>
       <goals>
         <goal>attached</goal>
       </goals>
     </execution>
   </executions>
   <configuration>
     <descriptors>
       <descriptor>${basedir}/src/main/assembly/bin.xml</descriptor>
       <descriptor>${basedir}/src/main/assembly/src.xml</descriptor>
     </descriptors>
   </configuration>
 </plugin>

My intention with this configuration was to ensure that the assemblies
are installed whenever I invoke "mvn install" or "mvn deploy".

Should I use a different phase for this?

Regards,
Rodrigo

Wayne Fay wrote:
> Assuming all your <parent>, <module>, and <dependency> tags are
> properly defined, the reactor should be able to figure out the proper
> order to build your modules to avoid problems.
> 
> I'd suspect something is wrong in one (or more) of your pom files, as
> I have never seen this myself and I know there are numerous tests etc
> in the Maven2 code which were created to avoid these problems.
> 
> If you decide that you certainly have a bug and can demonstrate it
> with a few small files, please open a JIRA bug report and attach a zip
> with the pom.xml files etc.
> 
> Wayne
> 
> On 1/31/07, Rodrigo Ruiz <rr...@gridsystems.com> wrote:
> Hi all,
> 
> I am working in a rather large multi-module project in which several
> modules depend on sibling and parent artifacts (within the same project).
> 
> Using Maven 2.0.4, if I try to compile / package / install / deploy the
> whole project with a clean local repository (e.g. the first time I do a
> checkout), the process fails at compile time because it does not find
> any installed artifact in the local repository.
> 
> Is this a reported bug? I haven't found any related JIRA report.
> 
> My guess is that the Maven dependency resolution system is not including
> the generated artifacts once they have been built. Is there any way to
> achieve this?
> 
> Even with "mvn install", it tries to compile all modules before
> packaging or installing them, thus failing when it finds the first
> module with "internal" dependencies.
> 
> Thanks in advance,
> Rodrigo Ruiz
> 
>>
---------------------------------------------------------------------
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


-- 
-------------------------------------------------------------------
GRID SYSTEMS, S.A.             Rodrigo Ruiz
Parc Bit - Edificio 17         Research Coordinator
07121 Palma de Mallorca        rruiz@gridsystems.com
Baleares - Spain               Tel: +34 971 435 085
http://www.gridsystems.com/    Fax: +34 971 435 082
-------------------------------------------------------------------

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


Re: [M2] Siblilng dependencies not found when building a multi-module project

Posted by Wayne Fay <wa...@gmail.com>.
Assuming all your <parent>, <module>, and <dependency> tags are
properly defined, the reactor should be able to figure out the proper
order to build your modules to avoid problems.

I'd suspect something is wrong in one (or more) of your pom files, as
I have never seen this myself and I know there are numerous tests etc
in the Maven2 code which were created to avoid these problems.

If you decide that you certainly have a bug and can demonstrate it
with a few small files, please open a JIRA bug report and attach a zip
with the pom.xml files etc.

Wayne

On 1/31/07, Rodrigo Ruiz <rr...@gridsystems.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> I am working in a rather large multi-module project in which several
> modules depend on sibling and parent artifacts (within the same project).
>
> Using Maven 2.0.4, if I try to compile / package / install / deploy the
> whole project with a clean local repository (e.g. the first time I do a
> checkout), the process fails at compile time because it does not find
> any installed artifact in the local repository.
>
> Is this a reported bug? I haven't found any related JIRA report.
>
> My guess is that the Maven dependency resolution system is not including
> the generated artifacts once they have been built. Is there any way to
> achieve this?
>
> Even with "mvn install", it tries to compile all modules before
> packaging or installing them, thus failing when it finds the first
> module with "internal" dependencies.
>
> Thanks in advance,
> Rodrigo Ruiz
>
> - --
> - -------------------------------------------------------------------
> GRID SYSTEMS, S.A.             Rodrigo Ruiz
> Parc Bit - Edificio 17         Research Coordinator
> 07121 Palma de Mallorca
> Baleares - Spain
> http://www.gridsystems.com/
> - -------------------------------------------------------------------
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.4 (MingW32)
>
> iD8DBQFFwJoPp9m/F5UenDoRAqeiAJ4nRwI8/2QB2qipXobWAdxPWJt8iwCeMXOr
> mnoHAh6oZIuEu1X0pTt+ICs=
> =1Neo
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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