本文整理了Java中org.eclipse.aether.version.Version.toString()
方法的一些代码示例,展示了Version.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.toString()
方法的具体详情如下:
包路径:org.eclipse.aether.version.Version
类名称:Version
方法名:toString
[英]Gets the original string representation of the version.
[中]获取版本的原始字符串表示形式。
代码示例来源:origin: apache/maven
dependency.setVersion( versionRangeResult.getHighestVersion().toString() );
代码示例来源:origin: apache/maven
dependency.setVersion( versionRangeResult.getHighestVersion().toString() );
代码示例来源:origin: apache/maven
String ver = v.toString();
if ( isCompatible( request, ver ) )
String ver = v.toString();
if ( isCompatible( request, ver ) )
代码示例来源:origin: opensourceBIM/BIMserver
public String getVersion() {
return version.toString();
}
代码示例来源:origin: apache/maven
parent.setVersion( versionRangeResult.getHighestVersion().toString() );
代码示例来源:origin: apache/maven
parent.setVersion( versionRangeResult.getHighestVersion().toString() );
代码示例来源:origin: apache/maven-release
@Override
public String toString()
{
return this.version.toString();
}
代码示例来源:origin: org.eclipse.aether/aether-test-util
public int compareTo( Version o )
{
return version.compareTo( o.toString() );
}
代码示例来源:origin: opensourceBIM/BIMserver
ArtifactDescriptorRequest descriptorRequest = new ArtifactDescriptorRequest();
Artifact versionArtifact = new DefaultArtifact(groupId, artifactId, "pom", version.toString());
代码示例来源:origin: net.stickycode.plugins/bounds-maven-plugin
private Integer majorVersionPlusOne(Version highestVersion) {
String[] split = highestVersion.toString().split("\\.");
return Integer.valueOf(split[0]) + 1;
}
代码示例来源:origin: org.eclipse.aether/aether-util
public void filterVersions( VersionFilterContext context )
{
for ( Iterator<Version> it = context.iterator(); it.hasNext(); )
{
String version = it.next().toString();
if ( version.endsWith( "SNAPSHOT" ) )
{
it.remove();
}
}
}
代码示例来源:origin: org.apache.maven.resolver/maven-resolver-util
public void filterVersions( VersionFilterContext context )
{
for ( Iterator<Version> it = context.iterator(); it.hasNext(); )
{
String version = it.next().toString();
if ( version.endsWith( "SNAPSHOT" ) )
{
it.remove();
}
}
}
代码示例来源:origin: opensourceBIM/BIMserver
ArtifactDescriptorRequest descriptorRequest = new ArtifactDescriptorRequest();
Artifact versionArtifact = new DefaultArtifact(groupId + ":" + artifactId + ":pom:" + version.toString());
代码示例来源:origin: opensourceBIM/BIMserver
private MavenPluginVersion createMavenVersion(Version version) throws ArtifactDescriptorException, FileNotFoundException, IOException, ArtifactResolutionException, XmlPullParserException {
ArtifactDescriptorRequest descriptorRequest = new ArtifactDescriptorRequest();
Artifact versionArtifact = new DefaultArtifact(groupId, artifactId, "pom", version.toString());
代码示例来源:origin: net.stickycode.plugins/bounds-maven-plugin
void extractVersions(Map<String, String> coordinates) throws MojoExecutionException {
for (String library : coordinates.keySet()) {
String range = coordinates.get(library);
Version version = highestVersion(new DefaultArtifact(range));
log("setting %s to %s for %s", library, version, range);
project.getProperties().setProperty(library, version.toString());
}
}
代码示例来源:origin: org.jboss.galleon/galleon-maven-plugin
private static MavenArtifactVersion resolveLatest(VersionRangeResult rangeResult) throws MavenUniverseException {
MavenArtifactVersion latestRelease = null;
for (Version version : rangeResult.getVersions()) {
MavenArtifactVersion next = new MavenArtifactVersion(version.toString());
if (latestRelease == null || next.compareTo(latestRelease) > 0) {
latestRelease = next;
}
}
return latestRelease;
}
代码示例来源:origin: org.jboss.galleon/galleon-maven-plugin
@Override
public List<String> getAllVersions(MavenArtifact mavenArtifact) throws MavenUniverseException {
Artifact artifact = new DefaultArtifact(mavenArtifact.getGroupId(),
mavenArtifact.getArtifactId(), mavenArtifact.getExtension(), mavenArtifact.getVersionRange());
VersionRangeResult rangeResult = getVersionRange(artifact, mavenArtifact.getCoordsAsString());
List<String> versions = new ArrayList<>();
for (Version v : rangeResult.getVersions()) {
versions.add(v.toString());
}
return versions;
}
代码示例来源:origin: org.renjin/renjin-aether-package-loader
private Artifact resolveLatestArtifact(FqPackageName name) throws VersionRangeResolutionException {
Artifact artifact = new DefaultArtifact(name.getGroupId(), name.getPackageName(), "jar", "[0,)");
Version newestVersion = resolveLatestVersion(artifact);
if (newestVersion == null) {
return null;
}
return artifact.setVersion(newestVersion.toString());
}
代码示例来源:origin: org.jboss.shrinkwrap.resolver/shrinkwrap-resolver-impl-maven
private MavenCoordinate getCoordinate(final Version version) {
if(version == null) {
return null;
}
return MavenCoordinates.createCoordinate(artifact.getGroupId(), artifact.getArtifactId(), version.toString(), PackagingType.of(artifact.getExtension()), artifact.getClassifier());
}
代码示例来源:origin: shrinkwrap/resolver
private MavenCoordinate getCoordinate(final Version version) {
if(version == null) {
return null;
}
return MavenCoordinates.createCoordinate(artifact.getGroupId(), artifact.getArtifactId(), version.toString(), PackagingType.of(artifact.getExtension()), artifact.getClassifier());
}
内容来源于网络,如有侵权,请联系作者删除!