You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Martin Höller <ma...@xss.co.at> on 2008/02/01 09:22:07 UTC

maven-eclipse-plugin with multi-module projects

Hi all!

I have an issue with the m-eclipse-p and a multi-module prject. The scenario 
is as follows:

Parent Project P
|
+-- Project A
|
 `- Project B 

B has a dependency on A (B requires A).

A user with an empty local repository cannot checkout the whole project and 
run 'mvn eclipse:eclipse' due to unsatisfied dependencies. The build will 
fail in Project B because Project A is missing from the repository.

A 'mvn install' has to be executed before (at least for Project A). But what 
if the project is in a state where it doesn't compile? It's not possible in 
this case for a new user to start developing with eclipse.

Am I missing something here?
Is there an oportunity to tell maven to skip dependency checking?

regards,
- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: maven-eclipse-plugin with multi-module projects

Posted by Martin Höller <ma...@xss.co.at>.
On Friday 01 February 2008 wrote Arnaud HERITIER:
> We (the dev team) know this annoying bug but we don't have yet found a
> fix. I'm not sure we'll be able to fix it for 2.5. Nicolas ?

Thanks for clarifying this Arnaud.

> I'm not sure that there's an issue opened for it. If you can check.

I didn't find one, so I create MECLIPSE-380.

- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: maven-eclipse-plugin with multi-module projects

Posted by Arnaud HERITIER <ah...@gmail.com>.
We (the dev team) know this annoying bug but we don't have yet found a fix.
I'm not sure we'll be able to fix it for 2.5. Nicolas ?

I'm not sure that there's an issue opened for it. If you can check.

Arnaud

On Feb 1, 2008 9:22 AM, Martin Höller <ma...@xss.co.at> wrote:

> Hi all!
>
> I have an issue with the m-eclipse-p and a multi-module prject. The
> scenario
> is as follows:
>
> Parent Project P
> |
> +-- Project A
> |
>  `- Project B
>
> B has a dependency on A (B requires A).
>
> A user with an empty local repository cannot checkout the whole project
> and
> run 'mvn eclipse:eclipse' due to unsatisfied dependencies. The build will
> fail in Project B because Project A is missing from the repository.
>
> A 'mvn install' has to be executed before (at least for Project A). But
> what
> if the project is in a state where it doesn't compile? It's not possible
> in
> this case for a new user to start developing with eclipse.
>
> Am I missing something here?
> Is there an oportunity to tell maven to skip dependency checking?
>
> regards,
> - martin
> --
> Martin Höller                   | martin.hoeller@xss.co.at
> *x Software + Systeme           | http://www.xss.co.at/
> Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
> A-1100 Vienna, Austria          | Fax: +43-1-6060114-71
>



-- 
..........................................................
Arnaud HERITIER
..........................................................
OCTO Technology - aheritier AT octo DOT com
www.octo.com | blog.octo.com
..........................................................
ASF - aheritier AT apache DOT org
www.apache.org | maven.apache.org
...........................................................

Re: maven-eclipse-plugin with multi-module projects

Posted by Martin Höller <ma...@xss.co.at>.
On Friday 01 February 2008 wrote Siarhei Dudzin:
> > You may be right on this one. However, if you have a much bigger
> > project, you force a new developer to perform a build (which might take
> > a long time)
> > before he can start developing.
>
> I understand now. Would publishing snapshots to your own remote
> repository work? You could then only generate projects for the submodules
> and the projects would have jar dependencies instead of project
> dependencies, or is the whole project was never built?

Well, I'm not currently in the situation of having this problem. I just 
stumbled across it and found this a limitation of the m-eclipse-p. But as 
Arnaud wrote, it's an already known problem.

Thanks for your hints anyway.

- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: maven-eclipse-plugin with multi-module projects

Posted by Siarhei Dudzin <si...@gmail.com>.
>
> You may be right on this one. However, if you have a much bigger project,
> you force a new developer to perform a build (which might take a long
> time)
> before he can start developing.


I understand now. Would publishing snapshots to your own remote repository
work? You could then only generate projects for the submodules and the
projects would have jar dependencies instead of project dependencies, or is
the whole project was never built?

But I agree it is somewhat a limitation...

> Anyway try mvn process-resources, this seems to run just before
> > compilation begins and should resolve dependencies.
>
> I think you didn't understand me completely. Dependency resolution is not
> possible because the required artifact is just not in the repository.
> Processing resources doesn't help me here in any way.
>

Indeed, I didn't get it at first :) As I said before would it work if you
use snapshot jars deployed to remote repository?

Siarhei

Re: maven-eclipse-plugin with multi-module projects

Posted by Martin Höller <ma...@xss.co.at>.
On Friday 01 February 2008 wrote Siarhei Dudzin:
> Not sure, we always perform dependency resolution before generating
> project files. Besides if the project doesn't compile in the version
> control this often means you have much bigger problem. :)

You may be right on this one. However, if you have a much bigger project, 
you force a new developer to perform a build (which might take a long time) 
before he can start developing.

> Anyway try mvn process-resources, this seems to run just before
> compilation begins and should resolve dependencies.

I think you didn't understand me completely. Dependency resolution is not 
possible because the required artifact is just not in the repository. 
Processing resources doesn't help me here in any way.

thanks anyway,
- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: maven-eclipse-plugin with multi-module projects

Posted by Siarhei Dudzin <si...@gmail.com>.
Not sure, we always perform dependency resolution before generating project
files. Besides if the project doesn't compile in the version control this
often means you have much bigger problem. :)

Anyway try mvn process-resources, this seems to run just before compilation
begins and should resolve dependencies.

For more details see the manual:
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference

On Feb 1, 2008 9:22 AM, Martin Höller <ma...@xss.co.at> wrote:

> Hi all!
>
> I have an issue with the m-eclipse-p and a multi-module prject. The
> scenario
> is as follows:
>
> Parent Project P
> |
> +-- Project A
> |
>  `- Project B
>
> B has a dependency on A (B requires A).
>
> A user with an empty local repository cannot checkout the whole project
> and
> run 'mvn eclipse:eclipse' due to unsatisfied dependencies. The build will
> fail in Project B because Project A is missing from the repository.
>
> A 'mvn install' has to be executed before (at least for Project A). But
> what
> if the project is in a state where it doesn't compile? It's not possible
> in
> this case for a new user to start developing with eclipse.
>
> Am I missing something here?
> Is there an oportunity to tell maven to skip dependency checking?
>
> regards,
> - martin
> --
> Martin Höller                   | martin.hoeller@xss.co.at
> *x Software + Systeme           | http://www.xss.co.at/
> Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
> A-1100 Vienna, Austria          | Fax: +43-1-6060114-71
>