incubator-kitty-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pids...@apache.org
Subject svn commit: r1128889 - in /incubator/kitty/trunk: build.gradle src/main/java/org/apache/kitty/Main.groovy src/main/java/org/apache/kitty/client/Client.groovy
Date Sun, 29 May 2011 15:22:25 GMT
Author: pidster
Date: Sun May 29 15:22:25 2011
New Revision: 1128889

URL: http://svn.apache.org/viewvc?rev=1128889&view=rev
Log:
fixes for KITTY-18 and some updates to build

Modified:
    incubator/kitty/trunk/build.gradle
    incubator/kitty/trunk/src/main/java/org/apache/kitty/Main.groovy
    incubator/kitty/trunk/src/main/java/org/apache/kitty/client/Client.groovy

Modified: incubator/kitty/trunk/build.gradle
URL: http://svn.apache.org/viewvc/incubator/kitty/trunk/build.gradle?rev=1128889&r1=1128888&r2=1128889&view=diff
==============================================================================
--- incubator/kitty/trunk/build.gradle (original)
+++ incubator/kitty/trunk/build.gradle Sun May 29 15:22:25 2011
@@ -15,20 +15,22 @@
   limitations under the License.
 */
 
-apply plugin: 'eclipse'		// adds support for eclipse project generation
-apply plugin: 'idea'		// adds support for idea project generation
-apply plugin: 'java'		// adds support for java
-apply plugin: 'groovy'		// adds support for groovy
-apply plugin: 'application'	// adds support for building the app
+apply plugin: 'eclipse'			// adds support for eclipse project generation
+apply plugin: 'idea'			// adds support for idea project generation
+apply plugin: 'java'			// adds support for java
+apply plugin: 'groovy'			// adds support for groovy
+apply plugin: 'application'		// adds support for building the app
+apply plugin: 'code-quality'	// adds support for code analysis
 
 defaultTasks 'assemble'
 
 // --------------------------------------------------------------------
 // standard config
-version = '0.1-SNAPSHOT'
-applicationName = 'apache-kitty'
+
 title = 'Apache Kitty (Incubating)'
 description = 'This is the Apache Kitty Gradle build script'
+version = '0.1-SNAPSHOT'
+applicationName = 'apache-kitty'
 
 // --------------------------------------------------------------------
 // dependency versions
@@ -40,6 +42,7 @@ junitVersion = '4.8.2'
 accliVersion = '1.2'
 aclangVersion = '2.6'
 aclogVersion = '1.1.1'
+aRatVersion = '0.7'
 
 // --------------------------------------------------------------------
 // configuration setup
@@ -55,14 +58,19 @@ allprojects {
 }
 
 dependencies {
-	groovy group: 'org.codehaus.groovy', name: 'groovy', version: "$groovyVersion"
+	groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: "$groovyVersion"
 	groovy group: 'jline', name: 'jline', version: "$jlineVersion"
 	groovy group: 'commons-cli', name: 'commons-cli', version: "$accliVersion"
+	
 	compile group: 'commons-lang', name: 'commons-lang', version: "$aclangVersion"
 	compile group: 'commons-logging', name: 'commons-logging', version: "$aclogVersion"
+	
+	testCompile group: 'org.apache.rat', name: 'apache-rat-plugin', version: "$aRatVersion"

 	testCompile group: 'junit', name: 'junit', version: "$junitVersion"
 }
 
+configurations.runtime.each { File f -> println f }
+
 // --------------------------------------------------------------------
 // java plugin config
 
@@ -92,6 +100,10 @@ jar {
 	}
 }
 
+check {
+	
+}
+
 // --------------------------------------------------------------------
 // application plugin config
 
@@ -105,11 +117,32 @@ distZip {
 // --------------------------------------------------------------------
 // task definitions
 
-task gradleWrapper(type: Wrapper) {
+
+//task checkstyle(type: Checkstyle) << {
+//	ignoreFailures = true
+//}
+//
+//task codeNarc(type: CodeNarc) << {
+//	ignoreFailures = false
+//	includes = "**/*.groovy"
+//	source = 'src/main/java'
+//}
+
+
+task gradleWrapper(type: Wrapper, description: "Kitty Task: Create a Gradle self-download
wrapper") {
 	gradleVersion = "$gradleVersion"
 	jarPath = 'gradle/wrapper'
 }
 
-task kittyDist(dependsOn: [build, test, javadoc, groovydoc, distZip]) << {
-	println 'Building distribution...'
+task kittyClean(dependsOn: [clean], description: "Kitty Task: Clean the build directory")
<< {
+
+}
+
+task kittyDocs(dependsOn: [javadoc, groovydoc], description: "Kitty Task: Build all documentation")
<< {
+
+}
+
+task kittyDist(dependsOn: [build, test, javadoc, groovydoc, distZip], description: "Kitty
Task: Build, test, check and document in preparation for a release") << {
+
+	println 'Built distribution... OK'
 }

Modified: incubator/kitty/trunk/src/main/java/org/apache/kitty/Main.groovy
URL: http://svn.apache.org/viewvc/incubator/kitty/trunk/src/main/java/org/apache/kitty/Main.groovy?rev=1128889&r1=1128888&r2=1128889&view=diff
==============================================================================
--- incubator/kitty/trunk/src/main/java/org/apache/kitty/Main.groovy (original)
+++ incubator/kitty/trunk/src/main/java/org/apache/kitty/Main.groovy Sun May 29 15:22:25 2011
@@ -47,6 +47,8 @@ class Main {
 		 */
 
 		def opt = cli.parse(args)
+		
+		opt.
 
 		if (opt?.h) {
 			cli.usage()

Modified: incubator/kitty/trunk/src/main/java/org/apache/kitty/client/Client.groovy
URL: http://svn.apache.org/viewvc/incubator/kitty/trunk/src/main/java/org/apache/kitty/client/Client.groovy?rev=1128889&r1=1128888&r2=1128889&view=diff
==============================================================================
--- incubator/kitty/trunk/src/main/java/org/apache/kitty/client/Client.groovy (original)
+++ incubator/kitty/trunk/src/main/java/org/apache/kitty/client/Client.groovy Sun May 29 15:22:25
2011
@@ -54,7 +54,7 @@ class Client {
 	def mbean
 
 	public connect(def _host, def _port) {
-		//TODO
+		// TODO
 		def serviceURL
 		def properties = new HashMap()
 		if (remote != null)
@@ -233,7 +233,7 @@ class Client {
 		if (this.remote) {
 			if (this.domain) {
 				if (path == "..") {
-					if (this.mBeansPath.length()) {
+					if (this.mBeansPath.size()) {
 						this.mBeansPath.pop()
 					}
 				}
@@ -297,9 +297,9 @@ class Client {
 				else {
 					writable = "N"
 				}
-				println "ObjectName :" + objectName
-				println "Attribute  :" + attr.getName()
-				println "Value      :"  + valueStr
+				println "ObjectName : " + objectName
+				println "Attribute  : " + attr.getName()
+				println "Value      : " + valueStr
 				println "isReadable : " + readable
 				println "isWritable : " + writable
 			}
@@ -316,7 +316,7 @@ class Client {
 				def objectName = this.domain + ":"
 				def attr
 
-				if (this.mBeansPath.length() > 0) {
+				if (this.mBeansPath.size() > 0) {
 					objectName = objectName + ','.concat(this.mBeansPath.join())
 				}
 				try {
@@ -360,7 +360,7 @@ class Client {
 		if (this.remote) {
 			if (this.domain) {
 				def objectName = this.domain + ":"
-				if (this.mBeansPath.length()) {
+				if (this.mBeansPath.size()) {
 					objectName = objectName + ','.concat(this.mBeansPath.join())
 				}
 				try{



Mime
View raw message