Package org.apache.maven.plugin.checkstyle

Examples of org.apache.maven.plugin.checkstyle.VelocityTemplate


     */
    public void generateRSS( CheckstyleResults results, CheckstyleRssGeneratorRequest checkstyleRssGeneratorRequest )
        throws MavenReportException
    {

        VelocityTemplate vtemplate = new VelocityTemplate( velocityComponent, CheckstyleReport.PLUGIN_RESOURCES );
        vtemplate.setLog( checkstyleRssGeneratorRequest.getLog() );

        Context context = new VelocityContext();
        context.put( "results", results );
        context.put( "project", checkstyleRssGeneratorRequest.getMavenProject() );
        context.put( "copyright", checkstyleRssGeneratorRequest.getCopyright() );
        context.put( "levelInfo", SeverityLevel.INFO );
        context.put( "levelWarning", SeverityLevel.WARNING );
        context.put( "levelError", SeverityLevel.ERROR );
        context.put( "stringutils", new StringUtils() );

        try
        {
            vtemplate.generate( checkstyleRssGeneratorRequest.getOutputDirectory().getPath() + "/checkstyle.rss",
                                "checkstyle-rss.vm", context );
        }
        catch ( ResourceNotFoundException e )
        {
            throw new MavenReportException( "Unable to find checkstyle-rss.vm resource.", e );
View Full Code Here


     */
    public void generateRSS( CheckstyleResults results, CheckstyleRssGeneratorRequest checkstyleRssGeneratorRequest )
        throws MavenReportException
    {

        VelocityTemplate vtemplate = new VelocityTemplate( velocityComponent, CheckstyleReport.PLUGIN_RESOURCES );
        vtemplate.setLog( checkstyleRssGeneratorRequest.getLog() );

        Context context = new VelocityContext();
        context.put( "results", results );
        context.put( "project", checkstyleRssGeneratorRequest.getMavenProject() );
        context.put( "copyright", checkstyleRssGeneratorRequest.getCopyright() );
        context.put( "levelInfo", SeverityLevel.INFO );
        context.put( "levelWarning", SeverityLevel.WARNING );
        context.put( "levelError", SeverityLevel.ERROR );
        context.put( "stringutils", new StringUtils() );

        try
        {
            vtemplate.generate( checkstyleRssGeneratorRequest.getOutputDirectory().getPath() + "/checkstyle.rss",
                                "checkstyle-rss.vm", context );
        }
        catch ( ResourceNotFoundException e )
        {
            throw new MavenReportException( "Unable to find checkstyle-rss.vm resource.", e );
View Full Code Here

TOP

Related Classes of org.apache.maven.plugin.checkstyle.VelocityTemplate

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.