Package org.apache.maven.bootstrap.download

Examples of org.apache.maven.bootstrap.download.RepositoryMetadata


        FileUtils.copyFile( jar, file );

        installPomFile( model, pom );

        RepositoryMetadata metadata = new RepositoryMetadata();
        metadata.setReleaseVersion( version );
        metadata.setLatestVersion( version );
        file = localRepository.getMetadataFile( groupId, artifactId, null, type, "maven-metadata-local.xml" );
        metadata.write( file );

        metadata = new RepositoryMetadata();
        metadata.setLocalCopy( true );
        metadata.setLastUpdated( getCurrentUtcDate() );
        file = localRepository.getMetadataFile( groupId, artifactId, version, type, "maven-metadata-local.xml" );
        metadata.write( file );
    }
View Full Code Here


        FileUtils.copyFile( jar, file );

        installPomFile( model, pom );

        RepositoryMetadata metadata = new RepositoryMetadata();
        metadata.setReleaseVersion( version );
        metadata.setLatestVersion( version );
        file = localRepository.getMetadataFile( groupId, artifactId, null, type, "maven-metadata-local.xml" );
        metadata.write( file );

        metadata = new RepositoryMetadata();
        metadata.setLocalCopy( true );
        metadata.setLastUpdated( getCurrentUtcDate() );
        file = localRepository.getMetadataFile( groupId, artifactId, version, type, "maven-metadata-local.xml" );
        metadata.write( file );
    }
View Full Code Here

      copyFile(jar, file);
    }

    installPomFile(model, pom);

    RepositoryMetadata metadata = new RepositoryMetadata();
    metadata.setReleaseVersion(version);
    metadata.setLatestVersion(version);
    file = localRepository.getMetadataFile(groupId, artifactId, null, type, "maven-metadata-local.xml");
    metadata.write(file);

    metadata = new RepositoryMetadata();
    metadata.setLocalCopy(true);
    metadata.setLastUpdated(getCurrentUtcDate());
    file = localRepository.getMetadataFile(groupId, artifactId, version, type, "maven-metadata-local.xml");
    metadata.write(file);
  }
View Full Code Here

          if (remoteFile.exists()) {
            if (!localFile.exists()) {
              file = remoteFile;
            }
            else {
              RepositoryMetadata localMetadata = RepositoryMetadata.read(localFile);

              RepositoryMetadata remoteMetadata = RepositoryMetadata.read(remoteFile);

              if (remoteMetadata.getLastUpdatedUtc() > localMetadata.getLastUpdatedUtc()) {
                file = remoteFile;
              }
              else {
                file = localFile;
              }
            }
          }

          if (file.exists()) {
            log("Using metadata: " + file);

            RepositoryMetadata metadata = RepositoryMetadata.read(file);

            if (!file.equals(localFile)) {
              version = metadata.constructVersion(version);
            }
            log("Resolved version: " + version);
            dep.setResolvedVersion(version);
            if (!version.endsWith("SNAPSHOT")) {
              String ver =
View Full Code Here

        FileUtils.copyFile( jar, file );

        installPomFile( reader, pom );

        RepositoryMetadata metadata = new RepositoryMetadata();
        metadata.setReleaseVersion( version );
        metadata.setLatestVersion( version );
        file = localRepository.getMetadataFile( groupId, artifactId, null, type, "maven-metadata-local.xml" );
        metadata.write( file );

        metadata = new RepositoryMetadata();
        metadata.setLocalCopy( true );
        metadata.setLastUpdated( getCurrentUtcDate() );
        file = localRepository.getMetadataFile( groupId, artifactId, version, type, "maven-metadata-local.xml" );
        metadata.write( file );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.bootstrap.download.RepositoryMetadata

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.