You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by pa...@apache.org on 2015/06/19 11:41:33 UTC

[1/2] zest-qi4j git commit: Build, RAT: now use external RAT Gradle Plugin, see RAT-163

Repository: zest-qi4j
Updated Branches:
  refs/heads/develop b86b66d4e -> b351def71


Build, RAT: now use external RAT Gradle Plugin, see RAT-163


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/8886104f
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/8886104f
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/8886104f

Branch: refs/heads/develop
Commit: 8886104f22f1b8ac2f4bed4eb11a1f7b0f7ab5ea
Parents: b86b66d
Author: Paul Merlin <pa...@apache.org>
Authored: Fri Jun 19 11:34:46 2015 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Fri Jun 19 11:34:46 2015 +0200

----------------------------------------------------------------------
 build.gradle             |  11 +++-
 gradle/apache-rat.gradle | 117 ------------------------------------------
 2 files changed, 10 insertions(+), 118 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/8886104f/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index a16bc30..57dd7be 100644
--- a/build.gradle
+++ b/build.gradle
@@ -27,6 +27,15 @@ project.ext {
   groovycMain_maxPermSize = "256m"
 }
 
+buildscript {
+  repositories {
+    maven { url "https://plugins.gradle.org/m2/" }
+  }
+  dependencies {
+    classpath 'gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.1.1'
+  }
+}
+
 
 apply plugin: 'java'
 apply plugin: 'idea'
@@ -35,6 +44,7 @@ apply plugin: 'maven'
 apply from: 'maven-compat.gradle'
 apply plugin: 'project-report'
 apply from: 'libraries.gradle'
+apply plugin: 'org.nosphere.apache.rat'
 
 targetCompatibility = "1.7"
 sourceCompatibility = "1.7"
@@ -46,7 +56,6 @@ project.ext {
 
 def releaseApprovedProjects = allprojects.findAll( { project ->  rootProject.ext.releaseSpec.satisfiedBy( project ) } )
 
-apply from: 'gradle/apache-rat.gradle'
 rat {
     excludes = [
         '**/.DS_Store/**',

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/8886104f/gradle/apache-rat.gradle
----------------------------------------------------------------------
diff --git a/gradle/apache-rat.gradle b/gradle/apache-rat.gradle
deleted file mode 100644
index dc0bcd6..0000000
--- a/gradle/apache-rat.gradle
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * 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 = 'build/rat'
-    def stylesheet = 'etc/apache-rat-output-to-html.xsl'
-    def xmlReport = reportPath + '/rat-report.xml'
-    def htmlReport = reportPath + '/rat-report.html'
-
-    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)
-        def unknownLicenses = 0
-        ratXml.resource.each { resource ->
-            if (resource.'license-approval'.@name[0] == "false") {
-                println('Unknown license: ' + resource.@name)
-                unknownLicenses++
-            }
-        }
-        return unknownLicenses
-    }
-
-    def generateHtmlReport() {
-        def antBuilder = services.get(IsolatedAntBuilder)
-        def ratClasspath = project.configurations.rat
-        antBuilder.withClasspath(ratClasspath).execute {
-            ant.xslt(
-                in: xmlReport,
-                style: stylesheet,
-                out: htmlReport,
-                classpath: ratClasspath
-            )
-        }
-        println('Rat report: ' + htmlReport)
-    }
-
-    @TaskAction
-    def rat() {
-        File reportDir = new File(reportPath)
-        if (!reportDir.exists()) {
-            reportDir.mkdirs()
-        }
-        generateXmlReport(reportDir)
-        def errorCount = printUnknownFiles()
-        generateHtmlReport()
-        if (errorCount > 0) {
-            throw new GradleException("Found $errorCount files with unknown licenses.")
-        }
-    }
-}
-
-class RatPlugin implements Plugin<Project> {
-    void apply(Project project) {
-        configureDependencies(project)
-        project.plugins.apply(JavaBasePlugin);
-        Task ratTask = project.task(
-            'rat',
-            type: RatTask,
-            group: 'Apache',
-            description: 'Runs Apache Rat checks.'
-        )
-        // TODO Uncomment this to hook into `check` tasks
-        // 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.11'
-        }
-    }
-}


[2/2] zest-qi4j git commit: Build, prepare for Apache Nexus artifacts publication ZEST-20 & ZEST-28

Posted by pa...@apache.org.
Build, prepare for Apache Nexus artifacts publication ZEST-20 & ZEST-28


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/b351def7
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/b351def7
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/b351def7

Branch: refs/heads/develop
Commit: b351def71fb68e1262bf890a9c2b86c1576724b0
Parents: 8886104
Author: Paul Merlin <pa...@apache.org>
Authored: Fri Jun 19 11:41:10 2015 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Fri Jun 19 11:41:10 2015 +0200

----------------------------------------------------------------------
 build.gradle                                    | 30 +++++++++++++-------
 .../src/docs/tutorials/howto-build-system.txt   |  4 +--
 2 files changed, 22 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b351def7/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 57dd7be..37cbc5d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -30,9 +30,11 @@ project.ext {
 buildscript {
   repositories {
     maven { url "https://plugins.gradle.org/m2/" }
+    jcenter()
   }
   dependencies {
     classpath 'gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.1.1'
+    classpath 'org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.1'
   }
 }
 
@@ -41,6 +43,7 @@ apply plugin: 'java'
 apply plugin: 'idea'
 apply plugin: 'signing'
 apply plugin: 'maven'
+apply plugin: 'maven-publish-auth'
 apply from: 'maven-compat.gradle'
 apply plugin: 'project-report'
 apply from: 'libraries.gradle'
@@ -136,11 +139,12 @@ allprojects {
 //  apply plugin: 'checkstyle'
   apply plugin: 'project-report'
   apply plugin: 'maven'
+  apply plugin: 'maven-publish-auth'
 
 
   defaultTasks 'classes', 'test'
 
-  group = name.substring( 0, name.lastIndexOf( '.' ) )
+  group = name == 'org.qi4j' ? 'org.qi4j' : name.substring( 0, name.lastIndexOf( '.' ) )
   version = System.properties.version ?: "0"
   
   // UTF-8 For all compilations and javadocs
@@ -180,16 +184,22 @@ allprojects {
   def uploadReleaseSpec = rootProject.hasProperty('uploadReleaseSpec') \
                              ? rootProject.uploadReleaseSpec : uploadReleases \
                              ? true : false
-  // By default RELEASES are uploaded using SSH, SNAPSHOTS using WEBDAV
+  // By default RELEASES and SNAPSHOTS are uploaded using HTTP
   // Used Wagon can be overriden by setting the uploadWagon property
-  // def wagonSSH = "org.apache.maven.wagon:wagon-ssh:1.0-beta-2"
-  def wagonWEBDAV = "org.apache.maven.wagon:wagon-webdav:1.0-beta-2"
+  // def wagonSSH = "org.apache.maven.wagon:wagon-ssh:2.2"
+  // def wagonWEBDAV = "org.apache.maven.wagon:wagon-webdav:1.0-beta-2"
+  def wagonHTTP = "org.apache.maven.wagon:wagon-http:2.2"
   def uploadWagon = rootProject.hasProperty('uploadWagon') \
-                        ? rootProject.uploadWagon : wagonWEBDAV
-  // By default RELEASES are uploaded to OPS4J, SNAPSHOTS to Cloudbees
+                        ? rootProject.uploadWagon : wagonHTTP
+  // By default RELEASES and SNAPSHOTS are uploaded to Apache Nexus
   // Target repository can be overriden by setting the uploadRepository property
-  def releasesRepository = "dav:https://repository-qi4j.forge.cloudbees.com/release/"
-  def snapshotsRepository = "dav:https://repository-qi4j.forge.cloudbees.com/snapshot/"
+  def releasesRepositoryName = "apache.releases.https"
+  def releasesRepository = "https://repository.apache.org/content/repositories/releases"
+  def snapshotsRepositoryName = "apache.snapshots.https"
+  def snapshotsRepository = "https://repository.apache.org/content/repositories/snapshots"
+  def uploadRepositoryName = rootProject.hasProperty('uploadRepositoryName') \
+                            ? rootProject.uploadRepositoryName \
+                            : uploadReleases ? releasesRepositoryName : snapshotsRepositoryName
   def uploadRepository = rootProject.hasProperty('uploadRepository') \
                             ? rootProject.uploadRepository \
                             : uploadReleases ? releasesRepository : snapshotsRepository
@@ -372,11 +382,11 @@ allprojects {
       if( uploadSigned )
         beforeDeployment { MavenDeployment deployment -> signing.signPom( deployment ) }
       configuration = configurations.deployerJars
-      repository(url: uploadRepository) {
+      repository(id: uploadRepositoryName, url: uploadRepository) {
         if( uploadUsername )
           authentication(userName: uploadUsername, password: uploadPassword)
       }
-      snapshotRepository(url: uploadRepository) {
+      snapshotRepository(id: uploadRepositoryName, url: uploadRepository) {
         if( uploadUsername )
           authentication(userName: uploadUsername, password: uploadPassword)
       }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/b351def7/manual/src/docs/tutorials/howto-build-system.txt
----------------------------------------------------------------------
diff --git a/manual/src/docs/tutorials/howto-build-system.txt b/manual/src/docs/tutorials/howto-build-system.txt
index 8c0da11..c26186b 100644
--- a/manual/src/docs/tutorials/howto-build-system.txt
+++ b/manual/src/docs/tutorials/howto-build-system.txt
@@ -209,10 +209,10 @@ Signing can be turned on or off by setting the `uploadSigned` property to false.
 By default RELEASES must satisfy ReleaseSpecification, SNAPSHOT don't.
 ReleaseSpecification usage can be turned on or off by setting the `uploadReleaseSpec` property to false.
 
-By default RELEASES and SNAPHOTS are uploaded using WEBDAV.
+By default RELEASES and SNAPHOTS are uploaded using HTTP.
 Used Wagon can be overriden by setting the `uploadWagon` property.
 
-By default RELEASES and SNAPSHOTS are uploaded to Cloudbees.
+By default RELEASES and SNAPSHOTS are uploaded to the Apache Nexus.
 Target repository can be overriden by setting the `uploadRepository` property.
 
 No username/password is provided by default.