keep-changelog-maven-plugin

Maven plugin to generate CHANGELOG.md based on YAML files, which are representing single entry in changelog.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

io.github.marwin1991
ArtifactId

ArtifactId

keep-changelog-maven-plugin
Last Version

Last Version

0.3.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

keep-changelog-maven-plugin
Maven plugin to generate CHANGELOG.md based on YAML files, which are representing single entry in changelog.
Project URL

Project URL

https://github.com/marwin1991/keep-changelog-maven-plugin
Source Code Management

Source Code Management

https://github.com/marwin1991/keep-changelog-maven-plugin.git

Download keep-changelog-maven-plugin

How to add to project

<plugin>
    <groupId>io.github.marwin1991</groupId>
    <artifactId>keep-changelog-maven-plugin</artifactId>
    <version>0.3.0</version>
</plugin>

Dependencies

compile (6)

Group / Artifact Type Version
org.projectlombok : lombok-maven pom 1.18.18.0
org.apache.maven : maven-plugin-api jar 3.6.3
org.apache.maven : maven-project jar 2.2.1
com.github.beosign » snakeyaml-anno jar 1.2.0
com.github.Steppschuh » Java-Markdown-Generator jar 1.3.2
org.apache.commons : commons-text jar 1.9

provided (2)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.18
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.6.0

test (1)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter jar 5.7.1

Project Modules

There are no modules declared in this project.

keep-changelog-maven-plugin

CHANGELOG.md is one of the most important files in a repository. It allows others to find out about the most important changes in the project in short time. To achieve this, CHANGELOG.md should be created be in accordance with the rules, however there is no one standard agreed by community.

Another big problem with CHANGELOG.md is a problem with merge conflicts. Probably you, as a developer also encounter it, when someone merged changes to CHANGELOG.md before you.

To solve these problems, this maven plugin was created. It allows to keep a changelog style and reduce merge request conflicts by keeping every change in a separate YAML file and generate CHANGELOG.md during release.

This plugin is also helpful to create reliable release notes during your release process.

Reference

The convention is maintained according to the principles set out in the Keep a Changelog and with some additions as a result from experience in developing various types of projects.

The same problem with merge conflicts with CHANGELOG.md was described by GitLab. LINK

Example

The example project with this plugin usage you can find in example directory.

Usage

Starting

Add a plugin to your pom.xml. For multi-module projects with one CHANGELOG.md add it in main pom.xml.

    <build>
        <plugins>
            <plugin>
                <groupId>io.github.marwin1991</groupId>
                <artifactId>keep-changelog-maven-plugin</artifactId>
                <version>0.3.0</version>
            </plugin>
        </plugins>
    </build>

[in-progress] Use this command from your terminal to create important directories and empty CHANGELOG.md

mvn keep-changelog:init

If you already had a CHANGELOG.md file you can move it to changelog/archive.md file. The name of the archive file have to start from archive phrase (f.e. archive-1.0.0.md).

After using init command or just creating changelog/unreleased directory your project is ready, and you can start adding new changelog entries by creating YAML files.

IMPORTANT: If you develop on two main branches like f.e 1.1.X and 1.2.X do not merge 1.1.X branch to 1.2.X before release otherwise YAML files will merge in one big version. In future there is a plan to support unreleased* directories names like unreleased-1.1

Adding new change

TODO

YAML format

TODO

Generating CHANGELOG.md

TODO

CHANGELOG.md structure overview

TODO

Versions summaries

TODO

Releasing the version

TODO

Archives

TODO

TODO:

  • add command to create archive-X.md from selected directory
  • add tests
  • add javadocs
  • support unreleased* directories names like unreleased-1.1

Versions

Version
0.3.0
0.2.0
0.1.0