Package com.agilejava.maven.docbkx.spec

Examples of com.agilejava.maven.docbkx.spec.Specification


    InputStream in = loader.getResourceAsStream("plugins.stg");
    Reader reader = new InputStreamReader(in);
    StringTemplateGroup group = new StringTemplateGroup(reader);
    StringTemplate template = group.getInstanceOf("plugin");
    File targetFile = new File(sourcesDir, getClassName() + ".java");
    Specification specification = null;
    try {
      specification = createSpecification();
      getLog().info(
          "Number of parameters: "
              + specification.getParameters().size());
      template.setAttribute("spec", specification);
      FileUtils.writeStringToFile(targetFile, template.toString(), null);
    } catch (IOException ioe) {
      if (specification == null) {
        throw new MojoExecutionException("Failed to read parameters.",
View Full Code Here


   */
  private Specification createSpecification() throws MojoExecutionException {
    String stylesheetLocation = stylesheetTargetLocation == null ? stylesheetTargetRoot
        + "/" + type + "/docbook.xsl"
        : stylesheetTargetLocation;
    Specification specification = new Specification();
    specification.setType(type);
    specification.setStylesheetLocation(stylesheetLocation);
    specification.setClassName(getClassName());
    specification.setSuperClassName(superClassName);
    specification.setPackageName(getPackageName());
    specification.setDocbookXslVersion(version);
    specification.setPluginSuffix(pluginSuffix);
    specification.setParameters(extractParameters());
    return specification;
  }
View Full Code Here

    InputStream in = loader.getResourceAsStream("plugins.stg");
    Reader reader = new InputStreamReader(in, Charset.forName(encoding));
    StringTemplateGroup group = new StringTemplateGroup(reader);
    StringTemplate template = group.getInstanceOf("plugin");
    File targetFile = new File(sourcesDir, getClassName() + ".java");
    Specification specification = null;

    try {
      specification = createSpecification();
      getLog().info("Number of parameters: " + specification.getParameters().size());
      template.setAttribute("spec", specification);
      FileUtils.writeStringToFile(targetFile, template.toString(), encoding);
    } catch (IOException ioe) {
      if (specification == null) {
        throw new MojoExecutionException("Failed to read parameters.", ioe);
View Full Code Here

   *             If the {@link Specification} cannot be created.
   */
  private Specification createSpecification() throws MojoExecutionException {
    String stylesheetLocation = (stylesheetTargetLocation == null) ? (stylesheetTargetRoot + "/" + type + "/docbook.xsl")
        : stylesheetTargetLocation;
    Specification specification = new Specification();
    specification.setType(type);
    specification.setStylesheetLocation(stylesheetLocation);
    specification.setClassName(getClassName());
    specification.setSuperClassName(superClassName);
    specification.setPackageName(getPackageName());
    specification.setDocbookXslVersion(version);
    specification.setPluginSuffix(pluginSuffix);
    specification.setParameters(extractParameters());
    specification.setUseStandardOutput(useStandardOutput);
    specification.setTargetFileExtension(targetFileExtension);

    return specification;
  }
View Full Code Here

        InputStream in = loader.getResourceAsStream( "plugins.stg" );
        Reader reader = new InputStreamReader( in );
        StringTemplateGroup group = new StringTemplateGroup( reader );
        StringTemplate template = group.getInstanceOf( "plugin" );
        File targetFile = new File( sourcesDir, getClassName(  ) + ".java" );
        Specification specification = null;

        try
        {
            specification = createSpecification(  );
            getLog(  ).info( "Number of parameters: " + specification.getParameters(  ).size(  ) );
            template.setAttribute( "spec", specification );
            FileUtils.writeStringToFile( targetFile,
                                         template.toString(  ),
                                         null );
        } catch ( IOException ioe )
View Full Code Here

                                       throws MojoExecutionException
    {
        String stylesheetLocation =
            ( stylesheetTargetLocation == null ) ? ( stylesheetTargetRoot + "/" + type + "/docbook.xsl" )
                                                 : stylesheetTargetLocation;
        Specification specification = new Specification(  );
        specification.setType( type );
        specification.setStylesheetLocation( stylesheetLocation );
        specification.setClassName( getClassName(  ) );
        specification.setSuperClassName( superClassName );
        specification.setPackageName( getPackageName(  ) );
        specification.setDocbookXslVersion( version );
        specification.setPluginSuffix( pluginSuffix );
        specification.setParameters( extractParameters(  ) );
        specification.setUseStandardOutput( useStandardOutput );
        specification.setTargetFileExtension(targetFileExtension);

        return specification;
    }
View Full Code Here

        InputStream in = loader.getResourceAsStream("plugins.stg");
        Reader reader = new InputStreamReader(in);
        StringTemplateGroup group = new StringTemplateGroup(reader);
        StringTemplate template = group.getInstanceOf("plugin");
        File targetFile = new File(sourcesDir, getClassName() + ".java");
        Specification specification = null;
        try {
            specification = createSpecification();
            getLog().info(
                    "Number of parameters: "
                            + specification.getParameters().size());
            template.setAttribute("spec", specification);
            FileUtils.writeStringToFile(targetFile, template.toString(), null);
        } catch (IOException ioe) {
            if (specification == null) {
                throw new MojoExecutionException("Failed to read parameters.",
View Full Code Here

     */
    private Specification createSpecification() throws MojoExecutionException {
        String stylesheetLocation = stylesheetTargetLocation == null ? stylesheetTargetRoot
                + "/" + type + "/docbook.xsl"
                : stylesheetTargetLocation;
        Specification specification = new Specification();
        specification.setType(type);
        specification.setStylesheetLocation(stylesheetLocation);
        specification.setClassName(getClassName());
        specification.setSuperClassName(superClassName);
        specification.setPackageName(getPackageName());
        specification.setDocbookXslVersion(version);
        specification.setPluginSuffix(pluginSuffix);
        specification.setParameters(extractParameters());
        specification.setUseStandardOutput(useStandardOutput);
        return specification;
    }
View Full Code Here

    InputStream in = loader.getResourceAsStream("plugins.stg");
    Reader reader = new InputStreamReader(in);
    StringTemplateGroup group = new StringTemplateGroup(reader);
    StringTemplate template = group.getInstanceOf("plugin");
    File targetFile = new File(sourcesDir, getClassName() + ".java");
    Specification specification = null;
    try {
      specification = createSpecification();
      getLog().info(
          "Number of parameters: "
              + specification.getParameters().size());
      template.setAttribute("spec", specification);
      FileUtils.writeStringToFile(targetFile, template.toString(), null);
    } catch (IOException ioe) {
      if (specification == null) {
        throw new MojoExecutionException("Failed to read parameters.",
View Full Code Here

   */
  private Specification createSpecification() throws MojoExecutionException {
    String stylesheetLocation = stylesheetTargetLocation == null ? stylesheetTargetRoot
        + "/" + type + "/docbook.xsl"
        : stylesheetTargetLocation;
    Specification specification = new Specification();
    specification.setType(type);
    specification.setStylesheetLocation(stylesheetLocation);
    specification.setClassName(getClassName());
    specification.setSuperClassName(superClassName);
    specification.setPackageName(getPackageName());
    specification.setDocbookXslVersion(version);
    specification.setPluginSuffix(pluginSuffix);
    specification.setParameters(extractParameters());
    return specification;
  }
View Full Code Here

TOP

Related Classes of com.agilejava.maven.docbkx.spec.Specification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.