Test if basedir exists before scan the directory.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162864 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Emmanuel Venisse 2004-07-19 09:57:43 +00:00
parent dd7093ada6
commit db646bfa4a
1 changed files with 8 additions and 1 deletions

View File

@ -119,7 +119,14 @@ public abstract class AbstractJarMojo
* @param prefix value to be added to the front of jar entry names * @param prefix value to be added to the front of jar entry names
* @param baseDir the directory to add * @param baseDir the directory to add
*/ */
protected void addDirectory(Map includes, String includesPattern, String excludesPattern, String prefix, File baseDir) throws IOException { protected void addDirectory(Map includes, String includesPattern, String excludesPattern, String prefix, File baseDir)
throws IOException
{
if ( !baseDir.exists() )
{
return;
}
DirectoryScanner scanner = new DirectoryScanner(); DirectoryScanner scanner = new DirectoryScanner();
scanner.setBasedir(baseDir); scanner.setBasedir(baseDir);
if ( includesPattern != null ) if ( includesPattern != null )