Author: rfscholte
Date: Wed Oct 24 20:17:37 2012
New Revision: 1401855
URL: http://svn.apache.org/viewvc?rev=1401855&view=rev
Log:
Use java5 code in example.
Let's not use an 'i' variable if it is not a for-loop index.
Modified:
maven/shared/trunk/maven-invoker/src/site/apt/usage.apt
Modified: maven/shared/trunk/maven-invoker/src/site/apt/usage.apt
URL:
http://svn.apache.org/viewvc/maven/shared/trunk/maven-invoker/src/site/apt/usage.apt?rev=1401855&r1=1401854&r2=1401855&view=diff
==============================================================================
--- maven/shared/trunk/maven-invoker/src/site/apt/usage.apt (original)
+++ maven/shared/trunk/maven-invoker/src/site/apt/usage.apt Wed Oct 24 20:17:37
2012
@@ -77,9 +77,7 @@ if ( result.getExitCode() != 0 )
+---+
// we will always call the same goals...
-private static final String[] GOALS_ARRAY = { "clean", "site-deploy" };
-
-private static final List PUBLISH_GOALS = Arrays.asList( GOALS_ARRAY );
+private static final List<String> PUBLISH_GOALS = Arrays.asList( "clean",
"site-deploy" );
// define a field for the Invoker instance.
private final Invoker invoker;
@@ -87,10 +85,10 @@ private final Invoker invoker;
// now, instantiate the invoker in the class constructor...
public SomeClass( File localRepositoryDir )
{
- Invoker i = new DefaultInvoker();
- i.setLocalRepositoryDirectory( localRepositoryDir );
+ Invoker newInvoker = new DefaultInvoker();
+ newInvoker.setLocalRepositoryDirectory( localRepositoryDir );
- this.invoker = i;
+ this.invoker = newInvoker;
}
// this method will be called repeatedly, and fire off new builds...