com.google.code.mojo.license.util.resource
Class ResourceFinder

java.lang.Object
  extended by com.google.code.mojo.license.util.resource.ResourceFinder

public final class ResourceFinder
extends java.lang.Object

Date: 26-Feb-2008
Author: Mathieu Carbou (mathieu.carbou@gmail.com)


Constructor Summary
ResourceFinder(java.io.File basedir)
           
 
Method Summary
 java.net.URL findResource(java.lang.String resource)
          Find a resource by searching:
1.
 void setCompileClassPath(java.util.List<java.lang.String> classpath)
           
 void setPluginClassPath(java.lang.ClassLoader classLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceFinder

public ResourceFinder(java.io.File basedir)
Method Detail

setCompileClassPath

public void setCompileClassPath(java.util.List<java.lang.String> classpath)

setPluginClassPath

public void setPluginClassPath(java.lang.ClassLoader classLoader)

findResource

public java.net.URL findResource(java.lang.String resource)
                          throws org.apache.maven.plugin.MojoFailureException
Find a resource by searching:
1. In the filesystem, relative to basedir
2. In the filesystem, as an absolute path (or relative to current execution directory)
3. In project classpath
4. In plugin classpath
5. As a URL

Parameters:
resource - The resource to get
Returns:
A valid URL
Throws:
org.apache.maven.plugin.MojoFailureException - If the resource is not found


Copyright © 2008-2010 Mathieu Carbou. All Rights Reserved.