Revision: 40
Author:
mohit...@vedantatree.com
Date: Sat Mar 29 14:16:02 2014 UTC
Log: Migrating build to Gradle. It is more user friendly and flexible.
pom.xml still exists for some more time
Adding some plugins for code quality check, in progress. No impact on code.
http://code.google.com/p/expressionoasis/source/detail?r=40
Added:
/trunk/build.gradle
/trunk/config
/trunk/config/checkstyle
/trunk/config/checkstyle/checkstyle.xml
/trunk/src/main/resources
Deleted:
/trunk/.classpath
/trunk/.settings
/trunk/src/main/config
Modified:
/trunk
/trunk/pom.xml
=======================================
--- /dev/null
+++ /trunk/build.gradle Sat Mar 29 14:16:02 2014 UTC
@@ -0,0 +1,47 @@
+/*
+* use 'gradle eclipse' for generating eclipse project file
+* use 'gradle javadoc' to generate the api docs in 'build/docs/javadoc'
folder
+* use 'gradle test' to run the junit test cases
+* use 'gradle build' to run the complete build
+* use 'gradle tasks' to see the available tasks
+*/
+
+apply plugin: 'java'
+
+// run 'gradle eclipse' command to generate eclipse project files
+apply plugin: 'eclipse'
+
+apply plugin: 'checkstyle'
+
+sourceCompatibility = 1.7
+
+repositories {
+ mavenCentral()
+}
+
+// Task to create the jar for expressionoasis
+jar {
+ baseName = 'expressionoasis'
+ version = '3.2.0'
+}
+
+// Define dependencies here
+dependencies {
+ compile fileTree(dir: 'lib', include: '*.jar')
+ compile (
+ [group: 'commons-logging', name: 'commons-logging', version: '1.1.3'],
+ [group: 'log4j', name: 'log4j', version: '1.2.17'],
+ [group: 'org.simpleframework', name: 'simple-xml', version: '2.3.6'],
+ [group: 'xerces', name: 'xercesImpl', version: '2.7.1'],
+ [group: 'xalan', name: 'xalan', version: '2.6.0'],
+ [group: 'javassist', name: 'javassist', version: '
3.8.0.GA'],
+ [group: 'junit', name: 'junit', version: '4.8.1']
+ )
+ //runtime files('lib/a.jar', 'lib/b.jar')
+ //compile files('lib/local-dependency.jar')
+}
+
+// To run the gradle build without installing gradle
+//task wrapper(type: Wrapper) {
+// gradleVersion = '1.11'
+//}
=======================================
--- /dev/null
+++ /trunk/config/checkstyle/checkstyle.xml Sat Mar 29 14:16:02 2014 UTC
@@ -0,0 +1,424 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+ "
http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+<module name="Checker">
+
+ <!-- Checks that a package.html file exists for each package. -->
+ <module name="PackageHtml"/>
+
+ <!-- Checks whether files end with a new line. -->
+ <module name="NewlineAtEndOfFile"/>
+
+ <!-- Checks that property files contain the same keys. -->
+ <module name="Translation"/>
+
+ <module name="TreeWalker">
+
+ <!-- Javadoc for class/interface must be present/valid. -->
+ <!-- Require author to be present. -->
+ <module name="JavadocType">
+ <property name="authorFormat" value="\S"/>
+ </module>
+
+ <!-- Javadoc for methods must be present/valid. -->
+ <module name="JavadocMethod">
+ <property name="allowUndeclaredRTE" value="true"/>
+ </module>
+
+ <!-- Javadoc for class variables must be present/valid. -->
+ <module name="JavadocVariable"/>
+
+ <!-- Javadoc must be well-formed. -->
+ <module name="JavadocStyle"/>
+
+ <!-- Naming conventions for packages. -->
+ <module name="PackageName">
+ <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
+ </module>
+
+ <!-- Naming conventions for classes and interfaces. -->
+ <module name="TypeName"/>
+
+ <!-- Naming conventions for constants. -->
+ <!-- TODO: Problem with this is that it should cover basic -->
+ <!-- types only, and not names like instance_ and logger_ etc. -->
+ <!--
+ <module name="ConstantName"/>
+ -->
+
+ <!-- Naming conventions for class variables. -->
+ <module name="MemberName">
+ <property name="format" value="^[a-z][a-zA-Z0-9]*_$"/>
+ </module>
+
+ <!-- Naming conventions local variables. -->
+ <module name="LocalFinalVariableName"/>
+ <module name="LocalVariableName"/>
+ <module name="ParameterName"/>
+
+ <module name="StaticVariableName">
+ <property name="format" value="^[a-z][a-zA-Z0-9]*_$"/>
+ </module>
+
+ <!-- Avoid start imports -->
+ <module name="AvoidStarImport"/>
+
+ <!-- Avoid imports of the sun.* packages -->
+ <module name="IllegalImport"/>
+
+ <!-- Avoid redundant imports -->
+ <module name="RedundantImport"/>
+
+ <!-- Avoid unused imports -->
+ <module name="UnusedImports"/>
+
+ <!-- Ensure certian import order -->
+ <module name="ImportOrder">
+ <property name="groups" value="java,javax"/>
+ <property name="ordered" value="true"/>
+ <property name="separated" value="true"/>
+ </module>
+
+ <!-- Lines should be maximum of 80 characters -->
+ <module name="LineLength">
+ <property name="max" value="80"/>
+ </module>
+
+ <!-- -->
+ <module name="MethodParamPad"/>
+
+ <!-- No whitespace after selected tokens -->
+ <module name="NoWhitespaceAfter"/>
+
+ <!-- -->
+ <module name="NoWhitespaceBefore"/>
+
+ <!-- -->
+ <module name="OperatorWrap">
+ <property name="tokens" value="ASSIGN,
+ BAND,
+ BAND_ASSIGN,
+ BOR,
+ BOR_ASSIGN,
+ BSR,
+ BSR_ASSIGN,
+ BXOR,
+ BXOR_ASSIGN,
+ COLON,
+ DIV,
+ DIV_ASSIGN,
+ EQUAL,
+ GE,
+ GT,
+ LAND,
+ LE,
+ LITERAL_INSTANCEOF,
+ LOR,
+ LT,
+ MINUS,
+ MINUS_ASSIGN,
+ MOD,
+ MOD_ASSIGN,
+ NOT_EQUAL,
+ PLUS,
+ PLUS_ASSIGN,
+ QUESTION,
+ SL,
+ SL_ASSIGN,
+ SR,
+ SR_ASSIGN,
+ STAR,
+ STAR_ASSIGN"/>
+ <property name="option" value="eol"/>
+ </module>
+
+ <!-- -->
+ <module name="ParenPad"/>
+
+ <!-- No space in a case oparation "(int)" not "( int )" -->
+ <module name="TypecastParenPad">
+ <property name="option" value="nospace"/>
+ </module>
+
+ <!-- Avoid tab chacraters in the code -->
+ <module name="TabCharacter"/>
+
+ <!-- Space after comma, semicolon and casts -->
+ <module name="WhitespaceAfter">
+ <property name="tokens" value="COMMA,
+ SEMI,
+ TYPECAST"/>
+ </module>
+
+ <!-- Ensure whitespace around all operators other than -->
+ <!-- GENERIC_START and GENERIC_END -->
+ <module name="WhitespaceAround">
+ <property name="tokens" value="ASSIGN,
+ BAND,
+ BAND_ASSIGN,
+ BOR,
+ BOR_ASSIGN,
+ BSR,
+ BSR_ASSIGN,
+ BXOR,
+ BXOR_ASSIGN,
+ COLON,
+ DIV,
+ DIV_ASSIGN,
+ EQUAL,
+ GE,
+ GT,
+ LAND,
+ LCURLY,
+ LE,
+ LITERAL_ASSERT,
+ LITERAL_CATCH,
+ LITERAL_DO,
+ LITERAL_ELSE,
+ LITERAL_FINALLY,
+ LITERAL_FOR,
+ LITERAL_IF,
+ LITERAL_RETURN,
+ LITERAL_SYNCHRONIZED,
+ LITERAL_TRY,
+ LITERAL_WHILE,
+ LOR,
+ LT,
+ MINUS,
+ MINUS_ASSIGN,
+ MOD,
+ MOD_ASSIGN,
+ NOT_EQUAL,
+ PLUS,
+ PLUS_ASSIGN,
+ QUESTION,
+ RCURLY,
+ SL,
+ SLIST,
+ SL_ASSIGN,
+ SR,
+ SR_ASSIGN,
+ STAR,
+ STAR_ASSIGN,
+ TYPE_EXTENSION_AND,
+ WILDCARD_TYPE"/>
+ </module>
+
+ <!-- Check modifier order: -->
+ <!-- public | protected | private -->
+ <!-- abstract -->
+ <!-- static -->
+ <!-- final -->
+ <!-- transient | volatile -->
+ <!-- synchronized -->
+ <!-- native -->
+ <!-- strictfp -->
+ <module name="ModifierOrder"/>
+
+ <!-- Avoid redundant modifiers -->
+ <module name="RedundantModifier"/>
+
+ <!-- Avoid empty blocks -->
+ <module name="EmptyBlock"/>
+
+ <!-- Classes, interfaces and methods have left brace on a new line -->
+ <module name="LeftCurly">
+ <property name="option" value="nl"/>
+ <property name="maxLineLength" value="80"/>
+ <property name="tokens" value="CLASS_DEF,
+ CTOR_DEF,
+ INTERFACE_DEF,
+ METHOD_DEF"/>
+ </module>
+
+ <!-- The others have left brace at eol -->
+ <module name="LeftCurly">
+ <property name="option" value="eol"/>
+ <property name="maxLineLength" value="80"/>
+ <property name="tokens" value="LITERAL_CATCH,
+ LITERAL_DO,
+ LITERAL_ELSE,
+ LITERAL_FINALLY,
+ LITERAL_FOR,
+ LITERAL_IF,
+ LITERAL_SWITCH,
+ LITERAL_SYNCHRONIZED,
+ LITERAL_TRY,
+ LITERAL_WHILE"/>
+ </module>
+
+ <!-- TODO -->
+ <module name="RightCurly">
+ <property name="option" value="alone"/>
+ <property name="tokens" value="LITERAL_CATCH,
+ LITERAL_FINALLY,
+ LITERAL_ELSE"/>
+ </module>
+
+ <!-- Avoid nested blocks other than in switch statements -->
+ <module name="AvoidNestedBlocks">
+ <property name="allowInSwitchCase" value="true"/>
+ </module>
+
+ <!-- Checks that classes that define a covariant equals() method -->
+ <!-- also override method equals(java.lang.Object)
-->
+ <module name="CovariantEquals"/>
+
+ <!-- Avoid DCL as it doesn't work anyway -->
+ <module name="DoubleCheckedLocking"/>
+
+ <!-- Avoid empty statements -->
+ <!-- TODO: Should be alloed in empty for-loop -->
+ <module name="EmptyStatement"/>
+
+ <!-- Checks that classes that override equals() -->
+ <!-- also override hashCode() -->
+ <module name="EqualsHashCode"/>
+
+ <!-- Checks that local variables and parameters that are never -->
+ <!-- are declared final -->
+ <!--
+ <module name="FinalLocalVariable">
+ <property name="tokens" value="PARAMETER_DEF,
+ VARIABLE_DEF"/>
+ </module>
+ -->
+
+ <!-- Check that method/constructor/catch block parameters are final -->
+ <!--
+ <module name="FinalParameters"/>
+ -->
+
+ <!-- Check that a name doens't hide another name -->
+ <module name="HiddenField"/>
+
+ <!-- TODO
+ <module name="IllegalTokenText">
+ <property name="tokens" value="NUM_FLOAT,NUM_DOUBLE"/>
+ </module>
+ -->
+
+ <!-- Avoid inner assignments -->
+ <module name="InnerAssignment"/>
+
+ <!-- Require default clause in switch statements -->
+ <module name="MissingSwitchDefault"/>
+
+ <!-- Avoid modifying control variables -->
+ <module name="ModifiedControlVariable"/>
+
+ <!-- Avoid redundant throws -->
+ <module name="RedundantThrows">
+ <property name="allowUnchecked" value="true"/>
+ </module>
+
+ <!-- Require simple boolean expressions -->
+ <module name="SimplifyBooleanExpression"/>
+
+ <!-- Require simple boolean expressions -->
+ <module name="SimplifyBooleanReturn"/>
+
+ <!-- Capture string compare using == -->
+ <module name="StringLiteralEquality"/>
+
+ <!-- Checks that an overriding clone() method invokes super.clone() -->
+ <module name="SuperClone"/>
+
+ <!-- Checks that an overriding finalize() method invokes -->
+ <!-- super.finalize() -->
+ <module name="SuperFinalize"/>
+
+ <!-- Disallow catcing exception base classes -->
+ <module name="IllegalCatch"/>
+
+ <!-- Disallow throwing exception base classes -->
+ <module name="IllegalThrows"/>
+
+ <!-- Require all classes to be in a package -->
+ <module name="PackageDeclaration"/>
+
+ <!-- Ensures correct layout of JUnit test cases -->
+ <module name="JUnitTestCase"/>
+
+ <!-- Enforce the following declaration order: -->
+ <!-- 1. Class variables -->
+ <!-- 2. Instance variables -->
+ <!-- 3. Ctors -->
+ <!-- 4. Methods -->
+ <module name="DeclarationOrder"/>
+
+ <!-- Disallow parameter assignment -->
+ <module name="ParameterAssignment"/>
+
+ <!-- Avoid explicit initialization to the default value -->
+ <module name="ExplicitInitialization"/>
+
+ <!-- Ensure the default clasue is the last case in a switch -->
+ <module name="DefaultComesLast"/>
+
+ <!-- Disallow non-commented swicth fall throug -->
+ <module name="FallThrough"/>
+
+ <!-- Each variable should be declared individually -->
+ <module name="MultipleVariableDeclarations"/>
+
+ <!-- Avoid unnecessary parantheses -->
+ <module name="UnnecessaryParentheses"/>
+
+ <!-- Make sure only static finals are public -->
+ <module name="VisibilityModifier"/>
+
+ <!-- Class with private constructor must be final -->
+ <module name="FinalClass"/>
+
+ <!-- Utility classes should have private ctor -->
+ <module name="HideUtilityClassConstructor"/>
+
+ <!-- Require classes to be either abstract or final -->
+ <module name="DesignForExtension"/>
+
+ <!-- Ensures that exception classes are immutable -->
+ <module name="MutableException"/>
+
+ <!-- Flag overly complex constructions -->
+ <module name="ClassFanOutComplexity"/>
+ <module name="CyclomaticComplexity">
+ <property name="max" value="20"/>
+ </module>
+ <module name="NPathComplexity"/>
+
+ <!-- Trap trailing spaces -->
+ <module name="GenericIllegalRegexp">
+ <property name="format" value="\s+$"/>
+ <property name="message" value="Line has trailing spaces."/>
+ </module>
+
+ <!-- Identify TODOs -->
+ <module name="TodoComment">
+ <property name="format" value="TODO"/>
+ </module>
+
+ <!-- Flag uncommented main() methods (debugging left-overs) -->
+ <module name="UncommentedMain"/>
+
+ <!-- Require long constants to be defined by uppercase L -->
+ <module name="UpperEll"/>
+
+ <!-- Array brackets on type not varaible -->
+ <module name="ArrayTypeStyle"/>
+
+ <!-- Indentations -->
+ <module name="Indentation">
+ <property name="basicOffset" value="2"/>
+ <property name="braceAdjustment" value="0"/>
+ <property name="caseIndent" value="2"/>
+ </module>
+
+ <!-- Avoid trailing comments -->
+ <module name="TrailingComment"/>
+
+ </module>
+
+</module>
=======================================
--- /trunk/.classpath Tue Aug 31 15:49:23 2010 UTC
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry excluding="**" kind="src" output="target/classes"
path="src/main/config"/>
- <classpathentry kind="src" output="target/test-classes"
path="src/test/java"/>
- <classpathentry excluding="**" kind="src" output="target/test-classes"
path="src/test/resources"/>
- <classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
=======================================
--- /trunk/pom.xml Sat Feb 26 21:08:23 2011 UTC
+++ /trunk/pom.xml Sat Mar 29 14:16:02 2014 UTC
@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.vedantatree.expressionoasis</groupId>
<artifactId>ExpressionOasis</artifactId>
- <version>2.3-SNAPSHOT</version>
+ <version>3.2-SNAPSHOT</version>
<name>ExpressionOasis</name>
<build>
<plugins>