protected void generateReadme ( String basename ) { final Object content = getReadmeFileContent ( basename ) ; if ( content != null ) { final String textualContent = content . toString ( ) ; if ( ! Strings . isEmpty ( textualContent ) ) { final byte [ ] bytes = textualContent . getBytes ( ) ; for ( final String output : getOutputs ( ) ) { final File directory = new File ( output ) . getAbsoluteFile ( ) ; try { directory . mkdirs ( ) ; final File outputFile = new File ( directory , README_BASENAME ) ; Files . write ( Paths . get ( outputFile . getAbsolutePath ( ) ) , bytes ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } } } }
Generate the README file .