mirror of https://github.com/apache/maven.git
implement some inspection settings
The EAP now uses these settings to show highlighting and intentions in the editor, which is really helpful. Once happy with settings, I will publish them for others to use git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@177913 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
55b7ee5e58
commit
fa3ecc6bd6
|
@ -34,21 +34,11 @@ public abstract class AbstractMojo
|
|||
|
||||
public Log getLog()
|
||||
{
|
||||
synchronized ( this )
|
||||
if ( log == null )
|
||||
{
|
||||
if ( log == null )
|
||||
{
|
||||
log = new SystemStreamLog();
|
||||
}
|
||||
log = new SystemStreamLog();
|
||||
}
|
||||
|
||||
return log;
|
||||
}
|
||||
|
||||
public void execute()
|
||||
throws MojoExecutionException
|
||||
{
|
||||
throw new MojoExecutionException( "You must override execute() if you implement the new paradigm" );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,4 +31,6 @@ public interface Mojo
|
|||
|
||||
// TODO: not sure about this here, and may want a getLog on here as well/instead
|
||||
void setLog( Log log );
|
||||
|
||||
Log getLog();
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A Maven2 plugin which generates the set of project reports.
|
||||
* @goal generate
|
||||
* @description A Maven2 plugin which generates the set of project reports
|
||||
*
|
||||
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
|
||||
* @version $Id: ProjectReportsMojo.java,v 1.3 2005/02/23 00:08:03 brett Exp $
|
||||
|
@ -43,12 +43,6 @@ import java.util.Map;
|
|||
public class ProjectReportsMojo
|
||||
extends AbstractMojo
|
||||
{
|
||||
/**
|
||||
* @parameter expression="${basedir}"
|
||||
* @required
|
||||
*/
|
||||
private String basedir;
|
||||
|
||||
/**
|
||||
* @parameter expression="${basedir}/src/site"
|
||||
* @required
|
||||
|
@ -134,6 +128,7 @@ public class ProjectReportsMojo
|
|||
return buffer.toString();
|
||||
}
|
||||
|
||||
/** @noinspection IOResourceOpenedButNotSafelyClosed*/
|
||||
private InputStream getSiteDescriptor()
|
||||
throws MojoExecutionException
|
||||
{
|
||||
|
@ -144,7 +139,7 @@ public class ProjectReportsMojo
|
|||
throw new MojoExecutionException( "The site descriptor is not present!" );
|
||||
}
|
||||
|
||||
String siteDescriptorContent = "";
|
||||
String siteDescriptorContent;
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -155,7 +150,7 @@ public class ProjectReportsMojo
|
|||
throw new MojoExecutionException( "The site descriptor cannot be read!", e );
|
||||
}
|
||||
|
||||
Map props = new HashMap();
|
||||
Map props = new HashMap( 1 );
|
||||
|
||||
props.put( "reports", getReportsMenu() );
|
||||
|
||||
|
|
Loading…
Reference in New Issue