Package org.sonatype.nexus.webresources

Examples of org.sonatype.nexus.webresources.WebResource


    }
    else if (path.endsWith("/")) {
      path += "index.html";
    }

    WebResource resource = webResources.getResource(path);
    if (resource == null) {
      // if there is an index.html for the requested path, redirect to it
      if (webResources.getResource(path + "/index.html") != null) {
        String location = String.format("%s%s/", BaseUrlHolder.get(), path);
        log.debug("Redirecting: {} -> {}", path, location);
View Full Code Here


  }

  private void addResource(final WebResource resource) {
    String path = resource.getPath();
    log.trace("Adding resource: {} -> {}", path, resource);
    final WebResource old = resourcePaths.put(path, resource);
    if (old != null) {
      // FIXME: for now this causes a bit of noise on startup for overlapping icons, for now reduce to DEBUG
      // FIXME: ... we need to sort out a general strategy short/long term for how to handle this issue
      log.debug("Overlapping resources on path {}: old={}, new={}", path, old, resource);
    }
View Full Code Here

  @Override
  public WebResource getResource(final String path) {
    log.trace("Looking up resource: {}", path);

    WebResource resource = null;

    // 1) first "dev" resources if enabled (to override everything else)
    File file = DevModeResources.getFileIfOnFileSystem(path);
    if (file != null) {
      resource = new FileWebResource(file, path, mimeSupport.guessMimeTypeFromPath(file.getName()), false);
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.webresources.WebResource

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.