You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Yegor Bugayenko <eg...@technoparkcorp.com> on 2011/03/14 09:21:48 UTC
can I use Maven repository manager outside of Maven?
I'm trying to create an application that will download and use Maven
artifacts outside of Maven. I think that in this case the smartest way would
be to use Maven already existing classes. Can anyone help me with a hint
where to look for?
Would be nice to make it working this way:
Repository rep = new Repository("~/.m2");
Artifact artifact = new Artifact("com.example", "foo", "1.0");
String path = rep.resolve(artifact);
assert path.equals("~/.m2/repository/com/example/foo/1.0/foo.jar");
Thanks!
—
Yegor Bugayenko
Re: can I use Maven repository manager outside of Maven?
Posted by Yegor Bugayenko <eg...@technoparkcorp.com>.
Thanks Anders, that's exactly what I was looking for!
—
Yegor Bugayenko
On Mon, Mar 14, 2011 at 10:36 AM, Anders Hammar <an...@hammar.net> wrote:
> I think you should have a look at Aether, which is the repository API which
> Maven 3 uses for artifact handling.
> [1] is probably a good place to start.
>
> /Anders
>
> [1] http://aether.sonatype.org/
>
> On Mon, Mar 14, 2011 at 09:21, Yegor Bugayenko <eg...@technoparkcorp.com>wrote:
>
>> I'm trying to create an application that will download and use Maven
>> artifacts outside of Maven. I think that in this case the smartest way
>> would
>> be to use Maven already existing classes. Can anyone help me with a hint
>> where to look for?
>>
>> Would be nice to make it working this way:
>>
>> Repository rep = new Repository("~/.m2");
>> Artifact artifact = new Artifact("com.example", "foo", "1.0");
>> String path = rep.resolve(artifact);
>> assert path.equals("~/.m2/repository/com/example/foo/1.0/foo.jar");
>>
>> Thanks!
>>
>> —
>> Yegor Bugayenko
>>
>
>
Re: can I use Maven repository manager outside of Maven?
Posted by Anders Hammar <an...@hammar.net>.
I think you should have a look at Aether, which is the repository API which
Maven 3 uses for artifact handling.
[1] is probably a good place to start.
/Anders
[1] http://aether.sonatype.org/
On Mon, Mar 14, 2011 at 09:21, Yegor Bugayenko <eg...@technoparkcorp.com>wrote:
> I'm trying to create an application that will download and use Maven
> artifacts outside of Maven. I think that in this case the smartest way
> would
> be to use Maven already existing classes. Can anyone help me with a hint
> where to look for?
>
> Would be nice to make it working this way:
>
> Repository rep = new Repository("~/.m2");
> Artifact artifact = new Artifact("com.example", "foo", "1.0");
> String path = rep.resolve(artifact);
> assert path.equals("~/.m2/repository/com/example/foo/1.0/foo.jar");
>
> Thanks!
>
> —
> Yegor Bugayenko
>