private void generateReadme(Project project)
   {
      String readmeTemplate = Streams.toString(getClass().getResourceAsStream("README.asciidoc"));
      FileResource<?> child = project.getRoot().reify(DirectoryResource.class)
               .getChildOfType(FileResource.class, "README.asciidoc");

      // TODO: Replace with template addon
      MetadataFacet metadata = project.getFacet(MetadataFacet.class);
      readmeTemplate = readmeTemplate.replaceAll("\\{\\{ADDON_GROUP_ID\\}\\}", metadata.getProjectGroupName());
      readmeTemplate = readmeTemplate.replaceAll("\\{\\{ADDON_ARTIFACT_ID\\}\\}", metadata.getProjectName());
      child.createNewFile();
      child.setContents(readmeTemplate);
   }
private void generateReadme ( Project project ) { String readmeTemplate = Streams . toString ( getClass ( ) . getResourceAsStream ( "README.asciidoc" ) ) ; FileResource < ? > child = project . getRoot ( ) . reify ( DirectoryResource . class ) . getChildOfType ( FileResource . class , "README.asciidoc" ) ; MetadataFacet metadata = project . getFacet ( MetadataFacet . class ) ; readmeTemplate = readmeTemplate . replaceAll ( "\\{\\{ADDON_GROUP_ID\\}\\}" , metadata . getProjectGroupName ( ) ) ; readmeTemplate = readmeTemplate . replaceAll ( "\\{\\{ADDON_ARTIFACT_ID\\}\\}" , metadata . getProjectName ( ) ) ; child . createNewFile ( ) ; child . setContents ( readmeTemplate ) ; }
@param project