[jboss-svn-commits] JBL Code SVN: r35122 - labs/jbossrules/trunk.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Sep 13 08:05:52 EDT 2010


Author: ge0ffrey
Date: 2010-09-13 08:05:52 -0400 (Mon, 13 Sep 2010)
New Revision: 35122

Modified:
   labs/jbossrules/trunk/README.txt
Log:
document howto set indent properly and how to set license headers


Modified: labs/jbossrules/trunk/README.txt
===================================================================
--- labs/jbossrules/trunk/README.txt	2010-09-13 11:43:43 UTC (rev 35121)
+++ labs/jbossrules/trunk/README.txt	2010-09-13 12:05:52 UTC (rev 35122)
@@ -1,6 +1,11 @@
 Welcome to Drools
------------------
+=================
 
+Read this document if you want to build or contribute to the drools project.
+
+Building with maven
+===================
+
 Drools uses maven to build the system. There are two profiles available which
 enable the associated modules "documentation" and "eclipse"; this enables
 quicker building of the core modules for developers. The eclipse profile will
@@ -9,16 +14,12 @@
 download into another location and specify it with
 -DlocalEclipseDrop=/folder/jboss-rules/local-eclipse-drop-mirror.
 
-NOTE: you MUST use maven version 2.0.9 or 2.0.10 to build because of surefire
-maven plugin classpath problems.
-
 The following builds all the jars, the documentation and the eclipse zip with a
 local folder specified to avoid downloading eclipse:
  mvn -Declipse -Ddocumentation clean install 
      -DlocalEclipseDrop=/folder/jboss-rules/local-eclipse-drop-mirror
 
-You can produce distribution builds, which puts everything into zips, as
-follows:
+You can produce distribution builds, which puts everything into zips, as follows:
 mvn -Declipse -Ddocumentation clean install
     -DlocalEclipseDrop=/folder/jboss-rules/local-eclipse-drop-mirror
 mvn -Ddocumentation -Declipse -DskipTests package javadoc:javadoc assembly:assembly 
@@ -31,11 +32,111 @@
 the following command worked well:
 set MAVEN_OPTS=-Xmx512m
 
+Configuring Eclipse
+===================
+
+Code style
+----------
+
+Correct number of spaces for tabs:
+- Open menu "Window", menu item "Preferences".
+
+- Open tree item "Java", tree item "Code Style", tree item "Formatter".
+-- If you imported the trunk/eclipse-formatter.xml file,
+  you don't need to set it here, but you do need to set it for XML
+-- Click button "Edit" of the active profile
+-- Tab "Indentation"
+--- Combobox "Tab policy": spaces only
+--- Indentation size: 4
+--- Tab size: 4
+-- You might need to change the name of the active profile with the top textfield
+
+- Open tree item "XML", tree item "XML Files", tree item "Editor".
+-- Radio button "Indent using space": on
+-- Indentation size: 2
+
+License header
+--------------
+
+Eclipse JEE Helios currently has no build-in support of license headers,
+but you can configure it for new files.
+- Open menu "Window", menu item "Preferences".
+- Open tree item "Java", tree item "Code Style", tree item "Copy templates".
+-- Open tree item "Comments", tree item "Files".
+-- Replace the text area with this:
+/*
+ * Copyright 2010 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-- Do not start or end with a newline character
+-- Update the year (2010) every year.
+
+Configuring IntelliJ
+====================
+
+--
+Code style
+----------
+
+Correct number of spaces for tabs:
+- Open menu "File", menu item "Settings".
+- Open tree item "Code Style", tree item "General".
+- Open tab "Java"
+-- Checkbox "Use tab character": off
+-- Textfield "Tab size": 4
+-- Textfield "Indent": 4
+-- Textfield "Continuation indent": 8
+- Open tab "XML"
+-- Checkbox "Use tab character": off
+-- Textfield "Tab size": 2
+-- Textfield "Indent": 2
+-- Textfield "Continuation indent": 4
+
+License header
+--------------
+
+- Open menu "File", menu item "Settings".
+- Open tree item "Copyright", tree item "Copyright profiles".
+- Add Copyright profile
+-- Textfield name: JBoss Inc
+-- Fill this into the text area:
+Copyright $today.year JBoss Inc
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-- Do not start or end with a newline character
+- Open tree item "Copyright"
+-- Combobox "Default project copyright": JBoss Inc
+
+Other notes
+===========
+
 If you have a ydoc license then you can build the javadocs with uml images using the ydoc doclet. 
 Simple add the following to the mvn command line:
 -Dydoc.home=<path to ydoc>
 
-KNOWN PROBLEMS:
+Known problems
+==============
 
 * Functions can't be called from MVEL code blocks. Although, static methods
 from previously existing classes are working fine.



More information about the jboss-svn-commits mailing list