Examples of RebelClasspathResource


Examples of org.zeroturnaround.jrebel.gradle.model.RebelClasspathResource

 
  /**
   * Convert to backend model.
   */
  public RebelClasspathResource toRebelClasspathResource() {
    RebelClasspathResource rebelResource = new RebelClasspathResource();
    rebelResource.setDirectory(this.directory);
    rebelResource.setDirset(this.dirset);
    rebelResource.setExcludes(this.excludes);
    rebelResource.setIncludes(this.includes);
    rebelResource.setJar(this.jar);
    rebelResource.setJarset(this.jarset);
   
    return rebelResource;
  }
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelClasspathResource

 
  @Test
  public void testXmlWithClasspathDir() throws Exception {
    RebelMainModel model = new RebelMainModel();
   
    RebelClasspathResource resource = new RebelClasspathResource();
    resource.setDirectory("build/classes");
    model.addClasspathDir(resource);
   
    String generatedXml = writer.toXmlString(model);
   
   
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelClasspathResource

   */
  @Test
  public void testXmlWithClasspathJar() throws Exception {
    RebelMainModel model = new RebelMainModel();
   
    RebelClasspathResource resource = new RebelClasspathResource();
    resource.setJar("/my/library.jar");
    model.addClasspathJar(resource);
   
    String generatedXml = writer.toXmlString(model);
   
    String expectedResult =
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelClasspathResource

   */
  @Test
  public void testXmlWithClasspathDirset() throws Exception {
    RebelMainModel model = new RebelMainModel();
   
    RebelClasspathResource resource = new RebelClasspathResource();
    resource.setDirset("/my/workspace/build/classes");
    model.addClasspathDirset(resource);
   
    String generatedXml = writer.toXmlString(model);
   
    String expectedResult =
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelClasspathResource

 
  @Test
  public void testXmlWithClasspathJarset() throws Exception {
    RebelMainModel model = new RebelMainModel();
   
    RebelClasspathResource resource = new RebelClasspathResource();
    resource.setJarset("/my/workspace/build/classes");
    model.addClasspathJarset(resource);
   
    String generatedXml = writer.toXmlString(model);
   
    String expectedResult =
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelClasspathResource

   */
  @Test
  public void testXmlWithClasspathIncludesExcludes() throws Exception {
    RebelMainModel model = new RebelMainModel();
   
    RebelClasspathResource resource = new RebelClasspathResource();
    resource.setDirectory("build/classes");
    resource.addExclude("*.xml");
    resource.addExclude("*.properties");
    resource.addInclude("**/*.java");
    model.addClasspathDir(resource);
   
    String generatedXml = writer.toXmlString(model);
   
    String expectedResult =
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelClasspathResource

    // User has provided custom 'classpath {}' configuration
    else {
      // Search for the default element. If we find it, we have to place it exactly into the same place where we
      // found it (preserving the order). If we *don't* find it, we'll add the default classpath as first element.
      boolean addDefaultAsFirst = true;
      RebelClasspathResource defaultClasspath = null;
     
      // Just search for the default element. Don't add anything anywhere yet.
      for (RebelClasspathResource resource : classpath.getResources()) {
        // we found the default.
        if (resource.isDefaultClasspathElement()) {
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelClasspathResource

  /**
   * Add the default classes directory to classpath
   */
  private void addDefaultClassesDirToClasspath(RebelMainModel model, RebelClasspathResource defaultClasspath) {
    // project output directory
    RebelClasspathResource classpathResource = new RebelClasspathResource();
   
    String fixedDefaultClassesDirectory = fixFilePath(defaultClassesDirectory);
    log.info("fixed default classes directory : " + fixedDefaultClassesDirectory);
   
    classpathResource.setDirectory(fixedDefaultClassesDirectory);
    // XXX sure about this? what if i specified an absolute path with a placeholder in it?? this wouldn't work if i do this check!
    if (!new File(fixedDefaultClassesDirectory).isDirectory()) {
      log.info("Not adding default classes directory as it doesn't exist or is not a directory");
      return;
    }
 
    if (defaultClasspath != null) {
      classpathResource.setIncludes(defaultClasspath.getIncludes());
      classpathResource.setExcludes(defaultClasspath.getExcludes());
    }
 
    model.addClasspathDir(classpathResource);
  }
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelClasspathResource

   * Add the default resources directory to classpath
   */
  private void addDefaultResourcesDirToClasspath(RebelMainModel model) throws BuildException {
    log.info("Adding default resources directory to classpath ..");
   
    RebelClasspathResource resourcesClasspathResource = new RebelClasspathResource();
    String fixedDefaultResourcesDir = fixFilePath(defaultResourcesDirectory);
    log.info("Default resources directory after normalizing: " + fixedDefaultResourcesDir);
   
    resourcesClasspathResource.setDirectory(fixedDefaultResourcesDir);
    // XXX sure about this? what if i specified an absolute path with a placeholder in it?? this wouldn't work if i do this check!
    if (!new File(resourcesClasspathResource.getDirectory()).isDirectory()) {
      log.info("Didn't add default resources directory as it doesn't exist or is not a directory!");
      return;
    }
    model.addClasspathDir(resourcesClasspathResource);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.