You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Mauro Botelho <ma...@gmail.com> on 2005/05/01 02:27:59 UTC

[M2] collectedProjects not set in DefaulMavenProjectBuilder

I am working on the eclipse plugin again, and while trying to run some
tests, I noticed that when running the plugin from the command line I
got the expected behavior, but not when running the unit test.

What I am trying to do is to create a monster eclipse project with all
the modules included, similar to what the idea plug in is doing.

After further examining the code, I noticed that
project.collectedProjects is only set inside the collectProjects
method in the DefaultMaven class, and not anywhere else.

Shouldn't this be done in the DefaultProjectBuilder?

Am I approaching this problem the wrong way?

Mauro

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


Re: [M2] collectedProjects not set in DefaulMavenProjectBuilder

Posted by Brett Porter <br...@apache.org>.
For now, you can set the collected projects in your unit test yourself after
building them all individually.

You are right, though - the proper solution should be to add a new method to the
project builder that will build a project and its declared modules, moving that
functionality from the DefaultMaven code. Thanks for pointing it out - I'll add
it to JIRA.

If you are working on plugins, please ensure you are working with the latest
code from subversion - the plugin API has changed quite a bit so it will save
rework later.

Thanks,
Brett

Quoting Mauro Botelho <ma...@gmail.com>:

> I am working on the eclipse plugin again, and while trying to run some
> tests, I noticed that when running the plugin from the command line I
> got the expected behavior, but not when running the unit test.
> 
> What I am trying to do is to create a monster eclipse project with all
> the modules included, similar to what the idea plug in is doing.
> 
> After further examining the code, I noticed that
> project.collectedProjects is only set inside the collectProjects
> method in the DefaultMaven class, and not anywhere else.
> 
> Shouldn't this be done in the DefaultProjectBuilder?
> 
> Am I approaching this problem the wrong way?
> 
> Mauro
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 




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