Package org.apache.maven.doxia.site.decoration

Examples of org.apache.maven.doxia.site.decoration.DecorationModel


    private void renderer( SurefireReportMojo mojo, File outputHtml )
        throws RendererException, IOException
    {
        Writer writer = null;
        SiteRenderingContext context = new SiteRenderingContext();
        context.setDecoration( new DecorationModel() );
        context.setTemplateName( "org/apache/maven/doxia/siterenderer/resources/default-site.vm" );
        context.setLocale( Locale.ENGLISH );

        try
        {
View Full Code Here


     * @throws MojoExecutionException
     *             An error occurred while creating the report.
     */
    public void execute() throws MojoExecutionException, MojoFailureException
    {
        DecorationModel model = new DecorationModel();
        model.setBody( new Body() );
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put( "outputEncoding", "UTF-8" );
        Locale locale = Locale.getDefault();
        try
        {
View Full Code Here

  {
    final Locale reportLocale = determineLocale();

    try
    {
      final DecorationModel model = new DecorationModel();
      model.setBody(new Body());
      final Map<String, String> attributes = new HashMap<String, String>();
      attributes.put("outputEncoding", "UTF-8"); // TODO correct???
      final SiteRenderingContext siteContext =
          siteRenderer.createContextForSkin(ReportUtils.getSkinArtifactFile(
              project, localRepository, resolver, factory), attributes, model,
View Full Code Here

        if (!canGenerateReport()) {
            return;
        }

        try {
            DecorationModel model = new DecorationModel();
            model.setBody(new Body());
            Map<String, Object> attributes = new HashMap<String, Object>();
            attributes.put("outputEncoding", "UTF-8");
            attributes.put("project", project);
            Locale locale = Locale.getDefault();
View Full Code Here

    private void renderer( CheckstyleReport mojo, File outputHtml )
        throws RendererException, Exception
    {
        Writer writer = null;
        SiteRenderingContext context = new SiteRenderingContext();
        context.setDecoration( new DecorationModel() );
        context.setTemplateName( "org/apache/maven/doxia/siterenderer/resources/default-site.vm" );
        context.setLocale( Locale.ENGLISH );

        try
        {
View Full Code Here

        }

        // Put any of the properties in directly into the Velocity context
        attributes.putAll( project.getProperties() );

        DecorationModel decorationModel;
        try
        {
            decorationModel = siteTool.getDecorationModel( project, reactorProjects, localRepository, repositories,
                                                           toRelative( project.getBasedir(),
                                                                       siteDirectory.getAbsolutePath() ),
View Full Code Here

            {
                Map props = new HashMap();
                props.put( "reports", "<menu ref=\"reports\"/>" );
                props.put( "modules", "<menu ref=\"modules\"/>" );

                DecorationModel decoration;
                try
                {
                    String siteDescriptorContent = IOUtil.toString( ReaderFactory.newXmlReader( descriptorFile ) );

                    siteDescriptorContent =
View Full Code Here

        for ( Map.Entry<Object, Object> entry : project.getProperties().entrySet() )
        {
            attributes.put( (String) entry.getKey(), entry.getValue() );
        }

        DecorationModel decorationModel;
        try
        {
            decorationModel = siteTool.getDecorationModel( project, reactorProjects, localRepository, repositories,
                                                           siteTool.getRelativePath( siteDirectory.getAbsolutePath(),
                                                           project.getBasedir().getAbsolutePath() ),
View Full Code Here

        {
            List<Locale> localesList = siteTool.getAvailableLocales( locales );

            SiteRenderingContext context = createSiteRenderingContext( localesList.get( 0 ) );

            DecorationModel decorationModel = context.getDecoration();

            StringWriter w = new StringWriter();
            XMLWriter writer =
                new PrettyPrintXMLWriter( w, StringUtils.repeat( " ", XmlWriterUtil.DEFAULT_INDENTATION_SIZE ),
                                          decorationModel.getModelEncoding(), null );

            writeHeader( writer );

            writeEffectiveSite( decorationModel, writer );
View Full Code Here

            String filename = getOutputName() + ".html";

            Locale locale = Locale.getDefault();

            SiteRenderingContext siteContext = new SiteRenderingContext();
            siteContext.setDecoration( new DecorationModel() );
            siteContext.setTemplateName( "org/apache/maven/doxia/siterenderer/resources/default-site.vm" );
            siteContext.setLocale( locale );
            siteContext.setTemplateProperties( getTemplateProperties() );

            RenderingContext context = new RenderingContext( outputDirectory, filename );
View Full Code Here

TOP

Related Classes of org.apache.maven.doxia.site.decoration.DecorationModel

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.