Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.codehaus.mojo.gwt.reports;
  
  /*
   * Licensed to the Apache Software Foundation (ASF) under one
   * or more contributor license agreements.  See the NOTICE file
   * distributed with this work for additional information
   * regarding copyright ownership.  The ASF licenses this file
   * to you under the Apache License, Version 2.0 (the
   * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
 
 import java.io.File;
 import java.util.List;
 import java.util.Map;
 

Deprecated:
You must now use the CompileReport, SoycDashboard is not anymore supported will be removed in 2.1.2
See also:
http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting.The_Story_of_Your_Compile_(SOYC)
Goal:
soyc
RequiresDependencyResolution:
runtime
 
 public class SoycReport
     extends AbstractMavenReport
 {

    
The output directory of the jsdoc report.

Parameter:
default-value="${project.reporting.outputDirectory}/soyc"
Required:
Readonly:
 
     protected File reportingOutputDirectory;

    
The directory into which extra, non-deployed files will be written.

Parameter:
default-value="${project.build.directory}/extra"
 
     private File extra;
    
    
Doxia Site Renderer component.

Since:
2.1.0-1
Component:
 
     protected Renderer siteRenderer;  
    
    
The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.

Since:
2.1.0-1
Parameter:
default-value="${project.reporting.outputDirectory}"
Required:
     
     protected File outputDirectory;
    
    
The Maven Project.

Since:
2.1.0-1
Parameter:
default-value="${project}"
Required:
Readonly:
 
     protected MavenProject project;    
    
    

Since:
2.1.0-1
Parameter:
default-value="${plugin.artifactMap}"
Required:
Readonly:
    private Map<StringArtifactpluginArtifacts;    
    
    

Since:
2.1.0-1
Component:
    protected ClasspathBuilder classpathBuilder;    
    
    

Since:
2.1.0-1
Parameter:
default-value="false" expression="${gwt.soycReport.skip}"
    private boolean skip;
    
    
Internationalization component.

Since:
2.1.0-1
Component:
    protected I18N i18n;    

    
    public boolean canGenerateReport()
    {
        return true;
    }

    
    public String getCategoryName()
    {
        return ;
    }

    
    public String getDescriptionLocale locale )
    {
        return getI18nStringlocale"soyc.report.description" );
    }

    
    public String getNameLocale locale )
    {
        return getI18nStringlocale"soyc.report.name" );
    }

    
    public String getOutputName()
    {
        return "soyc";
    }


    
    public boolean isExternalReport()
    {
        return false;
    }
    @Override
    protected Renderer getSiteRenderer()
    {
        return ;
    }
    @Override
    protected String getOutputDirectory()
    {
        return .getAbsolutePath();
    }
    @Override
    protected MavenProject getProject()
    {
        return ;
    }
    @Override
    protected void executeReportLocale locale )
        throws MavenReportException
    {
        StringBuilder message = new StringBuilder();
        message.append"--------------------------------------------------------------------------" );
        message.append. );
        message.appendgetI18nStringlocale"soyc.report.warning" ) );
        message.append. );
        message.append"--------------------------------------------------------------------------" );
        getLog().warnmessage.toString() );
        if (  )
        {
            getLog().info"Soyc Report is skipped" );
            return;
        }
        
        DirectoryScanner scanner = new DirectoryScanner();
        scanner.setBasedir );
        scanner.setIncludesnew String[] { "**/soycReport/stories0.xml.gz" } );
        
        boolean soycRawReport = true;
        if ( .exists() )
        {
            scanner.scan();
        }
        else
        {
            soycRawReport = false;
        }
        if (!soycRawReport || scanner.getIncludedFiles().length == 0 )
        {
            getLog().warn"No SOYC raw report found, did you compile with soyc option set ?" );
            soycRawReport = false;
        }
        
        GwtDevHelper gwtDevHelper = new GwtDevHelpergetLog(), . );
        String[] includeFiles = soycRawReport ? scanner.getIncludedFiles() : new String[0];
        for ( String path : includeFiles )
        {
            try
            {
                //Usage: java com.google.gwt.soyc.SoycDashboard -resources dir -soycDir dir -symbolMaps dir [-out dir]
                String module = path.substring( 0, path.indexOf. ) );
                JavaCommandRequest javaCommandRequest = new JavaCommandRequest()
                    .setClassName"com.google.gwt.soyc.SoycDashboard" )
                    .setLoggetLog() );
                JavaCommand cmd = new JavaCommandjavaCommandRequest ).withinClasspathgwtDevHelper.getGwtDevJar() )
                    .arg"-out" ).arg.getAbsolutePath() + . + module );
                cmd.argnew Filepath ).getAbsolutePath() );
                cmd.argnew Filepath ).getAbsolutePath().replace"stories""dependencies" ) );
                cmd.argnew Filepath ).getAbsolutePath().replace"stories""splitPoints" ) );
                cmd.execute();
            }
            catch ( Exception e )
            {
                getLog().warne.getMessage(), e );
                new CompilationReportRenderergetSink(), new ArrayList<GwtModule>( 0 ), getLog(), soycRawReport,
                                               "soyc"falselocale ).render();
            }
        }
        
        try
        {
            GwtModuleReader gwtModuleReader = new DefaultGwtModuleReaderthis.getLog(),  );
            List<GwtModulegwtModules = new ArrayList<GwtModule>();
            List<StringmoduleNames = gwtModuleReader.getGwtModules();
            for ( String name : moduleNames )
            {
                gwtModules.addgwtModuleReader.readModulename ) );
            }
            // add link in the page to all module reports
            CompilationReportRenderer compilationReportRenderer = new CompilationReportRenderergetSink(), gwtModules,
                                                                                                 getLog(),
                                                                                                 soycRawReport"soyc",
                                                                                                 falselocale );
            compilationReportRenderer.render();
        }
        catch ( GwtModuleReaderException e )
        {
            throw new MavenReportExceptione.getMessage(), e );
        }
    }
    protected String getI18nStringLocale localeString key )
    {
        return .getString"compile-report"localekey );
    }    
    
New to GrepCode? Check out our FAQ X