enonic / xp-distro

Enonic XP full distribution.
GNU General Public License v3.0
3 stars 3 forks source link

Add DEB and RPM artifacts #142

Open edloidas opened 3 years ago

edloidas commented 3 years ago

There are high-quality plugins from Nebula (Netflix) for creating DED and RPM artifacts. Investigate and add it to the publishing along with other Linux artifacts.

edloidas commented 3 years ago

A configuration may look like this:

plugins {
  // ...
  id 'nebula.deb' version '8.4.1'
  id 'nebula.rpm' version '8.4.1'
}

// ...

task distDeb( type: Deb, dependsOn: [copyDist, jdk] ) {
    description = 'Build full distribution DEB package'
    packageName = targetArtifactId()
    version = version
    arch = 'X86_64'
    os = 'LINUX'
    from installDir
    into archiveBase
}

task distRpm( type: Rpm, dependsOn: [copyDist, jdk] ) {
    description = 'Build full distribution RPM package'
    packageName = targetArtifactId()
    version = version
    arch = 'X86_64'
    os = 'LINUX'
    from installDir
    into archiveBase
}

// ...

publishing {
    publications {
        mavenJava( MavenPublication ) {
            artifactId targetArtifactId()
            artifact distTar
            artifact distDeb
            artifact distRpm
        }
    }
}