Declarative system for Java RPM packaging
Dola is a modern, declarative system for RPM packaging of Maven-based
Java projects. It enables package maintainers to entirely avoid
writing %prep, %build, or %install scriptlets in RPM spec files.
Instead, all build configuration is expressed using BuildOption tags
(introduced in RPM 4.20), resulting in cleaner, more maintainable spec
files.
Traditional RPM packaging for Java has relied heavily on scripting within spec files. Tools like XMvn and Javapackages-Tools significantly improved this by automating and standardizing Maven builds and artifact packaging. However, even these tools still require some executable configuration, often embedded in %prep through macro calls.
Dola takes this a step further by introducing a fully declarative, data-driven approach to spec file creation. While it leverages XMvn internally, Dola adds a higher-level abstraction that allows most Java build processes to be defined purely through data, eliminating the need for scriptlets. This enhances consistency, readability, and automation across Java packaging workflows, and lays the groundwork for future tooling to automatically process spec files, since declarative configurations are easier to analyze and transform.
-
No Explicit Build Scriptlets
Dola automatically generates%prep,%build, and%installsections. Custom scriptlets can still be added when needed. -
Dynamic BuildRequires Generation
Analyzes Maven projects and translates build-time dependencies into RPMBuildRequires. -
Interoperability
Packages built with Dola remain fully compatible with traditional Java packages that usejavapackages-tools. -
Automation-Friendly
The declarative nature of Dola specs enables automated refactoring, validation, and bulk transformations across package sets. -
Conversion to Imperative Form
Declarative specs can be automatically converted to traditional, imperative RPM spec files compatible with systems using RPM < 4.20.
For description of the syntax for declarative spec files, see the Reference Manual.
Dola is free software. You can redistribute and/or modify it under the terms of Apache License Version 2.0.
Dola was written by Mikolaj Izdebski.