Hi Vincent,

Author: vsiveton
Date: Sun Aug  2 11:24:25 2009
New Revision: 800032

URL: http://svn.apache.org/viewvc?rev=800032&view=rev
Log:
o using maven 2.0.9

This also requires to bump the <prerequsites> on Maven, e.g. older Maven versions don't support MavenProject.clone() and will die with a linkage error upon executing the mojo.

             catch ( IOException e )
             {
-                getLog().debug( "IOException: " + e.getMessage(), e );
+                String msg = "IOException: " + e.getMessage();
+                if ( getLog().isDebugEnabled() )
+                {
+                    getLog().debug( msg, e );
+                }
+                else
+                {
+                    getLog().error( msg );
+                }

Consider to output the error message at error level in both cases. I mean the severity of the message remains the same whether the plugin additionally dumps the stack trace or not. Somebody who greps the log output for ERROR would otherwise miss this information when debug logging was enabled.

+        clone.getOriginalModel().getReporting().setOutputDirectory( 
tmpReportingOutputDirectory.getAbsolutePath() );

Hm, maybe you could solve this without a temp model and simplify the code: I see the Site Plugin's outputDirectory parameter can be configured via the system property siteOutputDirectory. Adding this to the forked invocation should do equally well, shouldn't it?


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to