You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by cb...@apache.org on 2022/12/08 09:38:38 UTC

[pulsar-client-reactive] branch main updated: Fix ASF release requirements (#101)

This is an automated email from the ASF dual-hosted git repository.

cbornet pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-reactive.git


The following commit(s) were added to refs/heads/main by this push:
     new 0ab6836  Fix ASF release requirements (#101)
0ab6836 is described below

commit 0ab6836efcc9ea8339ff2676f3185d589fdb506b
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Thu Dec 8 11:38:32 2022 +0200

    Fix ASF release requirements (#101)
    
    * Add NOTICE file and missing license headers
    
    - it's required for ASF releases
    - add RAT plugin for checking
    
    * Add gradle task for creating source package tarball
---
 .github/workflows/ci.yml                           | 17 +++++++++-
 NOTICE                                             |  5 +++
 build.gradle                                       | 39 ++++++++++++++++++++++
 buildSrc/build.gradle                              |  1 +
 checkstyle/checkstyle.xml                          | 15 +++++++++
 gradle/libs.versions.toml                          | 15 +++++++++
 idea/codeStyleConfig.xml                           | 15 +++++++++
 pulsar-client-reactive-adapter/build.gradle        | 16 +++++++++
 pulsar-client-reactive-api/build.gradle            | 16 +++++++++
 pulsar-client-reactive-jackson/build.gradle        | 16 +++++++++
 .../build.gradle                                   | 16 +++++++++
 11 files changed, 170 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bb47b6d..5f102a6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,3 +1,18 @@
+#
+# Copyright 2022 the original author or authors.
+#
+# Licensed 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
+#
+#      https://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.
+#
 name: CI build
 
 on:
@@ -25,4 +40,4 @@ jobs:
           java-version: 11
 
       - name: Check with Gradle
-        run: ./gradlew check javadoc
+        run: ./gradlew rat javadoc check
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..25e3f1e
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,5 @@
+Reactive Client for Apache Pulsar
+Copyright 2022 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
diff --git a/build.gradle b/build.gradle
index 5a3e666..a120193 100644
--- a/build.gradle
+++ b/build.gradle
@@ -21,4 +21,43 @@ plugins {
 allprojects {
     group = 'org.apache.pulsar'
     apply plugin: 'io.spring.javaformat'
+	apply plugin: 'org.nosphere.apache.rat'
+
+	repositories {
+		mavenCentral()
+	}
+
+	tasks.named('rat') {
+		inputDir = projectDir
+		excludes = ['.asf.yaml', // ASF metadata for github integration excluded from src zip
+					'**/.gradle/**', '**/wrapper/**', 'gradlew*',  // gradle wrapper files excluded from src zip
+					'gradle.properties',  // artifactory release plugin removes header when bumping version
+					'**/build/**', '**/target/**', 'licenses/**', 'notices/**',
+					'**/META-INF/services/*',
+					'out/**', '*.ipr', '**/*.iml', '*.iws', '.idea/**', // Intellij files
+					'.classpath', '.project', '.settings/**', 'bin/**', // Eclipse files
+					'CONTRIBUTING.adoc', 'README.adoc',
+		]
+	}
 }
+
+task sourceTar(type: Tar) {
+	destinationDirectory = buildDir
+	archiveBaseName = "pulsar-client-reactive-${rootProject.version}"
+	archiveClassifier = "src"
+	archiveExtension = "tar.gz"
+ 	compression = Compression.GZIP
+	duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+	includeEmptyDirs = false
+	into(archiveBaseName) {
+		from(rootDir) {
+			excludes = [
+					'.github/**', '.asf.yaml',
+					'**/build/**', '**/target/**',
+					'out/**', '*.ipr', '**/*.iml', '*.iws', '.idea/**', // Intellij files
+					'.classpath', '.project', '.settings/**', 'bin/**', // Eclipse files
+					'**/.gradle/**', '**/wrapper/**', 'gradlew*',  // gradle wrapper files excluded from src zip
+			]
+		}
+	}
+}
\ No newline at end of file
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
index bb203ab..73d2c90 100644
--- a/buildSrc/build.gradle
+++ b/buildSrc/build.gradle
@@ -31,4 +31,5 @@ dependencies {
 	implementation libs.spring.javaformat.gradle.plugin
 	implementation libs.licenser
 	implementation libs.testlogger
+	implementation 'org.nosphere.apache:creadur-rat-gradle:0.8.0'
 }
\ No newline at end of file
diff --git a/checkstyle/checkstyle.xml b/checkstyle/checkstyle.xml
index dcbb317..213121d 100644
--- a/checkstyle/checkstyle.xml
+++ b/checkstyle/checkstyle.xml
@@ -1,4 +1,19 @@
 <?xml version="1.0"?>
+<!--
+  ~ Copyright 2022 the original author or authors.
+  ~
+  ~ Licensed 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
+  ~
+  ~      https://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.
+  -->
 <!DOCTYPE module PUBLIC
 		"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
 		"https://checkstyle.org/dtds/configuration_1_3.dtd">
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index aabf3d1..be52fdd 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,3 +1,18 @@
+#
+# Copyright 2022 the original author or authors.
+#
+# Licensed 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
+#
+#      https://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.
+#
 [versions]
 pulsar = "2.10.2"
 junit-jupiter = "5.8.2"
diff --git a/idea/codeStyleConfig.xml b/idea/codeStyleConfig.xml
index cd1c76f..8bb2ddb 100644
--- a/idea/codeStyleConfig.xml
+++ b/idea/codeStyleConfig.xml
@@ -1,3 +1,18 @@
+<!--
+  ~ Copyright 2022 the original author or authors.
+  ~
+  ~ Licensed 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
+  ~
+  ~      https://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.
+  -->
 <code_scheme name="SpringPulsar" version="173">
 	<option name="AUTODETECT_INDENTS" value="false"/>
 	<option name="OTHER_INDENT_OPTIONS">
diff --git a/pulsar-client-reactive-adapter/build.gradle b/pulsar-client-reactive-adapter/build.gradle
index 2bdb655..2fbfa2f 100644
--- a/pulsar-client-reactive-adapter/build.gradle
+++ b/pulsar-client-reactive-adapter/build.gradle
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2022 the original author or authors.
+ *
+ * Licensed 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
+ *
+ *      https://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.
+ */
+
 plugins {
 	id 'pulsar-client-reactive.codestyle-conventions'
 	id 'pulsar-client-reactive.library-conventions'
diff --git a/pulsar-client-reactive-api/build.gradle b/pulsar-client-reactive-api/build.gradle
index 86daf16..9ed66b3 100644
--- a/pulsar-client-reactive-api/build.gradle
+++ b/pulsar-client-reactive-api/build.gradle
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2022 the original author or authors.
+ *
+ * Licensed 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
+ *
+ *      https://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.
+ */
+
 plugins {
 	id 'pulsar-client-reactive.codestyle-conventions'
 	id 'pulsar-client-reactive.library-conventions'
diff --git a/pulsar-client-reactive-jackson/build.gradle b/pulsar-client-reactive-jackson/build.gradle
index cb72470..8af6b08 100644
--- a/pulsar-client-reactive-jackson/build.gradle
+++ b/pulsar-client-reactive-jackson/build.gradle
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2022 the original author or authors.
+ *
+ * Licensed 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
+ *
+ *      https://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.
+ */
+
 plugins {
 	id 'pulsar-client-reactive.codestyle-conventions'
 	id 'pulsar-client-reactive.library-conventions'
diff --git a/pulsar-client-reactive-producer-cache-caffeine/build.gradle b/pulsar-client-reactive-producer-cache-caffeine/build.gradle
index 825cc01..d98b818 100644
--- a/pulsar-client-reactive-producer-cache-caffeine/build.gradle
+++ b/pulsar-client-reactive-producer-cache-caffeine/build.gradle
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2022 the original author or authors.
+ *
+ * Licensed 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
+ *
+ *      https://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.
+ */
+
 plugins {
 	id 'pulsar-client-reactive.codestyle-conventions'
 	id 'pulsar-client-reactive.library-conventions'