Package org.sonatype.nexus.proxy.maven.routing.internal.TextFilePrefixSourceMarshaller

Examples of org.sonatype.nexus.proxy.maven.routing.internal.TextFilePrefixSourceMarshaller.Result


    try {
      item = retrieveFromRemoteIfExists(mavenProxyRepository, path);
      if (item != null) {
        log.debug("Remote prefix on {} at path {} found!", mavenProxyRepository, path);
        long prefixFileAgeInDays = (System.currentTimeMillis() - item.getModified()) / 86400000L;
        Result unmarshalled = new TextFilePrefixSourceMarshaller(config).read(item);
        if (!unmarshalled.supported()) {
          return new StrategyResult("Remote disabled automatic routing", UNSUPPORTED_PREFIXSOURCE, false);
        }
        if (unmarshalled.entries().isEmpty()) {
          return new StrategyResult("Remote publishes empty prefix file", UNSUPPORTED_PREFIXSOURCE, false);
        }

        final PrefixSource prefixSource = new FilePrefixSource(mavenProxyRepository, path, config);
        if (prefixFileAgeInDays < 1) {
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.maven.routing.internal.TextFilePrefixSourceMarshaller.Result

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.