Package org.apache.maven.artifact.versioning

Examples of org.apache.maven.artifact.versioning.VersionRange.containsVersion()


  private void checkVersion(String artifactName, String versionSpec, Artifact artifact)
      throws MojoExecutionException {
    VersionRange range;
    try {
      range = VersionRange.createFromVersionSpec(versionSpec);
      if (!range.containsVersion(new DefaultArtifactVersion(artifact.getVersion())))
      {
          throw new MojoExecutionException(
              "JUnit4 plugin requires " + artifactName + " in version " +
              versionSpec + " among project dependencies, you declared: "
                  + artifact.getVersion());
View Full Code Here


        return StringUtils.equals(projectArtifact.getGroupId(), artifact.getGroupId()) &&
            StringUtils.equals(projectArtifact.getArtifactId(), artifact.getArtifactId()) &&
            StringUtils.equals(StringUtils.defaultIfEmpty(projectArtifact.getType(), "jar"), StringUtils.defaultIfEmpty(artifact.getType(), "jar")) &&
            StringUtils.equals(projectArtifact.getClassifier(), artifact.getClassifier()) &&
            (versionRange != null && versionRange.containsVersion(version) || artifact.getVersion().equals(projectArtifact.getVersion()));
    }

    public boolean containsClass(final String className)
    {
        if (classes.contains(className)) {
View Full Code Here

  private void checkVersion(String artifactName, String versionSpec, Artifact artifact)
      throws MojoExecutionException {
    VersionRange range;
    try {
      range = VersionRange.createFromVersionSpec(versionSpec);
      if (!range.containsVersion(new DefaultArtifactVersion(artifact.getVersion())))
      {
          throw new MojoExecutionException(
              "JUnit4 plugin requires " + artifactName + " in version " +
              versionSpec + " among project dependencies, you declared: "
                  + artifact.getVersion());
View Full Code Here

  private void checkVersion(String artifactName, String versionSpec, Artifact artifact)
      throws MojoExecutionException {
    VersionRange range;
    try {
      range = VersionRange.createFromVersionSpec(versionSpec);
      if (!range.containsVersion(new DefaultArtifactVersion(artifact.getVersion())))
      {
          throw new MojoExecutionException(
              "JUnit4 plugin requires " + artifactName + " in version " +
              versionSpec + " among project dependencies, you declared: "
                  + artifact.getVersion());
View Full Code Here

  private void checkVersion(String artifactName, String versionSpec, Artifact artifact)
      throws MojoExecutionException {
    VersionRange range;
    try {
      range = VersionRange.createFromVersionSpec(versionSpec);
      if (!range.containsVersion(new DefaultArtifactVersion(artifact.getVersion())))
      {
          throw new MojoExecutionException(
              "JUnit4 plugin requires " + artifactName + " in version " +
              versionSpec + " among project dependencies, you declared: "
                  + artifact.getVersion());
View Full Code Here

  private void checkVersion(String artifactName, String versionSpec, Artifact artifact)
      throws MojoExecutionException {
    VersionRange range;
    try {
      range = VersionRange.createFromVersionSpec(versionSpec);
      if (!range.containsVersion(new DefaultArtifactVersion(artifact.getVersion())))
      {
          throw new MojoExecutionException(
              "JUnit4 plugin requires " + artifactName + " in version " +
              versionSpec + " among project dependencies, you declared: "
                  + artifact.getVersion());
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.