Package org.moxie

Examples of org.moxie.Metadata


    String timestamp = new SimpleDateFormat(Metadata.snapshotTimestamp).format(new Date());
    int buildNumber = 1;

    File metadataFile = new File(artifactDir, "maven-metadata.xml");     
    if (metadataFile.exists()) {
      Metadata metadata = MetadataReader.readMetadata(metadataFile);
      buildNumber = metadata.getLastBuildNumber() + 1;
    }

    String rev = timestamp + "-" + buildNumber;
    // revision is x.y.z-TIMESTAMP-BUILDNUMBER
    asDependency.revision = pom.version.replace("SNAPSHOT", rev);
View Full Code Here


  }
 
  private void updateMetadata(File dir, Dependency dependency, boolean isSnapshotMetadata) {
    // create/update maven-metadata.xml
    File metadataFile = new File(dir, "maven-metadata.xml");
    Metadata oldMetadata = null;
    if (metadataFile.exists()) {
      oldMetadata = MetadataReader.readMetadata(metadataFile);
    }

    Metadata metadata = new Metadata(dependency, isSnapshotMetadata);
    if (oldMetadata != null) {
      metadata.merge(oldMetadata);
    }

    FileUtils.writeContent(metadataFile, metadata.toXML());
    metadataFile.setLastModified(metadata.lastUpdated.getTime());
   
    // add metadata file to installed artifacts path
    reference(metadataFile);
  }
View Full Code Here

TOP

Related Classes of org.moxie.Metadata

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.