= Packagers

After a release is created at the desired remote Git host, JReleaser can generate and publish specialized packagers
into their respective distribution media, such a Git repository you have access to, or a packager store.

The sections defined here can be applied globally (for all distributions) or per distribution. Global configuration is
inherited by distributions. Here's for example how xref:packagers/homebrew.adoc[] and xref:packagers/scoop.adoc[]
can be activated for all distributions:

[tabs]
====
YAML::
+
[source,yaml]
[subs="+macros"]
----
packagers:
  brew:
    active: ALWAYS
  scoop:
    active: ALWAYS
----
TOML::
+
[source,toml]
[subs="+macros"]
----
[packagers]
  brew.active = "ALWAYS"
  scoop.active = "ALWAYS"
----
JSON::
+
[source,json]
[subs="+macros"]
----
{
  "packagers": {
     "brew": {
       "active": "ALWAYS"
     },
     "scoop": {
       "active": "ALWAYS"
     }
  }
}
----
Maven::
+
[source,xml]
[subs="+macros,verbatim"]
----
<jreleaser>
  <packagers>
    <brew>
      <active>ALWAYS</active>
    </brew>
    <scoop>
      <active>ALWAYS</active>
    </scoop>
  </packagers>
</jreleaser>
----
Gradle::
+
[source,groovy]
[subs="+macros"]
----
jreleaser {
  packagers {
    brew {
      active = 'ALWAYS'
    }
    scoop {
      active = 'ALWAYS'
    }
  }
}
----
====

Given this setup here's how a distribution may inherit that configuration and disable Scoop while keeping Homebrew active:

[tabs]
====
YAML::
+
[source,yaml]
[subs="+macros"]
----
packagers:
  brew:
    active: ALWAYS
  scoop:
    active: ALWAYS

distributions:
  app:
    scoop:
      active: NEVER
----
TOML::
+
[source,toml]
[subs="+macros"]
----
[packagers]
  brew.active = "ALWAYS"
  scoop.active = "ALWAYS"

[distributions.app]
  scoop.active = "NEVER"
----
JSON::
+
[source,json]
[subs="+macros"]
----
{
  "packagers": {
     "brew": {
       "active": "ALWAYS"
     },
     "scoop": {
       "active": "ALWAYS"
     }
  },
  "distributions": {
    "app": {
      "scoop": {
        "active": "NEVER"
      }
    }
  }
}
----
Maven::
+
[source,xml]
[subs="+macros,verbatim"]
----
<jreleaser>
  <packagers>
    <brew>
      <active>ALWAYS</active>
    </brew>
    <scoop>
      <active>ALWAYS</active>
    </scoop>
  </packagers>
  <distributions>
    <app>
      <scoop>
        <active>NEVER</active>
      </scoop>
    </app>
  </distributions>
</jreleaser>
----
Gradle::
+
[source,groovy]
[subs="+macros"]
----
jreleaser {
  packagers {
    brew {
      active = 'ALWAYS'
    }
    scoop {
      active = 'ALWAYS'
    }
  }
  distributions {
    app {
      scoop {
        active = 'NEVER'
      }
    }
  }
}
----
====

NOTE: Values set at the `packagers` level may be overridden with those set at the `distributions` level.

