本文整理汇总了Java中org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenCoordinate.getClassifier方法的典型用法代码示例。如果您正苦于以下问题:Java MavenCoordinate.getClassifier方法的具体用法?Java MavenCoordinate.getClassifier怎么用?Java MavenCoordinate.getClassifier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenCoordinate
的用法示例。
在下文中一共展示了MavenCoordinate.getClassifier方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMainDownloadInfo
import org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenCoordinate; //导入方法依赖的package包/类
public SuperStringPair getMainDownloadInfo() {
List<StringPair> ls = Lists.newArrayList();
StringPair spair;
String version;
String urlBase = repo.getUrl();
MavenCoordinate mc = resolvedArtifactMain.getCoordinate();
version = resolvedArtifactMain.getResolvedVersion();
spair = new StringPair("main", EntryPoint.getArtifactUrl(urlBase, resolvedArtifactMain));
for (MavenResolvedArtifact ra : resolvedArtifactClassifiers) {
mc = ra.getCoordinate();
String id = mc.getType().getExtension();
if(mc.getClassifier() !=null && !mc.getClassifier().isEmpty()) {
id = mc.getClassifier();
}
ls.add(new StringPair(id, EntryPoint.getArtifactUrl(urlBase, ra)));
}
return new SuperStringPair(version, spair, ls);
}
示例2: getArtifactUrl
import org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenCoordinate; //导入方法依赖的package包/类
public static String getArtifactUrl(String url, MavenResolvedArtifact artifact) {
String resolved = artifact.getResolvedVersion();
MavenCoordinate mc = artifact.getCoordinate();
if (mc.getClassifier() == null || mc.getClassifier().equals("")) {
return url + mc.getGroupId().replace(".", "/") + "/" + mc.getArtifactId().replace(".", "/") + "/" + mc.getVersion() + "/" + mc
.getArtifactId() + "-" + resolved
+ "." + mc.getPackaging().getExtension();
} else {
return url + mc.getGroupId().replace(".", "/") + "/" + mc.getArtifactId().replace(".", "/") + "/" + mc.getVersion() + "/" + mc
.getArtifactId() + "-" + resolved
+ "-" + mc.getClassifier()
+ "." + mc.getPackaging().getExtension();
}
}