Package org.zeroturnaround.jrebel.gradle

Examples of org.zeroturnaround.jrebel.gradle.RebelGenerateTask


    project.getProject().getPlugins().apply(RebelPlugin.class);

    Task task = project.getTasks().getByName(RebelPlugin.GENERATE_REBEL_TASK_NAME);
    assertTrue(task instanceof RebelGenerateTask);
   
    RebelGenerateTask rebelTask = (RebelGenerateTask) task;
    assertTrue(rebelTask.getPackaging().equals(RebelGenerateTask.PACKAGING_TYPE_JAR));
   
    // check that the dependsOn got set
    Task classesTask = project.getTasks().getByName(JavaPlugin.CLASSES_TASK_NAME);
    assertTrue(task.getDependsOn().contains(classesTask));
   
View Full Code Here


    project.getProject().getPlugins().apply(GroovyPlugin.class);

    Task task = project.getTasks().getByName(RebelPlugin.GENERATE_REBEL_TASK_NAME);
    assertTrue(task instanceof RebelGenerateTask);
   
    RebelGenerateTask rebelTask = (RebelGenerateTask) task;
    assertTrue(rebelTask.getPackaging().equals(RebelGenerateTask.PACKAGING_TYPE_JAR));
   
    // check that the dependsOn got set
    Task classesTask = project.getTasks().getByName(JavaPlugin.CLASSES_TASK_NAME);
    assertTrue(task.getDependsOn().contains(classesTask));
   
View Full Code Here

    project.getProject().getPlugins().apply(RebelPlugin.class);

    Task task = project.getTasks().getByName(RebelPlugin.GENERATE_REBEL_TASK_NAME);
    assertTrue(task instanceof RebelGenerateTask);
   
    RebelGenerateTask rebelTask = (RebelGenerateTask) task;
    assertTrue(rebelTask.getPackaging().equals(RebelGenerateTask.PACKAGING_TYPE_WAR));
   
    // check that the dependsOn got set
    Task classesTask = project.getTasks().getByName(JavaPlugin.CLASSES_TASK_NAME);
    assertTrue(task.getDependsOn().contains(classesTask));
   
View Full Code Here

    project.getProject().getPlugins().apply(JettyPlugin.class);

    Task task = project.getTasks().getByName(RebelPlugin.GENERATE_REBEL_TASK_NAME);
    assertTrue(task instanceof RebelGenerateTask);
   
    RebelGenerateTask rebelTask = (RebelGenerateTask) task;
    assertTrue(rebelTask.getPackaging().equals(RebelGenerateTask.PACKAGING_TYPE_WAR));
   
    // check that the dependsOn got set
    Task classesTask = project.getTasks().getByName(JavaPlugin.CLASSES_TASK_NAME);
    assertTrue(task.getDependsOn().contains(classesTask));
   
View Full Code Here

    rebelExtension.setAlwaysGenerate(myAlwaysGenerate);
   
    callAfterEvaluated(project);
   
    // Just get the rebel task (don't execute it)
    RebelGenerateTask task = (RebelGenerateTask) project.getTasks().getByName(RebelPlugin.GENERATE_REBEL_TASK_NAME);
   
    assertNotNull(task);

    task.propagateConventionMappingSettings();

    // 'showGenerate'
    assertEquals(myShowGenerated, task.getShowGenerated());
   
    // 'alwasGenerate'
    assertEquals(myAlwaysGenerate, task.getAlwaysGenerate());
   
    // 'warPath'
    assertEquals(myWarPath, task.getWar().getPath());
   
    cleanUp(project);
  }
View Full Code Here

    defaultResourcesDir.mkdirs();
   
    log.info("defaultResourcesDir: " + defaultResourcesDir.getAbsolutePath());
   
    // Get and execute the rebel task
    RebelGenerateTask task = (RebelGenerateTask) project.getTasks().getByName(RebelPlugin.GENERATE_REBEL_TASK_NAME);
    task.skipWritingRebelXml();
    task.generate();
   
    RebelMainModel model = task.getRebelModel();
   
    // Check the classpath directories
    List<RebelClasspathResource> classpathDirs = model.getClasspathDirs();
    Assert.assertEquals(2, classpathDirs.size());
   
View Full Code Here

    // create directory by hand, as the War plugin is not actually executing in our test
    defaultWebappDirectory.mkdirs();
    log.info("Default webapp dir: " + defaultWebappDirectory.getAbsolutePath());
   
    // Get and execute the rebel task
    RebelGenerateTask task = (RebelGenerateTask) project.getTasks().getByName(RebelPlugin.GENERATE_REBEL_TASK_NAME);
    task.skipWritingRebelXml();
    task.generate();
   
    RebelMainModel model = task.getRebelModel();

    // Check the classpath directories
    List<RebelClasspathResource> classpathDirs = model.getClasspathDirs();
    Assert.assertEquals(2, classpathDirs.size());
   
View Full Code Here

    rebelExtension.setWar(dslWar);
   
    callAfterEvaluated(project);
   
    // Get the rebel task
    RebelGenerateTask task = (RebelGenerateTask) project.getTasks().getByName(RebelPlugin.GENERATE_REBEL_TASK_NAME);

    // tell the task to actually not write any rebel.xml down to file system when running in test mode!
    task.skipWritingRebelXml();
   
    // execute the task
    task.generate();
   
    // validate the eventual model
    RebelMainModel model = task.getRebelModel();
    RebelWar war = model.getWar();
   
    assertNotNull(war);
    assertEquals(myWarPath, war.getOriginalPath());
   
View Full Code Here

    rebelExtension.setWeb(web);

    callAfterEvaluated(project);
   
    // Execute the rebel task, validate the generated model
    RebelGenerateTask task = (RebelGenerateTask) project.getTasks().getByName(RebelPlugin.GENERATE_REBEL_TASK_NAME);

    // tell the task to actually not write any rebel.xml down to file system when running in test mode!
    task.skipWritingRebelXml();
   
    // execute the task
    task.generate();
   
    // validate the eventual model
    RebelMainModel model = task.getRebelModel();
    assertNotNull(model);
   
    List<RebelWebResource> webResources = model.getWebResources();
   
    // TODO very rough test that doesn't actually validate almost anything... just make sure the code runs through
View Full Code Here

TOP

Related Classes of org.zeroturnaround.jrebel.gradle.RebelGenerateTask

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.