[MNG-3731] Detect absolute script directories, and only prepend basedir to relative paths.

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@689698 13f79535-47bb-0310-9956-ffa450edef68
master
John Dennis Casey 2008-08-28 02:09:10 +00:00
parent 969c5cb752
commit 7e65cf62ad
1 changed files with 7 additions and 1 deletions

View File

@ -48,6 +48,7 @@ public abstract class AbstractScriptedMojoDescriptorExtractor
public List execute( MavenProject project, PluginDescriptor pluginDescriptor )
throws ExtractionException, InvalidPluginDescriptorException
{
getLogger().info( "Running: " + getClass().getName() );
String metadataExtension = getMetadataFileExtension();
String scriptExtension = getScriptFileExtension();
@ -142,7 +143,12 @@ public abstract class AbstractScriptedMojoDescriptorExtractor
String resourceDir = (String) it.next();
File dir = new File( basedir, resourceDir ).getAbsoluteFile();
getLogger().info( "Scanning script dir: " + resourceDir + " with extractor: " + getClass().getName() );
File dir = new File( resourceDir );
if ( !dir.isAbsolute() )
{
dir = new File( basedir, resourceDir ).getAbsoluteFile();
}
resourceDir = dir.getPath();