You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Saloucious <sa...@gmail.com> on 2007/12/04 17:27:53 UTC

[Unit Testing] Create MavenProject from a File

Hi, 

I would like to know which is the best way to build a MavenProject instance
from a File.

I do not want to use lookupMojo because i don't want to load my mojo but
just unit testing an Util Class.
-- 
View this message in context: http://www.nabble.com/-Unit-Testing--Create-MavenProject-from-a-File-tf4944127s177.html#a14154043
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: [Unit Testing] Create MavenProject from a File

Posted by nicolas de loof <ni...@gmail.com>.
AFAIK the best way is to use MavenProjectBuilder.build( file,
localRepository, null );

I'm not sure if null can be passed for localrepository. It is required to
resolve project inheritence, so MAY be ignored.

Nico.


2007/12/4, Saloucious <sa...@gmail.com>:
>
>
> Hi,
>
> I would like to know which is the best way to build a MavenProject
> instance
> from a File.
>
> I do not want to use lookupMojo because i don't want to load my mojo but
> just unit testing an Util Class.
> --
> View this message in context:
> http://www.nabble.com/-Unit-Testing--Create-MavenProject-from-a-File-tf4944127s177.html#a14154043
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>