dion 2002/07/14 08:58:42
Modified: src/java/org/apache/maven/app RepoConfigException.java
MavenJellyContext.java JellyUtils.java Maven.java
PluginManager.java
Log:
Style violations
Revision Changes Path
1.3 +1 -1
jakarta-turbine-maven/src/java/org/apache/maven/app/RepoConfigException.java
Index: RepoConfigException.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/RepoConfigException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RepoConfigException.java 5 Jul 2002 14:31:32 -0000 1.2
+++ RepoConfigException.java 14 Jul 2002 15:58:42 -0000 1.3
@@ -66,6 +66,6 @@
{
public RepoConfigException(String msg)
{
- super( msg );
+ super(msg);
}
}
1.10 +11 -11
jakarta-turbine-maven/src/java/org/apache/maven/app/MavenJellyContext.java
Index: MavenJellyContext.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/MavenJellyContext.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- MavenJellyContext.java 9 Jul 2002 03:20:01 -0000 1.9
+++ MavenJellyContext.java 14 Jul 2002 15:58:42 -0000 1.10
@@ -129,11 +129,11 @@
*/
public Project getAntProject()
{
- if ( this.antProject == null
+ if (this.antProject == null
&&
- getParent() != null )
+ getParent() != null)
{
- return ((MavenJellyContext)getParent()).getAntProject();
+ return ((MavenJellyContext) getParent()).getAntProject();
}
return this.antProject;
@@ -192,7 +192,7 @@
*/
public Object getVariable(String name)
{
- // System.err.println( "getVariable(" + name + ")" );
+ // System.err.println("getVariable(" + name + ")");
Object value = this.props.get(name);
@@ -203,18 +203,18 @@
if (value instanceof String)
{
- // System.err.println( "getVariable(" + name + ") is-a string" );
+ // System.err.println("getVariable(" + name + ") is-a string");
value = ProjectHelper.replaceProperties(getAntProject(),
(String) value,
this.asProps);
}
- else if ( value instanceof Expression )
+ else if (value instanceof Expression)
{
- // System.err.println( "getVariable(" + name + ") is-a expression" );
- value = ((Expression)value).evaluate( this );
+ // System.err.println("getVariable(" + name + ") is-a expression");
+ value = ((Expression) value).evaluate(this);
}
- // System.err.println( "getVariable(" + name + ") -> " + value );
+ // System.err.println("getVariable(" + name + ") -> " + value);
return value;
}
@@ -243,9 +243,9 @@
(String) value,
this.asProps);
}
- else if ( value instanceof Expression )
+ else if (value instanceof Expression)
{
- value = ((Expression)value).evaluate( this );
+ value = ((Expression) value).evaluate(this);
}
return value;
1.2 +3 -2
jakarta-turbine-maven/src/java/org/apache/maven/app/JellyUtils.java
Index: JellyUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/JellyUtils.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JellyUtils.java 24 Jun 2002 18:33:19 -0000 1.1
+++ JellyUtils.java 14 Jul 2002 15:58:42 -0000 1.2
@@ -66,9 +66,10 @@
/** Utilities for Jelly.
*
- * @see <a
href="http://jakarta.apache.org/commons/sandbox/jelly/">commons-jelly</a>
+ * @see <a href="http://jakarta.apache.org/commons/sandbox/jelly/">
+ * commons-jelly</a>
*
- * @author <a href="mailto:[EMAIL PROTECTED]">bob mcwhirter</a>
+ * @author <a href="mailto:[EMAIL PROTECTED]">bob mcwhirter</a>
*/
public class JellyUtils
{
1.64 +44 -44 jakarta-turbine-maven/src/java/org/apache/maven/app/Maven.java
Index: Maven.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/Maven.java,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- Maven.java 14 Jul 2002 15:40:48 -0000 1.63
+++ Maven.java 14 Jul 2002 15:58:42 -0000 1.64
@@ -359,8 +359,8 @@
*/
public File getDriverFile()
{
- return new File( getMavenBin(),
- DRIVER_SCRIPT_NAME );
+ return new File(getMavenBin(),
+ DRIVER_SCRIPT_NAME);
}
/** Retrieve the ${maven.home} directory.
@@ -434,16 +434,16 @@
*/
public String getProperty(String name)
{
- Object val = getJellyContext().getVariable( name );
+ Object val = getJellyContext().getVariable(name);
- if ( val == null )
+ if (val == null)
{
return null;
}
- if ( val instanceof CompositeExpression )
+ if (val instanceof CompositeExpression)
{
- val = ((CompositeExpression) val).evaluate( getJellyContext() );
+ val = ((CompositeExpression) val).evaluate(getJellyContext());
}
return val.toString();
@@ -651,18 +651,18 @@
File driver = getDriverFile();
- if ( !driver.exists() )
+ if (!driver.exists())
{
return;
}
- File driverProperties = new File( mavenBin, "driver.properties" );
- loadProps( driverProperties );
+ File driverProperties = new File(mavenBin, "driver.properties");
+ loadProps(driverProperties);
- JellyUtils.runScript( driver,
+ JellyUtils.runScript(driver,
getMavenBin().toURL(),
getJellyContext(),
- getXMLOutput() );
+ getXMLOutput());
}
/** Initialize all plugins.
@@ -672,10 +672,10 @@
*/
private void initializePlugins() throws Exception
{
- pluginManager.setMavenHome( getMavenHome() );
- pluginManager.setAntProject( getAntProject() );
- pluginManager.setJellyContext( getJellyContext() );
- pluginManager.setXMLOutput( getXMLOutput() );
+ pluginManager.setMavenHome(getMavenHome());
+ pluginManager.setAntProject(getAntProject());
+ pluginManager.setJellyContext(getJellyContext());
+ pluginManager.setXMLOutput(getXMLOutput());
pluginManager.initializePlugins();
}
@@ -707,7 +707,7 @@
Collection goals = getWerkzProject().getGoals();
- List list = new ArrayList( goals );
+ List list = new ArrayList(goals);
// sort by name
Comparator comparator = new Comparator() {
@@ -715,10 +715,10 @@
{
Goal g1 = (Goal) o1;
Goal g2 = (Goal) o2;
- return g1.getName().compareTo( g2.getName() );
+ return g1.getName().compareTo(g2.getName());
}
};
- Collections.sort( list, comparator );
+ Collections.sort(list, comparator);
Iterator goalIter = list.iterator();
Goal eachGoal = null;
@@ -808,11 +808,11 @@
wrapIndent = 30;
String shortName =
- goalName.substring( pluginName.length() + 1,
- goalName.length() );
+ goalName.substring(pluginName.length() + 1,
+ goalName.length());
msgPrefix = msgPrefix + " "
- + format(shortName + " ", wrapIndent, '.' )
+ + format(shortName + " ", wrapIndent, '.')
+ " ";
// add 3 for spaces used to pad the message
wrapIndent += 3;
@@ -820,7 +820,7 @@
System.out.println(msgPrefix
- + wrapConsoleMessage(description, wrapIndent, CONSOLE_WIDTH ) );
+ + wrapConsoleMessage(description, wrapIndent, CONSOLE_WIDTH));
}
@@ -963,13 +963,13 @@
// lets create a child context
// so that URIs are relative to the projects build file
- MavenJellyContext context = new MavenJellyContext( getJellyContext() );
+ MavenJellyContext context = new MavenJellyContext(getJellyContext());
URL projectURL = projectBuildFile.getParentFile().toURL();
- context.setRootURL( projectURL );
- context.setCurrentURL( projectURL );
- context.setInherit( true );
+ context.setRootURL(projectURL);
+ context.setCurrentURL(projectURL);
+ context.setInherit(true);
JellyUtils.runScript(projectBuildFile,
null,
@@ -1066,7 +1066,7 @@
setDir(new File(cli.getOptionValue('d')));
}
- if ( this.cli.hasOption('p'))
+ if (this.cli.hasOption('p'))
{
setProjectFileName(cli.getOptionValue('p'));
setProjectFile(new File(getProjectFileName()));
@@ -1200,9 +1200,9 @@
Properties props = new Properties();
- props.load( in );
+ props.load(in);
- integrateProps( props );
+ integrateProps(props);
}
catch (IOException e)
{
@@ -1516,7 +1516,7 @@
rootCause = jellyEx.getCause();
- if ( rootCause == null )
+ if (rootCause == null)
{
msg = jellyEx.getLocalizedMessage();
}
@@ -1524,7 +1524,7 @@
{
msg = rootCause.getLocalizedMessage();
- if ( msg == null )
+ if (msg == null)
{
msg = rootCause.getClass().getName();
}
@@ -1534,7 +1534,7 @@
{
msg = rootCause.getLocalizedMessage();
- if ( msg == null )
+ if (msg == null)
{
msg = rootCause.getClass().getName();
}
@@ -1545,17 +1545,17 @@
msg = e.getLocalizedMessage();
}
- if ( fileName != null)
+ if (fileName != null)
{
- System.err.println( "File...... " + fileName );
- System.err.println( "Element... " + elementName );
- System.err.println( "Line...... " + lineNumber );
- System.err.println( "Column.... " + column );
+ System.err.println("File...... " + fileName);
+ System.err.println("Element... " + elementName);
+ System.err.println("Line...... " + lineNumber);
+ System.err.println("Column.... " + column);
}
- System.err.println( msg );
+ System.err.println(msg);
- if ( getCli().hasOption( 'X' ) )
+ if (getCli().hasOption('X'))
{
e.printStackTrace();
}
@@ -1571,12 +1571,12 @@
String msg = e.getLocalizedMessage();
- System.err.println( "File...... " + fileName );
- System.err.println( "Element... " + elementName );
- System.err.println( "Line...... " + lineNumber );
- System.err.println( "Column.... " + column );
+ System.err.println("File...... " + fileName);
+ System.err.println("Element... " + elementName);
+ System.err.println("Line...... " + lineNumber);
+ System.err.println("Column.... " + column);
- System.err.println( msg );
+ System.err.println(msg);
}
catch (Exception e)
{
1.9 +10 -9
jakarta-turbine-maven/src/java/org/apache/maven/app/PluginManager.java
Index: PluginManager.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/PluginManager.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- PluginManager.java 12 Jul 2002 15:17:54 -0000 1.8
+++ PluginManager.java 14 Jul 2002 15:58:42 -0000 1.9
@@ -66,8 +66,6 @@
import java.util.Properties;
import org.apache.commons.jelly.JellyContext;
-import org.apache.commons.jelly.expression.CompositeExpression;
-
import org.apache.commons.jelly.XMLOutput;
import org.apache.commons.jelly.expression.Expression;
import org.apache.commons.jelly.expression.CompositeExpression;
@@ -93,22 +91,22 @@
/**
* Plug-in main script name.
*/
- public final static String PLUGIN_SCRIPT_NAME = "plugin.jelly";
+ public static final String PLUGIN_SCRIPT_NAME = "plugin.jelly";
/**
* Plug-in default properties name.
*/
- public final static String PLUGIN_PROPERTIES_NAME = "plugin.properties";
+ public static final String PLUGIN_PROPERTIES_NAME = "plugin.properties";
/**
* Plug-in descriptor.
*/
- public final static String PLUGIN_DESCRIPTOR = "plugin.xml";
+ public static final String PLUGIN_DESCRIPTOR = "plugin.xml";
/**
* Log.
*/
- private final static Log log = LogFactory.getLog(Maven.class);
+ private static final Log log = LogFactory.getLog(Maven.class);
/**
* ${maven.home}/bin/plugins directory.
@@ -205,7 +203,8 @@
ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
- ClassLoader cl = new URLClassLoader(new URL[]{getPluginDir(name).toURL()},
+ ClassLoader cl = new URLClassLoader(new URL[]{
+ getPluginDir(name).toURL()},
getAntProject().getClass().getClassLoader());
// Thread.currentThread().setContextClassLoader(cl);
@@ -214,7 +213,8 @@
// Let the classloader know where the classes provided by
// the plugin live.
-
Forehead.getInstance().getClassLoader("root.maven").addURL(getPluginDir(name).toURL());
+ Forehead.getInstance().getClassLoader("root.maven")
+ .addURL(getPluginDir(name).toURL());
// Now for each plugin we have to let the classloader know about
// the JARs that this plugin needs.
@@ -225,7 +225,8 @@
// the elements clobbering one another. Make sure to set inheritence
// to true so that the outter context has access to variables and
// taglibs set in the parent.
- MavenJellyContext pluginJellyContext = new
MavenJellyContext(getJellyContext());
+ MavenJellyContext pluginJellyContext = new MavenJellyContext(
+ getJellyContext());
pluginJellyContext.setInherit(true);
pluginJellyContext.setVariable("plugin.dir", getPluginDir(name));
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>