From d47f6c7dd6235eacbee845283b8ce18ad211d730 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Tue, 10 May 2005 07:39:33 +0000 Subject: [PATCH] move the Log interface to o.a.m.plugin.logging in maven-plugin-api, breaking the dependency on maven-monitor git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@169431 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/DefaultMaven.java | 2 +- .../java/org/apache/maven/cli/MavenCli.java | 25 ++++++++-- .../DefaultMavenExecutionRequest.java | 13 ------ .../execution/MavenExecutionRequest.java | 5 -- .../apache/maven/execution/MavenSession.java | 12 +---- .../maven/monitor/logging/DefaultLog.java | 17 +++++++ .../maven/plugin/DefaultPluginManager.java | 46 ++++++++++++++++--- .../PluginParameterExpressionEvaluator.java | 12 +++-- ...luginParameterExpressionEvaluatorTest.java | 5 +- .../org/apache/maven/plugin/AbstractMojo.java | 39 +--------------- .../java/org/apache/maven/plugin/Mojo.java | 6 +-- .../org/apache/maven/plugin}/logging/Log.java | 20 ++++++-- .../plugin}/logging/SystemStreamLog.java | 18 +++++++- .../ConsoleVerificationResultPrinter.java | 2 +- .../maven/plugin/pmd/PmdReportMojo.java | 3 +- 15 files changed, 127 insertions(+), 98 deletions(-) rename {maven-monitor/src/main/java/org/apache/maven/monitor => maven-plugin-api/src/main/java/org/apache/maven/plugin}/logging/Log.java (52%) rename {maven-monitor/src/main/java/org/apache/maven/monitor => maven-plugin-api/src/main/java/org/apache/maven/plugin}/logging/SystemStreamLog.java (81%) diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java index 569e1d7f82..ff9e87e60b 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java @@ -304,7 +304,7 @@ public class DefaultMaven protected MavenSession createSession( MavenExecutionRequest request, MavenProject project ) { return new MavenSession( project, container, request.getSettings(), request.getLocalRepository(), - request.getEventDispatcher(), request.getLog(), request.getGoals() ); + request.getEventDispatcher(), request.getGoals() ); } /** diff --git a/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java index 0ef0e3199c..b903b199ef 100644 --- a/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java +++ b/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java @@ -44,6 +44,7 @@ import org.apache.maven.settings.Settings; import org.codehaus.classworlds.ClassWorld; import org.codehaus.plexus.PlexusContainerException; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; +import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; import org.codehaus.plexus.embed.ArtifactEnabledEmbedder; import org.codehaus.plexus.logging.Logger; import org.codehaus.plexus.logging.LoggerManager; @@ -117,14 +118,14 @@ public class MavenCli initializeSystemProperties( commandLine ); boolean debug = commandLine.hasOption( CLIManager.DEBUG ); - + boolean showErrors = debug || commandLine.hasOption( CLIManager.ERRORS ); if(showErrors) { System.out.println("+ Error stacktraces are turned on."); } - + // ---------------------------------------------------------------------- // Process particular command line options // ---------------------------------------------------------------------- @@ -196,10 +197,11 @@ public class MavenCli Maven maven = null; MavenExecutionRequest request = null; + LoggerManager manager = null; try { // logger must be created first - LoggerManager manager = (LoggerManager) embedder.lookup( LoggerManager.ROLE ); + manager = (LoggerManager) embedder.lookup( LoggerManager.ROLE ); if ( debug ) { manager.setThreshold( Logger.LEVEL_DEBUG ); @@ -214,6 +216,21 @@ public class MavenCli showFatalError( "Unable to configure the Maven application", e, showErrors ); return 1; } + finally + { + if ( manager != null ) + { + try + { + embedder.release( manager ); + } + catch ( ComponentLifecycleException e ) + { + showFatalError( "Error releasing logging manager", e, showErrors ); + return 1; + } + } + } // TODO: this should be in default maven, and should accommodate default goals if ( request.getGoals().isEmpty() ) @@ -276,8 +293,6 @@ public class MavenCli Logger logger = manager.getLoggerForComponent( Mojo.ROLE ); if ( logger != null ) { - request.setLog( new DefaultLog( logger ) ); - request.addEventMonitor( new DefaultEventMonitor( logger ) ); } diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java index ea0cef405f..666c41da5b 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java +++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java @@ -20,7 +20,6 @@ package org.apache.maven.execution; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.monitor.event.EventDispatcher; import org.apache.maven.monitor.event.EventMonitor; -import org.apache.maven.monitor.logging.Log; import org.apache.maven.settings.Settings; import java.util.List; @@ -43,8 +42,6 @@ public class DefaultMavenExecutionRequest protected MavenSession session; - private Log log; - private final EventDispatcher eventDispatcher; private final Settings settings; @@ -118,16 +115,6 @@ public class DefaultMavenExecutionRequest this.session = session; } - public void setLog( Log log ) - { - this.log = log; - } - - public Log getLog() - { - return log; - } - public void addEventMonitor( EventMonitor monitor ) { eventDispatcher.addEventMonitor( monitor ); diff --git a/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java b/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java index 0bb12030c9..b9a2112ea6 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java +++ b/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java @@ -20,7 +20,6 @@ package org.apache.maven.execution; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.monitor.event.EventDispatcher; import org.apache.maven.monitor.event.EventMonitor; -import org.apache.maven.monitor.logging.Log; import org.apache.maven.settings.Settings; import java.util.List; @@ -41,10 +40,6 @@ public interface MavenExecutionRequest List getFiles(); - void setLog( Log log ); - - Log getLog(); - void addEventMonitor( EventMonitor monitor ); EventDispatcher getEventDispatcher(); diff --git a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java index 2389f0c571..6a940387bd 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java +++ b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java @@ -19,7 +19,6 @@ package org.apache.maven.execution; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.monitor.event.EventDispatcher; -import org.apache.maven.monitor.logging.Log; import org.apache.maven.project.MavenProject; import org.apache.maven.settings.Settings; import org.codehaus.plexus.PlexusContainer; @@ -45,13 +44,11 @@ public class MavenSession private EventDispatcher eventDispatcher; - private Log log; - // TODO: make this the central one, get rid of build settings... private final Settings settings; public MavenSession( MavenProject project, PlexusContainer container, Settings settings, - ArtifactRepository localRepository, EventDispatcher eventDispatcher, Log log, List goals ) + ArtifactRepository localRepository, EventDispatcher eventDispatcher, List goals ) { this.project = project; @@ -63,8 +60,6 @@ public class MavenSession this.eventDispatcher = eventDispatcher; - this.log = log; - this.goals = goals; // TODO: Go back to this when we get the container ready to configure mojos... @@ -144,11 +139,6 @@ public class MavenSession return eventDispatcher; } - public Log getLog() - { - return log; - } - public Settings getSettings() { return settings; diff --git a/maven-core/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java b/maven-core/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java index 4a2ce835fa..331fcde49f 100644 --- a/maven-core/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java +++ b/maven-core/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java @@ -1,5 +1,22 @@ package org.apache.maven.monitor.logging; +/* + * Copyright 2001-2005 The Apache Software Foundation. + * + * Licensed 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 org.apache.maven.plugin.logging.Log; import org.codehaus.plexus.logging.Logger; /** diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java index fe345668e9..caebde26bd 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java @@ -28,10 +28,12 @@ import org.apache.maven.artifact.transform.ReleaseArtifactTransformation; import org.apache.maven.execution.MavenSession; import org.apache.maven.monitor.event.EventDispatcher; import org.apache.maven.monitor.event.MavenEvents; +import org.apache.maven.monitor.logging.DefaultLog; import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.apache.maven.plugin.descriptor.Parameter; import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder; +import org.apache.maven.plugin.logging.Log; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectBuilder; import org.apache.maven.project.artifact.MavenMetadataSource; @@ -54,6 +56,7 @@ import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; import org.codehaus.plexus.context.Context; import org.codehaus.plexus.context.ContextException; import org.codehaus.plexus.logging.AbstractLogEnabled; +import org.codehaus.plexus.logging.LoggerManager; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; import org.codehaus.plexus.util.StringUtils; @@ -88,6 +91,8 @@ public class DefaultPluginManager private Set pluginsInProcess = new HashSet(); + private Log mojoLogger; + public DefaultPluginManager() { pluginDescriptors = new HashMap(); @@ -353,8 +358,7 @@ public class DefaultPluginManager try { plugin = (Mojo) container.lookup( Mojo.ROLE, mojoDescriptor.getRoleHint() ); - - plugin.setLog( session.getLog() ); + plugin.setLog( mojoLogger ); String goalId = mojoDescriptor.getGoal(); @@ -378,7 +382,8 @@ public class DefaultPluginManager // validatePomConfiguration( mojoDescriptor, pomConfiguration ); } - ExpressionEvaluator expressionEvaluator = new PluginParameterExpressionEvaluator( session, pathTranslator ); + ExpressionEvaluator expressionEvaluator = new PluginParameterExpressionEvaluator( session, pathTranslator, + getLogger() ); PlexusConfiguration mergedConfiguration = mergeConfiguration( pomConfiguration, mojoDescriptor.getMojoConfiguration() ); @@ -599,7 +604,7 @@ public class DefaultPluginManager List parameters = goal.getParameters(); List invalidParameters = new ArrayList(); - + for ( int i = 0; i < parameters.size(); i++ ) { Parameter parameter = (Parameter) parameters.get( i ); @@ -714,8 +719,8 @@ public class DefaultPluginManager } } - - if( !invalidParameters.isEmpty() ) + + if ( !invalidParameters.isEmpty() ) { throw new PluginParameterException( goal, invalidParameters ); } @@ -746,6 +751,33 @@ public class DefaultPluginManager throws ContextException { container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); + + LoggerManager manager = null; + + try + { + manager = (LoggerManager) container.lookup( LoggerManager.ROLE ); + + mojoLogger = new DefaultLog( manager.getLoggerForComponent( Mojo.ROLE ) ); + } + catch ( ComponentLookupException e ) + { + throw new ContextException( "Error locating a logger manager", e ); + } + finally + { + if ( manager != null ) + { + try + { + container.release( manager ); + } + catch ( ComponentLifecycleException e ) + { + getLogger().error( "Error releasing the logger manager - ignoring", e ); + } + } + } } public void initialize() @@ -802,4 +834,4 @@ public class DefaultPluginManager } } -} \ No newline at end of file +} diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java index 3bfdc79479..8460ad95d0 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java @@ -23,12 +23,13 @@ import org.apache.maven.reporting.MavenReport; import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException; import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; +import org.codehaus.plexus.logging.Logger; import org.codehaus.plexus.util.introspection.ReflectionValueExtractor; import java.io.File; import java.util.Iterator; -import java.util.Map; import java.util.List; +import java.util.Map; /** * @author Jason van Zyl @@ -42,10 +43,13 @@ public class PluginParameterExpressionEvaluator private final MavenSession context; - public PluginParameterExpressionEvaluator( MavenSession context, PathTranslator pathTranslator ) + private final Logger logger; + + public PluginParameterExpressionEvaluator( MavenSession context, PathTranslator pathTranslator, Logger logger ) { this.context = context; this.pathTranslator = pathTranslator; + this.logger = logger; } public Object evaluate( String expr ) @@ -116,7 +120,7 @@ public class PluginParameterExpressionEvaluator for ( Iterator i = ( (Map) value ).keySet().iterator(); i.hasNext(); ) { String key = (String) i.next(); - context.getLog().debug( key + " report is found." ); + logger.debug( key + " report is found." ); } } catch ( ComponentLookupException cle ) @@ -175,7 +179,7 @@ public class PluginParameterExpressionEvaluator } else { - context.getLog().error( "Got expression '" + expression + "' that was not recognised" ); + logger.error( "Got expression '" + expression + "' that was not recognised" ); } } else diff --git a/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java b/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java index aa139af391..bc5ec382d9 100644 --- a/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java +++ b/maven-core/src/test/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorTest.java @@ -65,8 +65,7 @@ public class PluginParameterExpressionEvaluatorTest private static MavenSession createSession( MavenProject project, PlexusContainer container, ArtifactRepository repo ) { - return new MavenSession( project, container, new Settings(), repo, new DefaultEventDispatcher(), - new DefaultLog( container.getLogger() ), Collections.EMPTY_LIST ); + return new MavenSession( project, container, new Settings(), repo, new DefaultEventDispatcher(), Collections.EMPTY_LIST ); } public void testLocalRepositoryExtraction() @@ -112,7 +111,7 @@ public class PluginParameterExpressionEvaluatorTest PlexusContainer container = getContainer(); MavenSession session = createSession( project, container, repo ); - ExpressionEvaluator expressionEvaluator = new PluginParameterExpressionEvaluator( session, null ); + ExpressionEvaluator expressionEvaluator = new PluginParameterExpressionEvaluator( session, null, container.getLogger() ); return expressionEvaluator; } } \ No newline at end of file diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java index 967d9e74b0..de99b1a44b 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/AbstractMojo.java @@ -16,8 +16,8 @@ package org.apache.maven.plugin; * limitations under the License. */ -import org.apache.maven.monitor.logging.Log; -import org.apache.maven.monitor.logging.SystemStreamLog; +import org.apache.maven.plugin.logging.Log; +import org.apache.maven.plugin.logging.SystemStreamLog; /** * @version $Id$ @@ -27,41 +27,6 @@ public abstract class AbstractMojo { private Log log; - /** - * Default behaviour to mimic old behaviour. - * - * @deprecated - */ - public void execute( MojoExecutionRequest request ) - throws MojoExecutionException - { - MojoExecutionResponse response = new MojoExecutionResponse(); - try - { - execute( request, response ); - } - catch ( Exception e ) - { - throw new MojoExecutionException( e.getMessage(), e ); - } - if ( response.isExecutionFailure() ) - { - throw new MojoExecutionException( response.getFailureResponse().getSource(), - response.getFailureResponse().shortMessage(), - response.getFailureResponse().longMessage() ); - } - } - - /** - * @deprecated - */ - public void execute( MojoExecutionRequest request, MojoExecutionResponse response ) - throws Exception - { - throw new UnsupportedOperationException( - "If you are using the old technique, you must override execute(req,resp)" ); - } - public void setLog( Log log ) { this.log = log; diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/Mojo.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/Mojo.java index c7aaf9bdd9..e60c7826b4 100755 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/Mojo.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/Mojo.java @@ -16,7 +16,7 @@ package org.apache.maven.plugin; * limitations under the License. */ -import org.apache.maven.monitor.logging.Log; +import org.apache.maven.plugin.logging.Log; /** * @author Jason van Zyl @@ -29,10 +29,6 @@ public interface Mojo void execute() throws MojoExecutionException; - /** @deprecated */ - void execute( MojoExecutionRequest request ) - throws MojoExecutionException; - // TODO: not sure about this here, and may want a getLog on here as well/instead void setLog( Log log ); } diff --git a/maven-monitor/src/main/java/org/apache/maven/monitor/logging/Log.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/Log.java similarity index 52% rename from maven-monitor/src/main/java/org/apache/maven/monitor/logging/Log.java rename to maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/Log.java index 4571e6ef88..f8a56dff46 100644 --- a/maven-monitor/src/main/java/org/apache/maven/monitor/logging/Log.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/Log.java @@ -1,11 +1,26 @@ -package org.apache.maven.monitor.logging; +package org.apache.maven.plugin.logging; + +/* + * Copyright 2001-2005 The Apache Software Foundation. + * + * Licensed 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. + */ /** * @author jdcasey */ public interface Log { - boolean isDebugEnabled(); void debug( CharSequence content ); @@ -37,5 +52,4 @@ public interface Log void error( CharSequence content, Throwable error ); void error( Throwable error ); - } \ No newline at end of file diff --git a/maven-monitor/src/main/java/org/apache/maven/monitor/logging/SystemStreamLog.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/SystemStreamLog.java similarity index 81% rename from maven-monitor/src/main/java/org/apache/maven/monitor/logging/SystemStreamLog.java rename to maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/SystemStreamLog.java index 19c255fd49..f91155c0a3 100644 --- a/maven-monitor/src/main/java/org/apache/maven/monitor/logging/SystemStreamLog.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/logging/SystemStreamLog.java @@ -1,4 +1,20 @@ -package org.apache.maven.monitor.logging; +package org.apache.maven.plugin.logging; + +/* + * Copyright 2001-2005 The Apache Software Foundation. + * + * Licensed 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.PrintWriter; import java.io.StringWriter; diff --git a/maven-plugins/maven-verifier-plugin/src/main/java/org/apache/maven/plugin/verifier/ConsoleVerificationResultPrinter.java b/maven-plugins/maven-verifier-plugin/src/main/java/org/apache/maven/plugin/verifier/ConsoleVerificationResultPrinter.java index 7ba86fe496..96fe8fa037 100644 --- a/maven-plugins/maven-verifier-plugin/src/main/java/org/apache/maven/plugin/verifier/ConsoleVerificationResultPrinter.java +++ b/maven-plugins/maven-verifier-plugin/src/main/java/org/apache/maven/plugin/verifier/ConsoleVerificationResultPrinter.java @@ -16,7 +16,7 @@ package org.apache.maven.plugin.verifier; * limitations under the License. */ -import org.apache.maven.monitor.logging.Log; +import org.apache.maven.plugin.logging.Log; import java.util.Iterator; diff --git a/sandbox/maven-reports/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReportMojo.java b/sandbox/maven-reports/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReportMojo.java index c959033c4b..dd55241939 100644 --- a/sandbox/maven-reports/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReportMojo.java +++ b/sandbox/maven-reports/maven-pmd-plugin/src/main/java/org/apache/maven/plugin/pmd/PmdReportMojo.java @@ -21,7 +21,6 @@ import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; import org.apache.maven.reporting.MavenReport; import org.apache.maven.reporting.MavenReportConfiguration; -import org.apache.maven.reporting.MavenReportException; import org.codehaus.doxia.module.xhtml.XhtmlSink; import org.codehaus.doxia.site.renderer.SiteRenderer; import org.codehaus.plexus.util.FileUtils; @@ -29,8 +28,8 @@ import org.codehaus.plexus.util.StringInputStream; import org.codehaus.plexus.util.StringUtils; import java.io.File; -import java.io.InputStream; import java.io.IOException; +import java.io.InputStream; import java.util.HashMap; import java.util.Map;