ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1726775 - in /ace/trunk: ./ build/ cnf/ cnf/gradle/ gradle/ gradle/wrapper/ org.apache.ace.gogo.servlet/ run-develop/
Date Tue, 26 Jan 2016 11:46:12 GMT
Author: jawi
Date: Tue Jan 26 11:46:12 2016
New Revision: 1726775

URL: http://svn.apache.org/viewvc?rev=1726775&view=rev
Log:
ACE-492 - Upgrade to latest Bndtools

- applied patch from @brampouwelse after some minor corrections;
- upgraded to Bndtools 3.1.1 and Gradle 2.10.


Added:
    ace/trunk/build.gradle
    ace/trunk/build/README
    ace/trunk/build/build.gradle
    ace/trunk/build/check_staged_ace_release.sh
    ace/trunk/build/rat.gradle
    ace/trunk/cnf/gradle/
    ace/trunk/cnf/gradle/biz.aQute.bnd.gradle-3.1.0.jar   (with props)
    ace/trunk/gradle/
    ace/trunk/gradle.properties
    ace/trunk/gradle/wrapper/
    ace/trunk/gradle/wrapper/gradle-wrapper.jar   (with props)
    ace/trunk/gradle/wrapper/gradle-wrapper.properties
    ace/trunk/gradlew   (with props)
    ace/trunk/gradlew.bat
    ace/trunk/settings.gradle
Modified:
    ace/trunk/   (props changed)
    ace/trunk/build/   (props changed)
    ace/trunk/cnf/bnd.bnd
    ace/trunk/org.apache.ace.gogo.servlet/bnd.bnd
    ace/trunk/run-develop/bnd.bnd

Propchange: ace/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Jan 26 11:46:12 2016
@@ -3,4 +3,5 @@ bin_test
 generated
 .metadata
 .recommenders
-
+.gradle
+rat-report.xml

Propchange: ace/trunk/build/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Jan 26 11:46:12 2016
@@ -4,4 +4,5 @@ generated
 store
 bundle-cache
 felix-cache
+staging
 .settings

Added: ace/trunk/build.gradle
URL: http://svn.apache.org/viewvc/ace/trunk/build.gradle?rev=1726775&view=auto
==============================================================================
--- ace/trunk/build.gradle (added)
+++ ace/trunk/build.gradle Tue Jan 26 11:46:12 2016
@@ -0,0 +1,48 @@
+/*
+ * Master Gradle build script
+ *
+ * Depends on bndPlugin property set by settings.gradle.
+ * and bnd_* values from gradle.properties.
+ */
+
+import aQute.bnd.build.Workspace
+import aQute.bnd.osgi.Constants
+
+/* Add bnd gradle plugin as a script dependency */
+buildscript {
+  dependencies {
+    classpath bndPlugin
+  }
+}
+
+/* Initialize the bnd workspace */
+Workspace.setDriver(Constants.BNDDRIVER_GRADLE)
+Workspace.addGestalt(Constants.GESTALT_BATCH, null)
+ext.bndWorkspace = new Workspace(rootDir, bnd_cnf)
+if (bndWorkspace == null) {
+  throw new GradleException("Unable to load workspace ${rootDir}/${bnd_cnf}")
+}
+
+ext.cnf = rootProject.project(bnd_cnf)
+
+/* Configure the subprojects */
+subprojects {
+  def bndProject = bndWorkspace.getProject(name)
+  if (bndProject != null) {
+    plugins.apply 'biz.aQute.bnd'
+    
+    dependencies {
+      testCompile files("${rootDir}/cnf/lib/testng/testng-6.5.2.jar");
+    }
+    test {
+      useTestNG()
+    }
+    
+    tasks.withType(Javadoc) {
+      options.addStringOption('Xdoclint:none', '-quiet')
+    }
+  }
+
+
+}
+

Added: ace/trunk/build/README
URL: http://svn.apache.org/viewvc/ace/trunk/build/README?rev=1726775&view=auto
==============================================================================
--- ace/trunk/build/README (added)
+++ ace/trunk/build/README Tue Jan 26 11:46:12 2016
@@ -0,0 +1,118 @@
+
+
+
+Apache Ace Release Guide 
+This document describes how to do a source release. It is based on the Release FAQ [1]
+
+Prerequisites
+=============
+
+To create a release you must:
+
+* Have Subversion installed on your system;
+* Have gpg installed on your system;
+* Have a public key added to the keys file, and committed to [2] 
+* If you are using an http proxy, configure the following:
+
+  export GRADLE_OPTS="-Dhttps.proxyHost=www.somehost.org -Dhttps.proxyPort=8080"
+
+Before you can start staging a release candidate, you must:
+
+* make sure there are no dependencies on snapshots/unreleased versions;
+* increment the version parameter in build/build.gradle, if not already done, and commit.
+* under bndtools, release (only) the bundles that needs to be released (using "Release workspace
bundles" menu).
+* create a tagged version of the sources in preparation of the release candidate.
+
+Release only the necessary bundles
+===================================
+
+Click on the bndtools "Release workspace bundles", and release the bundles that have been
modified and need to be released.
+Don't release other unmodified bundles.
+Once done, under the shell prompt, go to the "cnf/releaserepo/" directory, svn remove the
previous old released bundles,
+and svn add the new released bundles.
+refresh the repositories under bndtools, and commit.  
+
+Create a tagged version
+=======================
+
+Creating a tagged version of the sources can be done directly through svn (replace r<n>
by the actual release number, like "r1"):
+
+svn copy https://svn.apache.org/repos/asf/ace/trunk https://svn.apache.org/repos/asf/ace/releases/<version>
-m "Release of Apache Ace <version>"
+
+Staging a release candidate
+===========================
+
+Staging a release starts by checking out a tagged version of the sources (replace <version>
by the actual release version, like "2.0.0"):
+
+svn co https://svn.apache.org/repos/asf/ace/releases/<version> apache-ace-<version>
+
+The next step is to build/test the software and create the release/staging/ directory (where
the source/jars will be packaged):
+(replace <version> by the actual release number, like "2.0.0")
+
+Use a Java6 JDK
+
+$ cd apache-ace-<version>
+$ ./gradlew rat 
+$ ./gradlew build
+
+create the staging:
+
+$ ./gradlew makeStaging (this will create ./build/staging/ directory containing the signed
release archives)
+
+You can upload the archives and the signatures to our development area, which we use to stage
this release candidate. This development area can be found at 
+https://dist.apache.org/repos/dist/dev/ace and adding files to it can be done using "svnpubsub"
which is taken care of by the following target:
+
+$ ./gradlew commitToStaging
+
+Voting on the release
+=====================
+
+Start a vote on the dev@ace.apache.org list, for example (be sure to replace <version>
with the correct release number, like "1.0.0"):
+
+>>>
+To: "Ace Developers List" <dev@ace.apache.org>
+Subject: [VOTE] Release of Apache Ace release r<n>
+
+Hi,
+
+We solved N issues in this release:
+http://issues.apache.org/jira/...
+
+There are still some outstanding issues:
+http://issues.apache.org/jira/...
+
+Staging repository:
+https://dist.apache.org/repos/dist/dev/ace/apache-ace-<version>/
+
+You can use this UNIX script to download the release and verify the signatures:
+http://svn.apache.org/repos/asf/ace/trunk/build/check_staged_release.sh
+
+Usage:
+sh check_staged_ace_release.sh <version> /tmp/ace-staging
+
+This script, unlike the original Felix check_staged_release.sh, will download staging from
https://dist.apache.org/repos/dist/dev/ace instead of http://repository.apache.org/content/repositories.
+
+
+Please vote to approve this release:
+
+[ ] +1 Approve the release
+[ ] -1 Veto the release (please provide specific comments)
+
+This vote will be open for 72 hours.
+<<<
+
+Promoting the release:
+=====================
+
+Move the artifacts from the development area to the final release location at 
+https://dist.apache.org/repos/dist/release/ace by invoking the following target:
+
+$ ./gradlew promoteToRelease
+
+Cancelling the release
+======================
+
+$ ./gradlew deleteFromStaging
+
+[1] http://www.apache.org/dev/release.html
+[2] http://www.apache.org/dist/ace/KEYS

Added: ace/trunk/build/build.gradle
URL: http://svn.apache.org/viewvc/ace/trunk/build/build.gradle?rev=1726775&view=auto
==============================================================================
--- ace/trunk/build/build.gradle (added)
+++ ace/trunk/build/build.gradle Tue Jan 26 11:46:12 2016
@@ -0,0 +1,305 @@
+/*
+ * 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.
+ */
+
+/**
+ * Gradle script used to perform Ace releases (really similar to Apache Ace build.gradle)
+ */
+import aQute.bnd.build.Workspace
+
+// Our release number, which has to be monotonically incremented each time we make a new
release.
+version = '2.0.1'
+
+// Base name for release archives Full name will be ${archivesBaseName}-${version}-${classifier}
(e.g. apache-ace-2.0.1-src) 
+archivesBaseName = "apache-ace"
+
+// Our Apache svn Staging repo
+ext.svnStagingPath = "https://dist.apache.org/repos/dist/dev/ace"
+
+// Our Apache svn Release repo
+ext.svnReleasePath = "https://dist.apache.org/repos/dist/release/ace"
+
+apply plugin: 'java'
+apply from: file("rat.gradle")
+
+// Configure RAT plugin to ignore some files
+rat {
+  excludes = [
+    'rat-report.xml',
+    '**/.git/**',
+    '**/.gradle/**',
+    '**/.project',
+    '**/.settings/**',
+    '**/*.iml',
+    '**/*.iws',
+    '**/*.ipr',
+    '**/.classpath',
+    'cnf/**',
+    'gradle/wrapper/**',
+    'release/**',
+    'gradlew',
+    'README',
+    '**/DEPENDENCIES',
+    '**/README',
+    '**/.gitignore',
+    '**/generated/**',
+    'doc/**',
+    '**/packageinfo',
+    '**/*.txt',
+    'docs/**',
+    '.metadata/**'
+  ]
+}
+
+// Setup the workspace
+Workspace workspace
+workspace = Workspace.getWorkspace(".")
+
+task stageSrc(type: Zip) {
+	description = 'Create a source archive in the local staging folder'
+
+	classifier = 'src'
+	destinationDir = file('staging')
+    
+    with([
+    	copySpec { 
+    		from '..'
+	    	include('*/.project',
+					'*/.classpath',
+					'*/.settings/**',
+					'*/src/**',
+					'*/test/**',
+					'*/resources/**',
+					'*/*.bnd',
+					'*/*.bndrun',
+					'*/*build*.xml',
+					'run-*/conf/**',
+					'cnf/ext/**',
+					'build.gradle',
+					'settings.gradle',
+					'gradle.properties')
+		}
+    ] as CopySpec[]) 
+    into "${archivesBaseName}-${version}-src"     	
+}
+
+task stageDeps(type: Zip) {
+	description = 'Create a deps archive in the local staging folder'
+	
+	classifier = 'deps'
+	destinationDir = file('staging')
+	
+	with([
+	    // LICENSE, NOTICE, README
+	    copySpec {
+	    	from 'resources/deps'
+	    },
+	    // cnf
+		copySpec {
+			from '../cnf'
+			into 'cnf'
+			include('buildrepo/**', 
+					'localrepo/**', 
+					'releaserepo/**', 
+					'lib/**', 
+					'plugins/**', 
+					'ecj/**')
+		}
+	] as CopySpec[]);
+	into "${archivesBaseName}-${version}-src"	 
+}
+
+def aceLauncherCopySpec = copySpec {
+		from '../org.apache.ace.agent.launcher/generated/org.apache.ace.agent.launcher.felix.jar'
+		rename('org.apache.ace.agent.launcher.felix.jar', 'ace-launcher.jar')
+	  }
+
+def obrContentsCopySpec = [ 
+		aceLauncherCopySpec, 
+		copySpec {
+			from '../cnf/localrepo/org.apache.felix.deployment.rp.autoconf/org.apache.felix.deployment.rp.autoconf-0.1.5.jar'
+		}
+	] as CopySpec[];
+	
+task stageBin(type: Zip) {
+	description = 'Create a binary release archive in the local staging folder'
+	classifier = 'bin'
+	destinationDir = file('staging')
+	with([
+     		// LICENSE, NOTICE, README  
+     		copySpec {
+     			from 'resources/bin'
+     		},
+     		// server-allinone
+	     	copySpec { 
+				from '../run-server-allinone/generated/distributions/executable/server-allinone.jar'

+				into 'server-allinone'
+			},
+			copySpec { 
+				from '../run-server-allinone/conf' 
+				into 'server-allinone/conf'
+			},
+			copySpec {
+				with obrContentsCopySpec
+				into 'server-allinone/store'
+			},
+			// server
+	     	copySpec { 
+				from '../run-server/generated/distributions/executable/server.jar' 
+				into 'server'
+			},
+			copySpec { 
+				from '../run-server/conf' 
+				into 'server/conf'
+			},
+			// relay
+	     	copySpec { 
+				from '../run-relay/generated/distributions/executable/relay.jar' 
+				into 'relay'
+			},
+			copySpec { 
+				from '../run-relay/conf' 
+				into 'relay/conf'
+			},
+			// client
+	     	copySpec { 
+				from '../run-client/generated/distributions/executable/client.jar' 
+				into 'client'
+			},
+			copySpec { 
+				from '../run-client/conf' 
+				into 'client/conf'
+			},
+			// obr
+	     	copySpec { 
+				from '../run-obr/generated/distributions/executable/obr.jar' 
+				into 'obr'
+			},
+			copySpec { 
+				from '../run-obr/conf' 
+				into 'obr/conf'
+			},
+			copySpec {
+				with obrContentsCopySpec
+				into 'obr/store'
+			},
+			//target
+			copySpec { 
+				from '../run-target/conf' 
+				into 'target/conf'
+			},
+			copySpec { 
+				from '../run-target/scripts' 
+				into 'target/bin'
+			},
+			copySpec {
+				with aceLauncherCopySpec
+				into 'target/bin'
+			}
+			
+		] as CopySpec[])
+	into "${archivesBaseName}-${version}"
+}
+
+task signStaging() {
+    description = 'Signs the local staging distribution.'
+    dependsOn = ['stageSrc', 'stageDeps', 'stageBin' ]
+    
+    doLast {
+		fileTree("staging").visit { FileVisitDetails details -> 
+			logger.lifecycle("    Signing " + details.file.path)
+			ant.exec(executable: 'gpg', dir: 'staging') { 
+		    	ant.arg(line: '--armor')
+		    	ant.arg(line: '--output')
+		    	ant.arg(line: details.file.name + ".asc")
+		    	ant.arg(line: "--detach-sig")
+		    	ant.arg(line: details.file.name)
+			}
+	
+			ant.exec(executable: 'gpg', dir: 'staging', output: "staging/" + details.file.name + ".md5")
{ 
+		    	ant.arg(line: '--print-md')
+		    	ant.arg(line: 'MD5')
+		    	ant.arg(line: details.file.name)
+			}
+	
+			ant.exec(executable: 'gpg', dir: 'staging', output: "staging/" + details.file.name + ".sha")
{
+		    	ant.arg(line: '--print-md')
+		    	ant.arg(line: 'SHA512')
+		    	ant.arg(line: details.file.name)
+			}
+	    }
+    }
+}
+
+task makeStaging() {
+	description = 'Stage new release'
+	group = 'release'
+	dependsOn = ['signStaging']
+}
+
+task commitToStaging() {
+    description = 'Commits the local staging to the Apache svn staging repository.'
+    group = 'release'
+    
+    doLast {
+	    getProject().exec { 
+	    	commandLine 'svn', 
+			'import', 'staging', svnStagingPath + "/${archivesBaseName}-${version}"  + "/", 
+			'-m', "Staging Apache Ace release ${version}."
+	    }
+    }
+}
+
+task promoteToRelease() {
+    description = 'Moves the staging repository to the Apache release repository.'
+	group = 'release'
+	 
+	doLast {
+	    // Move all artifacts from the staging repo to the release repo	
+    	getProject().exec { 
+			commandLine 'svn',
+			'move', svnStagingPath + "/${archivesBaseName}-${version}" , 
+			svnReleasePath, 
+			'-m', "Releasing Apache Ace release ${version}."
+    	}	
+	}
+}
+
+task deleteFromStaging() {
+    description = 'Cancels the staged distribution from the Apache staging repository.'
+    group = 'release'
+    
+    doLast {
+	    getProject().exec { 
+	    	commandLine 'svn',
+			'delete', svnStagingPath+"/${archivesBaseName}-${version}/",
+			"-m", "Removing Apache Ace release ${version} from staging."
+	    }
+    }
+}
+
+task clean(overwrite: true) << { 
+    new File("build/staging").deleteDir()
+    new File("rat-report.xml").delete()
+}
+
+task cleanStaging << {
+    description = 'Clean the local staging directory.'
+    new File("build/staging").deleteDir()
+    new File("build/staging-copy").deleteDir()
+}

Added: ace/trunk/build/check_staged_ace_release.sh
URL: http://svn.apache.org/viewvc/ace/trunk/build/check_staged_ace_release.sh?rev=1726775&view=auto
==============================================================================
--- ace/trunk/build/check_staged_ace_release.sh (added)
+++ ace/trunk/build/check_staged_ace_release.sh Tue Jan 26 11:46:12 2016
@@ -0,0 +1,120 @@
+#!/bin/bash
+#
+# 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.
+# This script verifies the signatures and checksums of a release.
+#
+# This script can be used to check the signatures and checksums of staged 
+# Apache Ace release using gpg.
+# Usage:
+#
+#   check_staged_ace_release.sh <version> [<temp-dir>]
+# 
+# Where:
+#   <version> represents the staged release version, e.g., 2.0.0;
+#   <temp-dir> represents the location where the release artifacts
+#              should be stored, defaults to /tmp/felix-staging if
+#              omitted.
+
+
+version=${1}
+tmpDir=${2:-/tmp/ace-staging}
+
+if [ ! -d "${tmpDir}" ]; then
+    mkdir "${tmpDir}"
+fi
+
+if [ -z "${version}" -o ! -d "${tmpDir}" ]; then
+    echo "Usage: check_staged_ace_release.sh <release-version> [temp-directory]"
+    exit
+fi
+
+checkSig() {
+    sigFile="$1.asc"
+    if [ ! -f $sigFile ]; then
+        echo "$sigFile is missing!!!"
+        exit 1
+    fi
+
+    gpg --verify $sigFile 2>/dev/null >/dev/null
+    if [ "$?" = "0" ]; then echo "OK"; else echo "BAD!!!"; fi
+}
+
+checkSum() {
+    archive=$1
+    sumFile=$2
+    alg=$3
+    if [ ! -f $sumFile ]; then
+        echo "$sumFile is missing!!!"
+        exit 1
+    fi
+
+    orig=`cat $sumFile | sed 's/.*: *//' | tr -d ' \t\n\r'`
+    actual=`gpg --print-md $alg $archive | sed 's/.*: *//' | tr -d ' \t\n\r'`
+    if [ "$orig" = "$actual" ]; then echo "OK"; else echo "BAD!!!"; fi
+}
+
+KEYS_URL="http://www.apache.org/dist/ace/KEYS"
+REL_URL="https://dist.apache.org/repos/dist/dev/ace/apache-ace-${version}/"
+
+PWD=`pwd`
+
+echo "################################################################################"
+echo "                               IMPORTING KEYS                                   "
+echo "################################################################################"
+if [ ! -e "${tmpDir}/KEYS" ]; then
+    wget --no-check-certificate -P "${tmpDir}" $KEYS_URL
+fi
+gpg --import "${tmpDir}/KEYS" 
+
+if [ ! -e "${tmpDir}/org.apache.felix.dependencymanager-${version}" ]
+then
+    echo "################################################################################"
+    echo "                           DOWNLOAD STAGED REPOSITORY                         
 "
+    echo "################################################################################"
+
+    wget \
+      -e "robots=off" --wait 1 -r -np "--reject=html,txt" "--follow-tags=" \
+      -P "${tmpDir}/apache-ace-${version}" -nH "--cut-dirs=5" --ignore-length --no-check-certificate
\
+      $REL_URL
+else
+    echo "################################################################################"
+    echo "                       USING EXISTING STAGED REPOSITORY                       
 "
+    echo "################################################################################"
+    echo "${tmpDir}/org.apache.felix.dependencymanager-${version}"
+fi
+
+echo "################################################################################"
+echo "                          CHECK SIGNATURES AND DIGESTS                          "
+echo "################################################################################"
+
+cd ${tmpDir}/apache-ace-${version}
+for f in `find . -type f | grep -v '\.\(asc\|sha\?\|md5\)$'`; do
+    echo "checking $f" 
+
+    echo -e "    ASC: \c"
+    checkSig $f
+    echo -e "    MD5: \c"
+    checkSum $f "$f.md5" MD5
+    echo -e "    SHA: \c"
+    checkSum $f "$f.sha" SHA512
+    echo ""
+done
+
+cd $PWD
+echo "################################################################################"
+

Added: ace/trunk/build/rat.gradle
URL: http://svn.apache.org/viewvc/ace/trunk/build/rat.gradle?rev=1726775&view=auto
==============================================================================
--- ace/trunk/build/rat.gradle (added)
+++ ace/trunk/build/rat.gradle Tue Jan 26 11:46:12 2016
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.Task
+import org.gradle.api.internal.project.IsolatedAntBuilder
+
+apply plugin: RatPlugin
+
+class RatTask extends DefaultTask {
+  @Input
+  List<String> excludes
+
+  def reportPath = '.'
+  def xmlReport = reportPath + '/rat-report.xml'
+
+  def generateXmlReport(File reportDir) {
+    def antBuilder = services.get(IsolatedAntBuilder)
+    def ratClasspath = project.configurations.rat
+    antBuilder.withClasspath(ratClasspath).execute {
+      ant.taskdef(resource: 'org/apache/rat/anttasks/antlib.xml')
+      ant.report(format: 'xml', reportFile: xmlReport) {
+        fileset(dir: ".") {
+          patternset {
+            excludes.each {
+              exclude(name: it)
+            }
+          }
+        }
+      }
+    }
+  }
+
+  def printUnknownFiles() {
+    def ratXml = new XmlParser().parse(xmlReport)
+    ratXml.resource.each { resource ->
+      if (resource.'license-approval'.@name[0] == "false") {
+        println('Unknown license: ' + resource.@name)
+      }
+    }
+  }
+
+  @TaskAction
+  def rat() {
+    File reportDir = new File(reportPath)
+    if (!reportDir.exists()) {
+      reportDir.mkdirs()
+    }
+    generateXmlReport(reportDir)
+    printUnknownFiles()
+  }
+}
+
+class RatPlugin implements Plugin<Project> {
+  void apply(Project project) {
+    configureDependencies(project)
+    project.plugins.apply(JavaBasePlugin);
+    Task ratTask = project.task("rat",
+        type: RatTask,
+        group: 'verification',
+        description: 'Runs Apache Rat checks.')
+    project.tasks[JavaBasePlugin.CHECK_TASK_NAME].dependsOn ratTask
+  }
+
+  void configureDependencies(final Project project) {
+    project.configurations {
+      rat
+    }
+    project.repositories {
+      mavenCentral()
+    }
+    project.dependencies {
+      rat 'org.apache.rat:apache-rat-tasks:0.8'
+    }
+  }
+}

Modified: ace/trunk/cnf/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/cnf/bnd.bnd?rev=1726775&r1=1726774&r2=1726775&view=diff
==============================================================================
--- ace/trunk/cnf/bnd.bnd (original)
+++ ace/trunk/cnf/bnd.bnd Tue Jan 26 11:46:12 2016
@@ -1,3 +1,3 @@
--nobundles
+-nobundles: true
 -buildpath: biz.aQute.bnd;version=2.2.0,\
 	org.osgi.impl.bundle.bindex
\ No newline at end of file

Added: ace/trunk/cnf/gradle/biz.aQute.bnd.gradle-3.1.0.jar
URL: http://svn.apache.org/viewvc/ace/trunk/cnf/gradle/biz.aQute.bnd.gradle-3.1.0.jar?rev=1726775&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ace/trunk/cnf/gradle/biz.aQute.bnd.gradle-3.1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ace/trunk/gradle.properties
URL: http://svn.apache.org/viewvc/ace/trunk/gradle.properties?rev=1726775&view=auto
==============================================================================
--- ace/trunk/gradle.properties (added)
+++ ace/trunk/gradle.properties Tue Jan 26 11:46:12 2016
@@ -0,0 +1,14 @@
+# cnf project name
+bnd_cnf=cnf
+
+# bnd_plugin is the dependency declaration for the bnd gradle plugin
+bnd_plugin=cnf/gradle/biz.aQute.bnd.gradle-3.1.0.jar
+
+# bnd_build can be set to the name of a "master" project whose dependencies will seed the
set of projects to build.
+bnd_build=
+
+# Default gradle task to build
+bnd_defaultTask=build
+
+# This should be false. It only needs to be true in rare cases.
+bnd_preCompileRefresh=false

Added: ace/trunk/gradle/wrapper/gradle-wrapper.jar
URL: http://svn.apache.org/viewvc/ace/trunk/gradle/wrapper/gradle-wrapper.jar?rev=1726775&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ace/trunk/gradle/wrapper/gradle-wrapper.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ace/trunk/gradle/wrapper/gradle-wrapper.properties
URL: http://svn.apache.org/viewvc/ace/trunk/gradle/wrapper/gradle-wrapper.properties?rev=1726775&view=auto
==============================================================================
--- ace/trunk/gradle/wrapper/gradle-wrapper.properties (added)
+++ ace/trunk/gradle/wrapper/gradle-wrapper.properties Tue Jan 26 11:46:12 2016
@@ -0,0 +1,6 @@
+#Mon Jan 25 19:50:58 CET 2016
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip

Added: ace/trunk/gradlew
URL: http://svn.apache.org/viewvc/ace/trunk/gradlew?rev=1726775&view=auto
==============================================================================
--- ace/trunk/gradlew (added)
+++ ace/trunk/gradlew Tue Jan 26 11:46:12 2016
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options
to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java'
command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine
if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added
a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7"
;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7"
"$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting
and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain
"$@"

Propchange: ace/trunk/gradlew
------------------------------------------------------------------------------
    svn:executable = *

Added: ace/trunk/gradlew.bat
URL: http://svn.apache.org/viewvc/ace/trunk/gradlew.bat?rev=1726775&view=auto
==============================================================================
--- ace/trunk/gradlew.bat (added)
+++ ace/trunk/gradlew.bat Tue Jan 26 11:46:12 2016
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM
options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%"
-classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

Modified: ace/trunk/org.apache.ace.gogo.servlet/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.gogo.servlet/bnd.bnd?rev=1726775&r1=1726774&r2=1726775&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.gogo.servlet/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.gogo.servlet/bnd.bnd Tue Jan 26 11:46:12 2016
@@ -1,3 +1,4 @@
+Bundle-Version: 1.0.0
 -buildpath: ${^-buildpath},\
 	osgi.core,\
 	osgi.cmpn,\

Modified: ace/trunk/run-develop/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/run-develop/bnd.bnd?rev=1726775&r1=1726774&r2=1726775&view=diff
==============================================================================
--- ace/trunk/run-develop/bnd.bnd (original)
+++ ace/trunk/run-develop/bnd.bnd Tue Jan 26 11:46:12 2016
@@ -1,3 +1,3 @@
--nobundles
+-nobundles: true
 Bundle-Name: Apache ACE Development Target
 Bundle-Description: Bnd run project for a standard ACE Target when used in a development
environment, such as Eclipse. This projects does not generate any artifacts.
\ No newline at end of file

Added: ace/trunk/settings.gradle
URL: http://svn.apache.org/viewvc/ace/trunk/settings.gradle?rev=1726775&view=auto
==============================================================================
--- ace/trunk/settings.gradle (added)
+++ ace/trunk/settings.gradle Tue Jan 26 11:46:12 2016
@@ -0,0 +1,108 @@
+/*
+ * Master Gradle initialization script
+ *
+ * Depends on bnd_* values from gradle.properties.
+ */
+
+import aQute.bnd.build.Workspace
+import aQute.bnd.osgi.Constants
+
+/* Add bnd gradle plugin as a script dependency */
+buildscript {
+  dependencies {
+    classpath files(bnd_plugin)
+  }
+  /* Pass bnd gradle plugin classpath to rootProject once created */
+  def bndPlugin = files(configurations.classpath.files)
+  gradle.rootProject { rootProject ->
+    rootProject.ext.bndPlugin = bndPlugin
+  }
+}
+
+/* Initialize the bnd workspace */
+Workspace.setDriver(Constants.BNDDRIVER_GRADLE)
+Workspace.addGestalt(Constants.GESTALT_BATCH, null)
+def workspace = new Workspace(rootDir, bnd_cnf)
+if (workspace == null) {
+  throw new GradleException("Unable to load workspace ${rootDir}/${bnd_cnf}")
+}
+
+/* Add cnf project to the graph */
+include bnd_cnf
+
+/* Start with the declared build project name */
+def defaultProjectName = bnd_build
+
+/* If in a subproject, use the subproject name */
+for (def currentDir = startParameter.currentDir; currentDir != rootDir; currentDir = currentDir.parentFile)
{
+  defaultProjectName = currentDir.name
+}
+
+/* Build a set of project names we need to include from the specified tasks */
+def projectNames = startParameter.taskNames.collect { taskName ->
+  def elements = taskName.split(':')
+  switch (elements.length) {
+    case 1:
+      return defaultProjectName
+    case 2:
+      return elements[0].empty ? bnd_build : elements[0]
+    default:
+      return elements[0].empty ? elements[1] : elements[0]
+  }
+}.toSet()
+
+/* Include the default project name if in a subproject or no tasks specified */
+if ((startParameter.currentDir != rootDir) || projectNames.empty) {
+  projectNames += defaultProjectName
+}
+
+/* If bnd_build used but declared empty, add all non-private folders of rootDir */
+if (projectNames.remove('')) {
+  rootDir.eachDir {
+    def projectName = it.name
+    if (!projectName.startsWith('.')) {
+      projectNames += projectName
+    }
+  }
+}
+
+/* Add each project and its dependencies to the graph */
+projectNames.each { projectName ->
+  include projectName
+  def project = getBndProject(workspace, projectName)
+  project?.getDependson()*.getName().each {
+    include it
+  }
+}
+
+/* Get the bnd project for the specified project name */
+def getBndProject(Workspace workspace, String projectName) {
+  def project = workspace.getProject(projectName)
+  if (project == null) {
+    return null
+  }
+  project.prepare()
+  if (project.isValid()) {
+    return project
+  }
+
+  project.getInfo(workspace, "${rootDir} :")
+  def errorCount = 0
+  project.getWarnings().each {
+    println "Warning: ${it}"
+  }
+  project.getErrors().each {
+    println "Error  : ${it}"
+    errorCount++
+  }
+  if (!project.isOk()) {
+    def str = 'even though no errors were reported'
+    if (errorCount == 1) {
+      str = 'one error was reported'
+    } else if (errorCount > 1) {
+      str = "${errorCount} errors were reported"
+    }
+    throw new GradleException("Project ${rootDir}/${projectName} is invalid, ${str}")
+  }
+  throw new GradleException("Project ${rootDir}/${projectName} is not a valid bnd project")
+}




Mime
View raw message