Package org.sonatype.nexus.rest.model

Examples of org.sonatype.nexus.rest.model.ScheduledServicePropertyResource


      throws Exception
  {
    File repo = new File(nexusWorkDir, "storage/" + REPO_TEST_HARNESS_SNAPSHOT_REPO);
    copyDirectoryToDirectory(getTestFile("org"), repo);

    ScheduledServicePropertyResource props = new ScheduledServicePropertyResource();
    props.setKey(RebuildMavenMetadataTaskDescriptor.REPO_OR_GROUP_FIELD_ID);
    props.setValue(REPO_TEST_HARNESS_SNAPSHOT_REPO);
    TaskScheduleUtil.runTask(RebuildMavenMetadataTaskDescriptor.ID, props);
    TaskScheduleUtil.waitForAllTasksToStop();

    Metadata m1 = getMetadata(new File(repo, "org/sonatype/nexus/nexus-api/maven-metadata.xml"));
    Metadata m2 = getMetadata(getTestFile("artifactId-maven-metadata.xml"));
View Full Code Here


      throws Exception
  {
    Assert.assertTrue(getSearchMessageUtil().searchForGav(getTestId(), "project", "0.8").isEmpty());
    Assert.assertTrue(getSearchMessageUtil().searchForGav(getTestId(), "project", "2.1").isEmpty());

    ScheduledServicePropertyResource repo = new ScheduledServicePropertyResource();
    repo.setKey("repositoryId");
    repo.setValue("g4");
    TaskScheduleUtil.runTask("DownloadIndexesTaskDescriptor-snapshot", DownloadIndexesTaskDescriptor.ID, repo);

    Assert.assertFalse(getSearchMessageUtil().searchForGav(getTestId(), "project", "0.8").isEmpty());
    Assert.assertFalse(getSearchMessageUtil().searchForGav(getTestId(), "project", "2.1").isEmpty());
  }
View Full Code Here

    // {
    // // skip
    // }

    // clear cache, then download
    ScheduledServicePropertyResource prop = new ScheduledServicePropertyResource();
    prop.setKey("repositoryId");
    prop.setValue(getTestRepositoryId());
    TaskScheduleUtil.runTask(ExpireCacheTaskDescriptor.ID, prop);

    try {
      // the proxy is now working <- NOT TRUE, it is auto blocked!
      downloadArtifact(getNexusTestRepoUrl(),
View Full Code Here

  @Test
  public void expireAllRepos()
      throws Exception
  {
    ScheduledServicePropertyResource prop = new ScheduledServicePropertyResource();
    prop.setKey("repositoryId");
    prop.setValue(REPO_TEST_HARNESS_SHADOW);

    TaskScheduleUtil.runTask(ExpireCacheTaskDescriptor.ID, prop);
  }
View Full Code Here

    File dest = new File(localStorageDir, "nexus977tasks/1/nexus977tasks/project/1.0/project-1.0.jar");
    dest.getParentFile().mkdirs();
    FileUtils.copyFile(getTestFile("project.jar"), dest);
    failDownload(gav);

    ScheduledServicePropertyResource repo = new ScheduledServicePropertyResource();
    repo.setKey("repositoryId");
    repo.setValue("g4");
    TaskScheduleUtil.runTask("ExpireCacheTaskDescriptor-snapshot", ExpireCacheTaskDescriptor.ID, repo);

    downloadArtifactFromRepository("g4", gav, "target/downloads/nexus977tasks");
  }
View Full Code Here

    addSnapshotArtifactToProxy(artifact2);
    File secondDownload = downloadSnapshotArtifact("tasks-snapshot-repo", GAV, new File("target/download"));
    Assert.assertTrue("Before ExpireCache should download artifact 1",//
        compareFileSHA1s(secondDownload, artifact1));

    ScheduledServicePropertyResource prop = new ScheduledServicePropertyResource();
    prop.setKey("repositoryId");
    prop.setValue("tasks-snapshot-repo");

    // prop = new ScheduledServicePropertyResource();
    // prop.setId( "resourceStorePath" );
    // prop.setValue( "/" );
View Full Code Here

    dest = new File(nexusWorkDir, "storage/r3/nexus977tasks/project/3.0/project-3.0.jar");
    dest.getParentFile().mkdirs();
    FileUtils.copyFile(getTestFile("project.jar"), dest);

    ScheduledServicePropertyResource repo = new ScheduledServicePropertyResource();
    // I really don't get this, and we probably have some very bad problems with these Nexus977 ITs
    // By reading code, this IT should actually fail. By running this IT alone with
    // $ mvn clean install -Dit.test=Nexus977GroupOfGroupsRebuildAttributesTaskIT
    // it DOES fail. But when run in suite, it does not fail (only sometimes).
    // The cause: since may 2 2011 (change f72ade4a6719dce643da978348b17efbba77b426) the
View Full Code Here

  }

  protected String createReindexTask(String repositoryId, String taskName)
      throws Exception
  {
    ScheduledServicePropertyResource prop = new ScheduledServicePropertyResource();
    prop.setKey("repositoryId");

    if (repositoryId.equals(GROUP_ID)) {
      prop.setValue(repositoryId);
    }
    else {
      prop.setValue(repositoryId);
    }

    ScheduledServiceBaseResource scheduledTask = new ScheduledServiceBaseResource();
    scheduledTask.setEnabled(true);
    scheduledTask.setId(null);
View Full Code Here

    waitForTask(taskName, maxAttempts, failIfNotFinished);
  }

  public static ScheduledServicePropertyResource newProperty(String name, String value) {
    ScheduledServicePropertyResource prop = new ScheduledServicePropertyResource();
    prop.setKey(name);
    prop.setValue(value);
    return prop;
  }
View Full Code Here

  protected void runOnce()
      throws Exception
  {
    super.runOnce();

    ScheduledServicePropertyResource repo = new ScheduledServicePropertyResource();
    repo.setKey("repositoryId");
    repo.setValue(REPO_TEST_HARNESS_REPO);
    TaskScheduleUtil.runTask("nexus1560-repo", RebuildMavenMetadataTaskDescriptor.ID, repo);
    ScheduledServicePropertyResource repo2 = new ScheduledServicePropertyResource();
    repo2.setKey("repositoryId");
    repo2.setValue(REPO_TEST_HARNESS_REPO2);
    TaskScheduleUtil.runTask("nexus1560-repo2", RebuildMavenMetadataTaskDescriptor.ID, repo2);
  }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.rest.model.ScheduledServicePropertyResource

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.