mirror of https://github.com/apache/maven.git
Check the directory creation
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@426003 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3e8d1f934c
commit
ef76da9daa
|
@ -136,7 +136,14 @@ public class Maven1Converter
|
|||
pluginRelocator.relocate( v4Model );
|
||||
}
|
||||
|
||||
writeV4Pom( v4Model );
|
||||
try
|
||||
{
|
||||
writeV4Pom( v4Model );
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new ProjectConverterException( "Failed to write the pom.xml.", e );
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isEmpty( String value )
|
||||
|
@ -260,14 +267,17 @@ public class Maven1Converter
|
|||
* @throws ProjectConverterException
|
||||
*/
|
||||
private void writeV4Pom( Model v4Model )
|
||||
throws ProjectConverterException
|
||||
throws ProjectConverterException, IOException
|
||||
{
|
||||
if ( outputdir == null )
|
||||
{
|
||||
outputdir = basedir;
|
||||
}
|
||||
|
||||
outputdir.mkdirs();
|
||||
if ( !outputdir.exists() && !outputdir.mkdirs() )
|
||||
{
|
||||
throw new IOException( "Failed to create directory " + outputdir );
|
||||
}
|
||||
|
||||
File pomxml = new File( outputdir, "pom.xml" );
|
||||
|
||||
|
|
Loading…
Reference in New Issue