Examples of ArtifactVersion


Examples of org.apache.maven.artifact.versioning.ArtifactVersion

      validateMissingBuildtimeArtifact();
      return;
    }

    // otherwise, lets make sure they match...
    ArtifactVersion projectAntlrVersion = determineArtifactVersion( antlrArtifact );
    if ( pluginAntlrVersion.compareTo( projectAntlrVersion ) != 0 ) {
      getLog().warn(
          "Encountered " + ANTLR_GROUP_ID + ':' + ANTLR_ARTIFACT_NAME + ':' + projectAntlrVersion.toString() +
              " which did not match Antlr version used by plugin [" + pluginAntlrVersion.toString() + "]"
      );
    }
  }
View Full Code Here

Examples of org.apache.maven.artifact.versioning.ArtifactVersion

    if ( antlrRuntimeArtifact == null ) {
      // its possible, if the project instead depends on the build-time (or full) artifact.
      return;
    }

    ArtifactVersion projectAntlrVersion = determineArtifactVersion( antlrRuntimeArtifact );
    if ( pluginAntlrVersion.compareTo( projectAntlrVersion ) != 0 ) {
      getLog().warn(
          "Encountered " + ANTLR_GROUP_ID + ':' + ANTLR_RUNTIME_ARTIFACT_NAME + ':' + projectAntlrVersion.toString() +
              " which did not match Antlr version used by plugin [" + pluginAntlrVersion.toString() + "]"
      );
    }
  }
View Full Code Here

Examples of org.apache.maven.artifact.versioning.ArtifactVersion

     */
    public void execute()
        throws MojoExecutionException, MojoFailureException
    {

        ArtifactVersion detectedMavenVersion = rti.getApplicationVersion();
        VersionRange vr;
        try
        {
            vr = VersionRange.createFromVersionSpec( "[2.0.8,)" );
            if ( !containsVersion( vr, detectedMavenVersion ) )
View Full Code Here

Examples of org.apache.maven.artifact.versioning.ArtifactVersion

     * @param theVersion the version to be checked.
     * @return true if the version is contained by the range.
     */
    public static boolean containsVersion( VersionRange allowedRange, ArtifactVersion theVersion )
    {
        ArtifactVersion recommendedVersion = allowedRange.getRecommendedVersion();
        if ( recommendedVersion == null )
        {
            List<Restriction> restrictions = allowedRange.getRestrictions();
            for ( Restriction restriction : restrictions )
            {
                if ( restriction.containsVersion( theVersion ) )
                {
                    return true;
                }
            }
        }

        // only singular versions ever have a recommendedVersion
        return recommendedVersion.compareTo( theVersion ) <= 0;
    }
View Full Code Here

Examples of org.moxie.ArtifactVersion

    assertNull(CHECK_VERSION_RECOMMENDATION, range.getRecommendedVersion());
    assertFalse(CHECK_SELECTED_VERSION_KNOWN, range.isSelectedVersionKnown(artifact));
    assertNull(CHECK_SELECTED_VERSION, range.getSelectedVersion(artifact));

    range = VersionRange.createFromVersionSpec("[1.0,)");
    assertFalse(range.containsVersion(new ArtifactVersion("1.0-SNAPSHOT")));

    range = VersionRange.createFromVersionSpec("[1.0,1.1-SNAPSHOT]");
    assertTrue(range.containsVersion(new ArtifactVersion("1.1-SNAPSHOT")));

    range = VersionRange.createFromVersionSpec("[5.0.9.0,5.0.10.0)");
    assertTrue(range.containsVersion(new ArtifactVersion("5.0.9.0")));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.