You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Insitu <ab...@oqube.com> on 2007/10/05 09:59:16 UTC
Working with maven embedder
Hello,
I am currently working on wrapping maven within another program, so I
am using maven-embedder (2.0.4) and I did some evil hacks for
resolving repositories:
MavenEmbedder maven...
Field em = maven.getClass().getDeclaredField("embedder");
em.setAccessible(true);
PlexusContainer cont = ((Embedder)em.get(maven)).getContainer();
return (List<ArtifactRepository>)
ProjectUtils.buildArtifactRepositories(
project.getRepositories(), new
DefaultArtifactRepositoryFactory(),
cont);
The maven-embedder in trunk seems much more user-friendly. So my
question is: Is it normal in the current state of affair that I should
need this king of hack ?
Regards,
--
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Working with maven embedder
Posted by Jason van Zyl <ja...@maven.org>.
On 5 Oct 07, at 12:59 AM 5 Oct 07, Insitu wrote:
> Hello,
> I am currently working on wrapping maven within another program, so I
> am using maven-embedder (2.0.4) and I did some evil hacks for
> resolving repositories:
>
> MavenEmbedder maven...
> Field em = maven.getClass().getDeclaredField("embedder");
> em.setAccessible(true);
> PlexusContainer cont = ((Embedder)em.get(maven)).getContainer();
> return (List<ArtifactRepository>)
> ProjectUtils.buildArtifactRepositories(
> project.getRepositories(), new
> DefaultArtifactRepositoryFactory(),
> cont);
>
> The maven-embedder in trunk seems much more user-friendly. So my
> question is: Is it normal in the current state of affair that I should
> need this king of hack ?
>
There is no workable embedder in the 2.0.x. I only work on the
embedder in the trunk and that's what all the IDE integration uses.
> Regards,
> --
> OQube < software engineering \ génie logiciel >
> Arnaud Bailly, Dr.
> \web> http://www.oqube.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org