diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa1afe8f..5562de2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,19 +1,3 @@ -# -# Copyright © 2026-2026 ThingsBoard, Inc. -# -# 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 -# -# 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. -# - name: CI on: diff --git a/LICENSE b/LICENSE index c8f142f0..62589edd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ + Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -178,7 +179,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,13 +187,13 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016 The Thingsboard Authors + Copyright [yyyy] [name of copyright owner] 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 - http://www.apache.org/licenses/LICENSE-2.0 + 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, diff --git a/README.md b/README.md index f34387a8..5d1fc28a 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ thingsboard-java-client/ ├── pom.xml # Parent POM ├── generate-client.sh # Client generation script ├── openapitools.json # OpenAPI Generator version config -├── license-header-template.txt # License header for generated files +├── license-header.txt # License header for generated files ├── common/ │ ├── pom.xml # Compiles against CE for IDE support │ ├── src/main/java/ # Handwritten shared code (ThingsboardClient, etc.) @@ -169,6 +169,6 @@ Options: Output log: `generate-client.log` (overwritten on each run) -## License +## Licensing -This project is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). +ThingsBoard Java REST Clients are licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text. diff --git a/build.sh b/build.sh index a2a12454..295cb2cb 100755 --- a/build.sh +++ b/build.sh @@ -1,17 +1,6 @@ # -# Copyright © 2026-2026 ThingsBoard, Inc. -# -# 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 -# -# 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. +# SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. +# SPDX-License-Identifier: Apache-2.0 # mvn clean install -DskipTests -T3 diff --git a/ce/pom.xml b/ce/pom.xml index 52a83280..2711f546 100644 --- a/ce/pom.xml +++ b/ce/pom.xml @@ -1,19 +1,8 @@ ${basedir}/.. + true diff --git a/common/src/main/java/org/thingsboard/client/RetryingHttpClient.java b/common/src/main/java/org/thingsboard/client/RetryingHttpClient.java index 20e35c9a..8b0cfe08 100644 --- a/common/src/main/java/org/thingsboard/client/RetryingHttpClient.java +++ b/common/src/main/java/org/thingsboard/client/RetryingHttpClient.java @@ -1,18 +1,5 @@ -/** - * Copyright © 2026-2026 ThingsBoard, Inc. - * - * 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 - * - * 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. - */ +// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 package org.thingsboard.client; import lombok.extern.java.Log; diff --git a/common/src/main/java/org/thingsboard/client/ThingsboardClient.java b/common/src/main/java/org/thingsboard/client/ThingsboardClient.java index 193cfd80..4b64fe33 100644 --- a/common/src/main/java/org/thingsboard/client/ThingsboardClient.java +++ b/common/src/main/java/org/thingsboard/client/ThingsboardClient.java @@ -1,18 +1,5 @@ -/** - * Copyright © 2026-2026 ThingsBoard, Inc. - * - * 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 - * - * 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. - */ +// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 package org.thingsboard.client; import com.fasterxml.jackson.databind.JsonNode; diff --git a/common/src/test/java/org/thingsboard/client/RetryingHttpClientTest.java b/common/src/test/java/org/thingsboard/client/RetryingHttpClientTest.java index 805fd948..3793ae23 100644 --- a/common/src/test/java/org/thingsboard/client/RetryingHttpClientTest.java +++ b/common/src/test/java/org/thingsboard/client/RetryingHttpClientTest.java @@ -1,18 +1,5 @@ -/** - * Copyright © 2026-2026 ThingsBoard, Inc. - * - * 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 - * - * 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. - */ +// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 package org.thingsboard.client; import org.junit.jupiter.api.Test; diff --git a/common/src/test/java/org/thingsboard/client/ThingsboardClientAuthTest.java b/common/src/test/java/org/thingsboard/client/ThingsboardClientAuthTest.java index 6436a57d..092ffeb2 100644 --- a/common/src/test/java/org/thingsboard/client/ThingsboardClientAuthTest.java +++ b/common/src/test/java/org/thingsboard/client/ThingsboardClientAuthTest.java @@ -1,18 +1,5 @@ -/** - * Copyright © 2026-2026 ThingsBoard, Inc. - * - * 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 - * - * 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. - */ +// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 package org.thingsboard.client; import com.sun.net.httpserver.HttpExchange; diff --git a/deploy.sh b/deploy.sh index ad1d0252..085ebd91 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,17 +1,6 @@ # -# Copyright © 2026-2026 ThingsBoard, Inc. -# -# 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 -# -# 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. +# SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. +# SPDX-License-Identifier: Apache-2.0 # mvn clean deploy -DskipTests -T3 diff --git a/generate-client.sh b/generate-client.sh index 33e5b626..412618d6 100755 --- a/generate-client.sh +++ b/generate-client.sh @@ -1,18 +1,7 @@ #!/bin/bash # -# Copyright © 2026-2026 ThingsBoard, Inc. -# -# 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 -# -# 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. +# SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. +# SPDX-License-Identifier: Apache-2.0 # # diff --git a/license-header-template.txt b/license-header-template.txt deleted file mode 100644 index a63c0132..00000000 --- a/license-header-template.txt +++ /dev/null @@ -1,13 +0,0 @@ -Copyright © ${project.inceptionYear}-2026 ${owner} - -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 - - 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. diff --git a/license-header.txt b/license-header.txt new file mode 100644 index 00000000..3855ae0f --- /dev/null +++ b/license-header.txt @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. +SPDX-License-Identifier: Apache-2.0 diff --git a/openapi/api.mustache b/openapi/api.mustache index a2d856e0..565aeaef 100644 --- a/openapi/api.mustache +++ b/openapi/api.mustache @@ -1,17 +1,6 @@ {{! - Copyright © 2026-2026 ThingsBoard, Inc. - - 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 - - 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. + SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. + SPDX-License-Identifier: Apache-2.0 }} {{>licenseInfo}} package {{package}}; diff --git a/openapi/api_doc.mustache b/openapi/api_doc.mustache index af020c7e..b9852673 100644 --- a/openapi/api_doc.mustache +++ b/openapi/api_doc.mustache @@ -1,17 +1,6 @@ {{! - Copyright © 2026-2026 ThingsBoard, Inc. - - 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 - - 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. + SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. + SPDX-License-Identifier: Apache-2.0 }} # {{classname}} diff --git a/openapi/enum_outer_doc.mustache b/openapi/enum_outer_doc.mustache index e48ed19b..d284e244 100644 --- a/openapi/enum_outer_doc.mustache +++ b/openapi/enum_outer_doc.mustache @@ -1,17 +1,6 @@ {{! - Copyright © 2026-2026 ThingsBoard, Inc. - - 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 - - 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. + SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. + SPDX-License-Identifier: Apache-2.0 }} # {{classname}} diff --git a/openapi/model_doc.mustache b/openapi/model_doc.mustache index 205a8829..f55eda67 100644 --- a/openapi/model_doc.mustache +++ b/openapi/model_doc.mustache @@ -1,17 +1,6 @@ {{! - Copyright © 2026-2026 ThingsBoard, Inc. - - 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 - - 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. + SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. + SPDX-License-Identifier: Apache-2.0 }} {{#models}}{{#model}} {{#isEnum}}{{>enum_outer_doc}}{{/isEnum}}{{^isEnum}}{{>pojo_doc}}{{/isEnum}} diff --git a/openapi/pojo.mustache b/openapi/pojo.mustache index 2bab2654..2479b0b0 100644 --- a/openapi/pojo.mustache +++ b/openapi/pojo.mustache @@ -1,17 +1,6 @@ {{! - Copyright © 2026-2026 ThingsBoard, Inc. - - 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 - - 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. + SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. + SPDX-License-Identifier: Apache-2.0 }} {{#discriminator}} import {{invokerPackage}}.JSON; diff --git a/openapi/pojo_doc.mustache b/openapi/pojo_doc.mustache index 4392f1e1..c75196c7 100644 --- a/openapi/pojo_doc.mustache +++ b/openapi/pojo_doc.mustache @@ -1,17 +1,6 @@ {{! - Copyright © 2026-2026 ThingsBoard, Inc. - - 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 - - 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. + SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. + SPDX-License-Identifier: Apache-2.0 }} # {{classname}} diff --git a/paas/pom.xml b/paas/pom.xml index 4d965e18..eae40ec2 100644 --- a/paas/pom.xml +++ b/paas/pom.xml @@ -1,19 +1,8 @@ - Apache License, Version 2.0 + Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0 repo @@ -66,26 +55,39 @@ docs api-docs + + ${main.dir} + META-INF + + LICENSE + + com.mycila license-maven-plugin - 3.0 + 5.1.2 -
${main.dir}/license-header-template.txt
- - ThingsBoard, Inc. - - - **/LICENSE - **/*.properties - **/*.log - .github/** - .run/** - .claude/** - + + +
${main.dir}/license-header.txt
+ + **/LICENSE + **/*.properties + **/*.log + .github/** + .run/** + .claude/** + openapi/api.mustache + openapi/pojo.mustache + +
+
+ + SINGLE_LINE_DOUBLESLASH_STYLE +
diff --git a/regenerate-and-build.sh b/regenerate-and-build.sh index e573b913..93238f3a 100755 --- a/regenerate-and-build.sh +++ b/regenerate-and-build.sh @@ -1,17 +1,6 @@ # -# Copyright © 2026-2026 ThingsBoard, Inc. -# -# 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 -# -# 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. +# SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. +# SPDX-License-Identifier: Apache-2.0 # set -e diff --git a/scripts/flatten_docs.py b/scripts/flatten_docs.py index 1490a68a..2386ee32 100644 --- a/scripts/flatten_docs.py +++ b/scripts/flatten_docs.py @@ -1,18 +1,7 @@ #!/usr/bin/env python3 # -# Copyright © 2026-2026 ThingsBoard, Inc. -# -# 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 -# -# 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. +# SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. +# SPDX-License-Identifier: Apache-2.0 # """Flatten model docs by inlining referenced types.