merge r389106

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@389110 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2006-03-27 11:51:15 +00:00
parent 08c7d50184
commit 02fd611c54
1 changed files with 7 additions and 4 deletions

View File

@ -21,6 +21,7 @@ import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.plugin.descriptor.Parameter;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.codehaus.plexus.component.repository.ComponentDependency;
import org.codehaus.plexus.util.FileUtils;
import java.io.File;
import java.util.ArrayList;
@ -83,13 +84,15 @@ public abstract class AbstractGeneratorTestCase
pluginDescriptor.setDependencies( Collections.singletonList( dependency ) );
File tempFile = File.createTempFile( "testGenerator-outDir", ".marker.txt" ).getAbsoluteFile();
tempFile.deleteOnExit();
File destinationDirectory = tempFile.getParentFile();
File destinationDirectory = new File( System.getProperty( "java.io.tmpdir" ), "testGenerator-outDir" );
FileUtils.deleteDirectory( destinationDirectory );
destinationDirectory.mkdir();
generator.execute( destinationDirectory, pluginDescriptor );
validate( destinationDirectory );
FileUtils.deleteDirectory( destinationDirectory );
}
// ----------------------------------------------------------------------
@ -126,4 +129,4 @@ public abstract class AbstractGeneratorTestCase
{
// empty
}
}
}