You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jd...@apache.org on 2011/05/03 23:09:37 UTC

svn commit: r1099248 - in /wicket/trunk: build.gradle settings.gradle

Author: jdonnerstag
Date: Tue May  3 21:09:37 2011
New Revision: 1099248

URL: http://svn.apache.org/viewvc?rev=1099248&view=rev
Log:
experimental gradle build files

Added:
    wicket/trunk/build.gradle
    wicket/trunk/settings.gradle

Added: wicket/trunk/build.gradle
URL: http://svn.apache.org/viewvc/wicket/trunk/build.gradle?rev=1099248&view=auto
==============================================================================
--- wicket/trunk/build.gradle (added)
+++ wicket/trunk/build.gradle Tue May  3 21:09:37 2011
@@ -0,0 +1,204 @@
+// ----------------------------------------------------------------------------
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You 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.
+// ----------------------------------------------------------------------------
+// Wicket Gradle build file
+// 
+// @author Juergen Donnerstag
+// ----------------------------------------------------------------------------
+
+// A convenience method that calls the dependsOn method of the parent project 
+// for every child project (not every sub project). It declares an execution 
+// dependency on all children. 
+dependsOnChildren()
+
+// For testing purposes 
+/*
+def localReleaseRepo = new File("${System.properties.'user.home'}/local-gradle-repository/release").toURL().toString()
+def localSnapshotRepo = new File("${System.properties.'user.home'}/local-gradle-repository/snapshot").toURL().toString()
+*/
+
+// The root project is like a container and the subprojects method iterates 
+// over the elements of this container - the projects in this instance, but 
+// not deep subprojects - and injects the specified configuration. This way 
+// we can easily define some common dependencies
+subprojects { prj ->
+	apply plugin: 'java'
+	apply plugin: 'maven'
+	// apply plugin: 'code-quality'
+	// apply plugin: 'project-reports'
+	
+	// Wicket Maven group and version 
+	group = 'org.apache.wicket'
+	version = '1.5'
+	if(!System.properties.'release') {
+		version = version + '-SNAPSHOT'
+	}
+
+	/*
+	gradle.taskGraph.whenReady {taskGraph ->
+		if (taskGraph.hasTask(':release')) {
+			version = '1.5'
+		} else {
+			version = '1.5-SNAPSHOT'
+		}
+	}
+	*/	
+
+	// Subproject "wicket" is only used to build the uber jars. No need to have eclipse project files
+	if (prj.name != "wicket") {
+		apply plugin: 'eclipse'
+		apply plugin: 'idea'
+
+		// We don't need / want the WTP/WST natures and facets
+		prj.eclipseProject.whenConfigured { p ->
+			p.natures.removeAll 'org.eclipse.wst.common.project.facet.core.nature', 'org.eclipse.wst.common.modulecore.ModuleCoreNature', 'org.eclipse.jem.workbench.JavaEMFNature'
+			
+			p.buildCommands.removeAll { it.name.startsWith('org.eclipse.wst.') }
+		}	
+
+		// No need to create .settings/org.eclipse.wst.* files either
+		prj.tasks.all { if(it.name.contains('eclipseWtp')) { it.enabled = false }}
+
+		// org.eclipse.jdt.core.prefs is provided via SVN. No need for gradle to modify them
+		prj.tasks.all { if(it.name.contains('eclipseJdt')) { it.enabled = false }}
+		prj.tasks.all { if(it.name.contains('cleanEclipseJdt')) { it.enabled = false }}
+	}
+	
+	// Use maven output dir
+	setBuildDir 'target'
+
+	sourceCompatibility = 1.5
+	targetCompatibility = 1.5
+
+	compileJava.options.compilerArgs = ['-Xlint:unchecked', '-Xlint:deprecation', '-g']
+	
+	// We have plenty of *.html, *.xml and *.properties files which we want to 
+	// copy/forward, like we do for *.java files.
+	sourceSets.main.resources.srcDir 'src/main/java' 
+	sourceSets.test.resources.srcDir 'src/test/java' 
+
+	task packageTests(type: Jar) {
+		from sourceSets.test.classes
+		classifier = 'tests'
+	}
+
+	artifacts.archives packageTests
+
+	task sourceJar(type: Jar) { from sourceSets.main.allSource; classifier = 'source' }
+	task javadocJar(type: Jar) { from javadoc.outputs.files; classifier = 'javadoc' }
+	artifacts { archives sourceJar, javadocJar }
+  
+	repositories {
+		mavenLocal()
+		mavenCentral()
+	
+		// Add the Apache snapshot maven repository
+		mavenRepo urls: ["http://repository.apache.org/snapshots"]
+
+		// mavenRepo urls: localReleaseRepo
+        // mavenRepo urls: localSnapshotRepo	
+	}
+
+	dependencies {
+		compile "org.slf4j:slf4j-api:1.6.1"
+		testCompile "org.slf4j:slf4j-log4j12:1.6.1"
+		testCompile "org.slf4j:jcl-over-slf4j:1.6.1"
+
+		compile("javax.servlet:servlet-api:2.5") {
+			// Not available in any maven repo
+			provided : true
+		}
+	
+		testCompile "junit:junit:4.8.2"
+		testCompile "org.mockito:mockito-all:1.8.5"
+	}
+	
+	// TODO Should this maven config be per module or wicket "root" only??
+	configure(install.repositories.mavenInstaller) {
+		pom.project {
+			description = 'Wicket is a Java-based open source component web application framework.'
+			url = 'http://wicket.apache.org/'
+			inceptionYear = '2004'
+					
+			organization {
+				name 'Apache Software Foundation'
+				url 'http://apache.org'
+			}
+
+			licenses {
+				license {
+					name 'The Apache Software License, Version 2.0'
+					url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+					distribution 'repo'
+				}
+			}
+
+			issueManagement {
+				system 'jira'
+				url 'http://issues.apache.org/jira/browse/WICKET'
+			}
+			
+			ciManagement {
+				system 'hudson'
+				url 'https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/'
+			}
+
+			scm {
+				connection 'scm:svn:http://svn.apache.org/repos/asf/wicket/releases/1.5-SNAPSHOT'
+				developerConnection 'scm:svn:https://svn.apache.org/repos/asf/wicket/releases/1.5-SNAPSHOT'
+				url 'http://svn.apache.org/viewvc/wicket/releases/1.5-SNAPSHOT'
+			}
+
+			mailingLists {
+				mailingList {
+					name 'Wicket Announcements List'
+					post 'announce@wicket.apache.org'
+					subscribe 'announce-subscribe@wicket.apache.org'
+					unsubscribe 'announce-unsubscribe@wicket.apache.org'
+					archive 'http://www.nabble.com/Wicket---Announce-f13975.html'
+				}
+				
+				mailingList {
+					name 'Wicket User List'
+					post 'users@wicket.apache.org'
+					subscribe 'users-subscribe@wicket.apache.org'
+					unsubscribe 'users-unsubscribe@wicket.apache.org'
+					archive 'http://www.nabble.com/Wicket---User-f13976.html'
+				}
+
+				mailingList {
+					name 'Wicket Development List'
+					post 'dev@wicket.apache.org'
+					subscribe 'dev-subscribe@wicket.apache.org'
+					unsubscribe 'dev-unsubscribe@wicket.apache.org'
+					archive 'http://www.nabble.com/Wicket---Dev-f13977.html'
+				}
+
+				mailingList {
+					name 'Wicket commit List'
+					subscribe 'commits-subscribe@wicket.apache.org'
+					unsubscribe 'commits-unsubscribe@wicket.apache.org'
+					archive 'http://mail-archives.apache.org/mod_mbox/wicket-commits/'
+				}
+			}
+
+			properties {
+				'project.build.sourceEncoding' 'UTF-8'
+				'project.reporting.outputEncoding' 'UTF-8'
+			}	
+		}
+	}
+}

Added: wicket/trunk/settings.gradle
URL: http://svn.apache.org/viewvc/wicket/trunk/settings.gradle?rev=1099248&view=auto
==============================================================================
--- wicket/trunk/settings.gradle (added)
+++ wicket/trunk/settings.gradle Tue May  3 21:09:37 2011
@@ -0,0 +1,2 @@
+
+include 'wicket-util', 'wicket-request', 'wicket-core', 'wicket-datetime', 'wicket-devutils', 'wicket-extensions', 'wicket-ioc', 'wicket-spring', 'wicket-velocity', 'wicket-auth-roles', 'wicket-guice', 'wicket-jmx', 'wicket-objectsizeof-agent', 'wicket-examples', 'wicket-archetype-quickstart', 'wicket-threadtest', 'wicket'