150151152153154155156157158159160
FileUtils.deleteDirectory( mavenHome ); Expand expand = new Expand(); expand.setSrc( file ); expand.setDest( new File( destDir ).getParentFile() ); expand.execute(); if ( !mavenHome.exists() ) { throw new Exception( "Maven was not installed in " + mavenHome ); }
129130131132133134135136137138139
} tempDir.deleteOnExit(); final Expand expander = new Expand(); expander.setDest(tempDir); expander.setSrc(new File(uri)); expander.execute(); final File dir = new File(tempDir, resourcePath); if ( dir.exists() && dir.isDirectory() ) { return dir; }
expand.setSrc( source ); expand.setOverwrite( true ); expand.setDest( dest ); try { expand.execute(); continue; } catch ( Exception e ) { throw new MojoFailureException( "Failed to expaned packagedFile " + source + ": " + e.getMessage() );
142143144145146147148149150151152
FileUtils.deleteDirectory( mavenHome ); Expand expand = new Expand(); expand.setSrc( file ); expand.setDest( new File( prefix ) ); expand.execute(); if ( !mavenHome.exists() ) { throw new Exception( "Maven was not installed in " + mavenHome ); }