You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Barrie Treloar <ba...@gmail.com> on 2015/08/17 10:19:28 UTC

single string GAV exploding as a utility method somewhere in Maven?

Is there somewhere in the Maven code that we handle a single string as a
GAV that can get exploded correctly for Artifact resolving?

The dependency:get does it manually, and I'm loathe to copy-and-paste.

Re: single string GAV exploding as a utility method somewhere in Maven?

Posted by Jason van Zyl <ja...@takari.io>.
In Aether in DefaultArtifact the constructor contains the regex used for parsing. You can use that directly if you’re using Aether to resolve, or if you’re using the Maven APIs you can convert the Aether artifact to a Maven artifact using RepositoryUtils.toArtifact() in maven-core.

> On Aug 17, 2015, at 4:19 AM, Barrie Treloar <ba...@gmail.com> wrote:
> 
> Is there somewhere in the Maven code that we handle a single string as a
> GAV that can get exploded correctly for Artifact resolving?
> 
> The dependency:get does it manually, and I'm loathe to copy-and-paste.

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
---------------------------------------------------------

First, the taking in of scattered particulars under one Idea,
so that everyone understands what is being talked about ... Second,
the separation of the Idea into parts, by dividing it at the joints,
as nature directs, not breaking any limb in half as a bad carver might.

  -- Plato, Phaedrus (Notes on the Synthesis of Form by C. Alexander)













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