diff --git a/packaging/build.gradle b/packaging/build.gradle
deleted file mode 100644
index 5b1ae8fef0..0000000000
--- a/packaging/build.gradle
+++ /dev/null
@@ -1,26 +0,0 @@
-// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc.
-// SPDX-License-Identifier: BUSL-1.1
-plugins {
- id 'groovy'
- id 'java-library'
-}
-
-repositories {
- mavenCentral()
-}
-
-dependencies {
- implementation localGroovy()
- implementation gradleApi()
- implementation 'com.netflix.nebula:gradle-ospackage-plugin:12.1.1'
- implementation 'org.apache.commons:commons-lang3:3.9'
-}
-
-buildDir = projectBuildDir
-version = projectVersion
-
-compileGroovy {
- destinationDirectory = file("${buildDir}/classes")
-}
-
-description 'ThingsBoard packaging plugin for constructing RPM and DEB package files.'
diff --git a/packaging/java/build.gradle b/packaging/java/build.gradle
index 089b9ae550..c41d86d69e 100644
--- a/packaging/java/build.gradle
+++ b/packaging/java/build.gradle
@@ -3,18 +3,10 @@
// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1
import org.apache.tools.ant.filters.ReplaceTokens
-buildscript {
- repositories {
- mavenLocal()
- mavenCentral()
- }
- dependencies {
- classpath("org.thingsboard:packaging:${projectVersion}")
- }
+plugins {
+ id "com.netflix.nebula.ospackage" version "12.1.1"
}
-apply plugin: "thingsboard.package"
-
buildDir = projectBuildDir
version = projectVersion
base {
diff --git a/packaging/pom.xml b/packaging/pom.xml
deleted file mode 100644
index 9641069c81..0000000000
--- a/packaging/pom.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
- 4.0.0
-
- org.thingsboard
- 4.4.0.1-SNAPSHOT
- thingsboard
-
- packaging
- jar
-
- ThingsBoard Packaging Plugin
- https://thingsboard.io
-
-
- UTF-8
- ${basedir}/..
-
-
-
-
- com.netflix.nebula
- gradle-ospackage-plugin
- 12.1.1
-
-
- org.codehaus.groovy
- groovy-all
- 3.0.9
- pom
- provided
-
-
- org.gradle
- gradle-tooling-api
- 7.1.1
- provided
-
-
- org.gradle
- gradle-core
- 6.1.1
- provided
-
-
-
-
-
- org.thingsboard
- gradle-maven-plugin
-
- ${main.dir}/packaging
-
- build
-
-
- -PprojectBuildDir=${project.build.directory}
- -PprojectVersion=${project.version}
-
-
-
-
- compile
-
- invoke
-
-
-
-
-
-
-
-
- repo.gradle.org
- https://repo.gradle.org/gradle/libs-releases-local
-
-
-
diff --git a/packaging/src/main/groovy/org/thingsboard/packaging/DebMaintainerScriptsGenerator.groovy b/packaging/src/main/groovy/org/thingsboard/packaging/DebMaintainerScriptsGenerator.groovy
deleted file mode 100644
index 8111d50c10..0000000000
--- a/packaging/src/main/groovy/org/thingsboard/packaging/DebMaintainerScriptsGenerator.groovy
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * SPDX-FileCopyrightText: Copyright ThingsBoard, Inc.
- * SPDX-License-Identifier: BUSL-1.1
- */
-package org.thingsboard.packaging
-
-import com.netflix.gradle.plugins.deb.Deb
-import com.netflix.gradle.plugins.deb.TemplateHelper
-import com.netflix.gradle.plugins.utils.FileSystemActions
-import groovy.transform.Canonical
-import groovy.transform.CompileDynamic
-
-class DebMaintainerScriptsGenerator {
- private final Deb task
- private final TemplateHelper templateHelper
- private final File destination
- private final FileSystemActions fileSystem
-
- DebMaintainerScriptsGenerator(Deb task, TemplateHelper templateHelper, File destination, FileSystemActions fileSystem) {
- this.destination = destination
- this.task = task
- this.templateHelper = templateHelper
- this.fileSystem = fileSystem
- }
-
- void generate(Map context) {
- templateHelper.generateFile("control", context)
-
- def configurationFiles = task.allConfigurationFiles
- if (configurationFiles.any()) {
- templateHelper.generateFile("conffiles", [files: configurationFiles] )
- }
-
- List scripts = [
- new MaintainerScript("preinst", task.preInstallFile, task.allPreInstallCommands),
- new PostInstScript(task.postInstallFile, task.allPostInstallCommands, context),
- new MaintainerScript("prerm", task.preUninstallFile, task.allPreUninstallCommands),
- new MaintainerScript("postrm", task.postUninstallFile, task.allPostUninstallCommands)
- ]
- if (task.configFile) {
- scripts << new MaintainerScript("config", task.configFile, [])
- }
- if (task.templatesFile) {
- scripts << new MaintainerScript("templates", task.templatesFile, [])
- }
-
- def installUtils = task.allCommonCommands.collect { stripShebang(it) }
- for (script in scripts) {
- if(script.file) {
- fileSystem.copy(script.file, new File(destination, script.name))
- } else if (script.needsTemplateGeneration()) {
- Map commands = [commands: installUtils + script.commands.collect { stripShebang(it) }] as Map
- templateHelper.generateFile(script.name, context + commands)
- }
- }
- }
-
- /**
- * Works with nulls, Strings and Files.
- *
- * @param script
- * @return
- */
- @CompileDynamic
- private static String stripShebang(Object script) {
- StringBuilder result = new StringBuilder()
- script?.eachLine { line ->
- if (!line.matches('^#!.*$')) {
- result.append line
- result.append "\n"
- }
- }
- result.toString()
- }
-
- @Canonical
- private static class MaintainerScript {
- String name
- File file
- List