Package org.apache.maven.artifact.versioning

Examples of org.apache.maven.artifact.versioning.ComparableVersion$Item


        return version;
    }

    private static String getDefaultServerName(String serverVersion) {
        ComparableVersion comparableVersion = new ComparableVersion(serverVersion);
        return (comparableVersion.compareTo(VERSION_4_2) >= 0) ? ANY_ADDRESS : LOCALHOST_ADDRESS;
    }
View Full Code Here


            if (!dropwizardDependency.isPresent()) {
                log.warn("Failed to find Dropwizard dependency in project. Skipping configuration validation.");
                return;
            }

            final ComparableVersion version = new ComparableVersion(dropwizardDependency.get().getVersion());
            log.info(String.format("Detected Dropwizard %s, attempting to validate configuration.", version));

            final File configFile = new File(resourcesDir, "/files" + path.getConfigFile());
            final ApplicationValidator validator = new ApplicationValidator(artifactFile, log);
            validator.validateConfiguration(configFile);
View Full Code Here

    /**
     * Check the current Maven version to see if it's Maven 3.0 or newer.
     */
    protected static boolean isMaven3OrMore()
    {
        return new ComparableVersion( getMavenVersion() ).compareTo( new ComparableVersion( "3.0" ) ) >= 0;
    }
View Full Code Here

    /**
     * Check the current Maven version to see if it's Maven 3.0 or newer.
     */
    protected boolean isMaven3OrMore()
    {
        return new ComparableVersion( getMavenVersion() ).compareTo( new ComparableVersion( "3.0" ) ) >= 0;
    }
View Full Code Here

    /**
     * Check the current Maven version to see if it's Maven 3.0 or newer.
     */
    protected static boolean isMaven3OrMore()
    {
        return new ComparableVersion( getMavenVersion() ).compareTo( new ComparableVersion( "3.0" ) ) >= 0;
    }
View Full Code Here

        //doesn't yield the expected results (the latest versions are not returned), so we rely on a fuzzier search
        //and refine the results.
        Map<String, IndexedArtifact> values = index.search(a, IIndex.SEARCH_PLUGIN);
        if(!values.isEmpty()) {
          SortedSet<ComparableVersion> versions = new TreeSet<ComparableVersion>();
          ComparableVersion referenceComparableVersion = referenceVersion == null ? null : new ComparableVersion(
              referenceVersion);

          for(Map.Entry<String, IndexedArtifact> e : values.entrySet()) {
            if(!(e.getKey().endsWith(partialKey))) {
              continue;
            }
            for(IndexedArtifactFile f : e.getValue().getFiles()) {
              if(groupId.equals(f.group) && artifactId.equals(f.artifact) && !f.version.contains("-SNAPSHOT")) { //$NON-NLS-1$
                ComparableVersion v = new ComparableVersion(f.version);
                if(referenceComparableVersion == null || v.compareTo(referenceComparableVersion) > 0) {
                  versions.add(v);
                }
              }
            }
            if(!versions.isEmpty()) {
              List<String> sorted = new ArrayList<String>(versions.size());
              for(ComparableVersion v : versions) {
                sorted.add(v.toString());
              }
              Collections.reverse(sorted);
              version = sorted.iterator().next();
            }
          }
View Full Code Here

    public boolean maven3orLater(String mavenVersion) {
        // null or empty so false !
        if (StringUtils.isBlank( mavenVersion )) {
            return false;
        }
        return new ComparableVersion (mavenVersion).compareTo( new ComparableVersion ("3.0") ) >= 0;
   
View Full Code Here

TOP

Related Classes of org.apache.maven.artifact.versioning.ComparableVersion$Item

Copyright © 2018 www.massapicom. 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.