dion 2002/06/06 10:05:20
Modified: src/java/org/apache/maven/jelly AntBuildTag.java PomTag.java
MavenTagLibrary.java
Log:
CheckStyle format issues
Revision Changes Path
1.4 +28 -31
jakarta-turbine-maven/src/java/org/apache/maven/jelly/AntBuildTag.java
Index: AntBuildTag.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/AntBuildTag.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AntBuildTag.java 5 Jun 2002 15:06:45 -0000 1.3
+++ AntBuildTag.java 6 Jun 2002 17:05:20 -0000 1.4
@@ -59,19 +59,14 @@
import java.io.File;
import java.io.PrintStream;
-import java.util.Enumeration;
-import java.util.Properties;
-import java.util.Vector;
import java.util.Hashtable;
-import org.apache.commons.jelly.JellyContext;
import org.apache.commons.jelly.MissingAttributeException;
import org.apache.commons.jelly.TagSupport;
import org.apache.commons.jelly.XMLOutput;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.ProjectHelper;
-import org.apache.tools.ant.Target;
import org.apache.tools.ant.BuildLogger;
import org.apache.tools.ant.NoBannerLogger;
import org.apache.tools.ant.BuildException;
@@ -146,7 +141,7 @@
public void setIgnore(String ignore)
{
- if ( "true".equals( ignore ) )
+ if ("true".equals(ignore))
{
this.ignore = true;
}
@@ -171,7 +166,7 @@
// before processing.
if (buildFile == null
&&
- context.getVariable( "ant-project" ) == null )
+ context.getVariable("ant-project") == null)
{
throw new MissingAttributeException("buildFile");
}
@@ -191,74 +186,76 @@
{
Project project = null;
- if (getBuildFile() != null )
+ if (getBuildFile() != null)
{
project = new Project();
BuildLogger logger = new NoBannerLogger();
- logger.setMessageOutputLevel( Project.MSG_VERBOSE );
- logger.setOutputPrintStream( System.out );
- logger.setErrorPrintStream( System.err);
+ logger.setMessageOutputLevel(Project.MSG_VERBOSE);
+ logger.setOutputPrintStream(System.out);
+ logger.setErrorPrintStream(System.err);
- project.addBuildListener( logger );
+ project.addBuildListener(logger);
project.init();
- File buildFile = new File( getBuildFile() );
+ File buildFile = new File(getBuildFile());
- project.setUserProperty("ant.file" , buildFile.getAbsolutePath() );
+ project.setUserProperty("ant.file",
+ buildFile.getAbsolutePath());
- Class.forName( "javax.xml.parsers.SAXParserFactory" );
+ Class.forName("javax.xml.parsers.SAXParserFactory");
- ProjectHelper.configureProject( project,
- buildFile );
+ ProjectHelper.configureProject(project,
+ buildFile);
}
else
{
- project = (Project) context.getVariable( "ant-project" );
+ project = (Project) context.getVariable("ant-project");
}
Hashtable projTargets = project.getTargets();
String target = getTarget();
- if ( target == null )
+ if (target == null)
{
target = project.getDefaultTarget();
}
else
{
- if ( ! projTargets.containsKey( getTarget() ) )
+ if (!projTargets.containsKey(getTarget()))
{
target = null;
}
}
- if ( target != null )
+ if (target != null)
{
try
{
- project.executeTarget( target );
- getContext().setVariable( "target_status",
- "ok" );
+ project.executeTarget(target);
+ getContext().setVariable("target_status",
+ "ok");
}
catch (BuildException e)
{
- getContext().setVariable( "target_status",
- "failed" );
+ getContext().setVariable("target_status",
+ "failed");
}
}
else
{
- getContext().setVariable( "target_status",
- "unknown_target" );
+ getContext().setVariable("target_status",
+ "unknown_target");
- if ( ! getIgnore() )
+ if (!getIgnore())
{
- throw new Exception( "No target \"" + target + "\" in " +
project.getUserProperty( "ant.file" ) );
+ throw new Exception("No target \"" + target + "\" in " +
+ project.getUserProperty("ant.file"));
}
}
}
- catch( Exception e )
+ catch (Exception e)
{
e.printStackTrace();
}
1.5 +6 -5
jakarta-turbine-maven/src/java/org/apache/maven/jelly/PomTag.java
Index: PomTag.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/PomTag.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PomTag.java 4 Jun 2002 03:38:31 -0000 1.4
+++ PomTag.java 6 Jun 2002 17:05:20 -0000 1.5
@@ -56,9 +56,6 @@
* ====================================================================
*/
-import java.io.File;
-
-import org.apache.commons.jelly.JellyContext;
import org.apache.commons.jelly.MissingAttributeException;
import org.apache.commons.jelly.TagSupport;
import org.apache.commons.jelly.XMLOutput;
@@ -74,7 +71,7 @@
* only parsed once in a given Jelly script?
*
* @author <a href="[EMAIL PROTECTED]">Jason van Zyl</a>
- * @version $Id: PomTag.java,v 1.4 2002/06/04 03:38:31 jvanzyl Exp $
+ * @version $Id: PomTag.java,v 1.5 2002/06/06 17:05:20 dion Exp $
*/
public class PomTag
extends TagSupport
@@ -91,6 +88,7 @@
/**
* Set Maven project descriptor.
+ * @param projectDescriptor the file name of the maven project descriptor
*/
public void setProjectDescriptor(String projectDescriptor)
{
@@ -98,7 +96,10 @@
}
/**
- * Description of the Method
+ * Perform functionality provided by the tag
+ * @param output the place to write output
+ * @throws Exception when the projectDescriptor attribute is missing, or
+ * another error occurs
*/
public void doTag(XMLOutput output)
throws Exception
1.6 +9 -5
jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenTagLibrary.java
Index: MavenTagLibrary.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenTagLibrary.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- MavenTagLibrary.java 5 Jun 2002 15:06:45 -0000 1.5
+++ MavenTagLibrary.java 6 Jun 2002 17:05:20 -0000 1.6
@@ -62,16 +62,20 @@
* Maven tag library for use in Jelly scripts.
*
* @author <a href="[EMAIL PROTECTED]">Jason van Zyl</a>
- * @version $Id: MavenTagLibrary.java,v 1.5 2002/06/05 15:06:45 werken Exp $
+ * @version $Id: MavenTagLibrary.java,v 1.6 2002/06/06 17:05:20 dion Exp $
*/
public class MavenTagLibrary
extends CoreTagLibrary
{
+ /**
+ * Create an instance of the {@link MavenTagLibrary}, registering
+ * related tag libraries
+ */
public MavenTagLibrary()
{
- registerTag( "pom", PomTag.class );
- registerTag( "build", AntBuildTag.class );
- registerTag( "init", MavenInitTag.class );
- registerTag( "maven", MavenTargetTag.class );
+ registerTag("pom", PomTag.class);
+ registerTag("build", AntBuildTag.class);
+ registerTag("init", MavenInitTag.class);
+ registerTag("maven", MavenTargetTag.class);
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>