You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by cowwoc <co...@bbs.darktech.org> on 2011/04/22 19:27:20 UTC

How to resolve Artifacts in Maven 3?

Hi,

How do I resolve an artifact's path in the local repository in Maven 3?

In Maven 2 you could use ArtifactResolver to populate an Artifact object
with the relevant information, but this class has been deprecated in Maven
3.

Thanks,
Gili

--
View this message in context: http://maven.40175.n5.nabble.com/How-to-resolve-Artifacts-in-Maven-3-tp4333452p4333452.html
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: How to resolve Artifacts in Maven 3?

Posted by Yegor Bugayenko <eg...@technoparkcorp.com>.
Hi Karl,

Take a look at this plugin:
http://trac.fazend.com/rempl/browser/rempl/trunk/rempl/rempl-plugins/rempl-maven-plugin?rev=1243

What you need is src/main/java/com/rempl/maven/MavenResolver.java. This
class converts maven coordinates into a collection of JAR files. Pay
attention that some of the "JAR"s found will be directories, not files.

This MavenResolver class is instantiated in AbstractRemplMojo#resolver().

Besides that, the plugin includes unit tests. Let me know if any other
information is required.

—
Yegor Bugayenko



On Sat, Apr 23, 2011 at 7:13 PM, Karl Heinz Marbaise <kh...@gmx.de>wrote:

> Hi
>
>
>  Even if it's a plugin - Aether will work perfectly. If interested, I can
>> give a link to a real-life example that works with Aether in Maven 3.
>>
> Would be great if you can.
>
> Kind regards
> Karl Heinz Marbaise
> --
> SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
> Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
> Hauptstrasse 177                         USt.IdNr: DE191347579
> 52146 Würselen                           http://www.soebes.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: How to resolve Artifacts in Maven 3?

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi

> Even if it's a plugin - Aether will work perfectly. If interested, I can
> give a link to a real-life example that works with Aether in Maven 3.
Would be great if you can.

Kind regards
Karl Heinz Marbaise
-- 
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
Hauptstrasse 177                         USt.IdNr: DE191347579
52146 Würselen                           http://www.soebes.de

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


Re: How to resolve Artifacts in Maven 3?

Posted by Yegor Bugayenko <eg...@technoparkcorp.com>.
Even if it's a plugin - Aether will work perfectly. If interested, I can
give a link to a real-life example that works with Aether in Maven 3.

—
Yegor Bugayenko


On Sat, Apr 23, 2011 at 12:45 PM, Karl Heinz Marbaise <kh...@gmx.de>wrote:

> Hi,
>
>  How do I resolve an artifact's path in the local repository in Maven 3?
>>
>> In Maven 2 you could use ArtifactResolver to populate an Artifact object
>> with the relevant information, but this class has been deprecated in Maven
>> 3.
>>
> It's marked as deprecated but you can use it. Is this a Plugin which you
> are developing? If not you could take a look at Aether ...
>
> Kind regards
> Karl Heinz Marbaise
> --
> SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
> Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
> Hauptstrasse 177                         USt.IdNr: DE191347579
> 52146 Würselen                           http://www.soebes.de
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: How to resolve Artifacts in Maven 3?

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,

> How do I resolve an artifact's path in the local repository in Maven 3?
>
> In Maven 2 you could use ArtifactResolver to populate an Artifact object
> with the relevant information, but this class has been deprecated in Maven
> 3.
It's marked as deprecated but you can use it. Is this a Plugin which you 
are developing? If not you could take a look at Aether ...

Kind regards
Karl Heinz Marbaise
-- 
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
Hauptstrasse 177                         USt.IdNr: DE191347579
52146 Würselen                           http://www.soebes.de

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