[
https://issues.jboss.org/browse/SHRINKWRAP-261?page=com.atlassian.jira.pl...
]
Karel Piwko commented on SHRINKWRAP-261:
----------------------------------------
Could we make something like?
{code}
class Maven {
public static final GenericArchive artifact(String coords) {
return new MavenResolver().artifact(coords);
}
public static final Collection<GenericArchive> artifacts(String...coords) {
return new MavenResolver().artifact(coords);
}
public static MavenResolver withPom(URL pom) {
return new MavenResolver(pom);
}
public static MavenResolver withPom(String pom) {
return new MavenResolver(pom);
}
}
class MavenResolver {
// state & constructors
public GenericArchive artifact(String coords) {...}
public Collection<GenericArchive> artifacts(String coords) {...}
// more settings method available here, such as SHRINKWRAP-282 evolves
}
{code}
preferably MavenResolver with package-hidden constructors so user can't use it
directly.
Shorthand for including maven artifacts
---------------------------------------
Key: SHRINKWRAP-261
URL:
https://issues.jboss.org/browse/SHRINKWRAP-261
Project: ShrinkWrap
Issue Type: Feature Request
Components: ext-resolver
Affects Versions: 1.0.0-alpha-12
Reporter: Nicklas Karlsson
Assignee: Samuel Santos
Priority: Minor
It would be handy to have a shortcut for including maven artifacts, something along the
lines of
MavenArtifact.resolve(Coordinate.of("joda-time", "joda-time",
"1.6")).as(GenericArchive.class) or
MavenArtifact.resolve("joda-time:joda-time:1.6").as(GenericArchive.class) or
Maven.artifact("joda-time:joda-time:1.6")
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira