Author: vsiveton
Date: Thu Jul 3 13:47:36 2008
New Revision: 673794
URL: http://svn.apache.org/viewvc?rev=673794&view=rev
Log:
o improved code style and convention
Modified:
maven/site/trunk/src/site/apt/developers/conventions/code.apt
Modified: maven/site/trunk/src/site/apt/developers/conventions/code.apt
URL:
http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/developers/conventions/code.apt?rev=673794&r1=673793&r2=673794&view=diff
==============================================================================
--- maven/site/trunk/src/site/apt/developers/conventions/code.apt (original)
+++ maven/site/trunk/src/site/apt/developers/conventions/code.apt Thu Jul 3
13:47:36 2008
@@ -64,6 +64,68 @@
* <<Blocks>>: Always enclose with a new line brace.
+ * <<Readingness>>: Specify code grouping members, if needed. For instance in
a MOJO, you could have:
+
++-----+
+public class MyPlugin
+{
+ // ----------------------------------------------------------------------
+ // Mojo components
+ // ----------------------------------------------------------------------
+
+ /**
+ * Artifact factory.
+ *
+ * @component
+ */
+ private ArtifactFactory artifactFactory;
+
+ ...
+
+ // ----------------------------------------------------------------------
+ // Mojo parameters
+ // ----------------------------------------------------------------------
+
+ /**
+ * The POM.
+ *
+ * @parameter expression="${project}"
+ * @required
+ */
+ private MavenProject project;
+
+ ...
+
+ // ----------------------------------------------------------------------
+ // Plugin options
+ // ----------------------------------------------------------------------
+ ...
+
+ // ----------------------------------------------------------------------
+ // Public methods
+ // ----------------------------------------------------------------------
+
+ /**
+ * [EMAIL PROTECTED]
+ */
+ public void execute()
+ throws MojoExecutionException
+ {
+ ...
+ }
+
+ // ----------------------------------------------------------------------
+ // Private methods
+ // ----------------------------------------------------------------------
+ ...
+
+ // ----------------------------------------------------------------------
+ // Static methods
+ // ----------------------------------------------------------------------
+ ...
+}
++-----+
+
* <<Indentation>>: Always use 2 space indents, unless you're wrapping a line
in which case you should indent 4 spaces
or indent to line up arguments.
@@ -112,6 +174,10 @@
[]
+** {JavaDoc Convention}
+
+ TO BE DISCUSSED
+
* {XML}
** {XML Code Style}