/redmine-maven-plugin

Maven plugin for redmine

Primary LanguageJavaApache License 2.0Apache-2.0

redmine-maven-plugin

Maven plugin for redmine

Versions in Redmine must follow this pattern: [prefix-]x[.y[.z]]

Valid versions are e.g.:

  • 1.1.0
  • subproject-1.2
  • sub-1

Goals

  • changelog to create changelog
  • rpm-changelog to create changelog with RPM style (All closed versions)
  • close-version to close version
  • create-version to create new version
  • rename-version to rename a version
  • print to print changelog to console
  • assert-closed to assert that all tickets are closed

Configuration

Find below the possible parameters for the plugin. The string in () is the maven expression. The string in [] is the default value.

Global

  • redmineUrl The URL of the Redmine system () [${project.issueManagement.url}]
  • redmineKey The API key to access Redmine (redmineKey) []
  • projectIdentifier the name of the project in Redmine (projectIdentifier) [${project.artifactId}]
  • projectVersionPrefix The version prefix (projectVersionPrefix) []

changelog

  • changelogFile The target file () [target/redmine/changelog]
  • changelogVersion The version to print changelog for (changelogVersion) [${project.version}]
  • changelogTemplate The freemarker template file for generated changelog []

rpm-changelog

  • rpmChangelogFile The target file () [target/redmine/rpm-changelog]
  • rpmChangelogAuthor The author in RPM format (rpmChangelogAuthor) []
  • rpmMinimalVersion The version to start changelog with (rpmMinimalVersion) [0.0.0]
  • changelogTemplate The freemarker template file for generated changelog []

print

  • changelogVersion The version to print changelog for (changelogVersion) [${project.version}]
  • changelogTemplate The freemarker template file for generated changelog []

close-version

  • closeVersion The version to close (closeVersion) [${project.version}]

create-version

  • createVersion The version to create (createVersion) [${project.version}]

rename-version

  • renameVersion The version to rename (renameVersion) [${project.version}]
  • newName The new version name (newName) [${project.version}]

assert-closed

  • assertVersion The version to check for open tickets (assertVersion) [${project.version}]

Usage example

<plugin>
	<groupId>de.taimos</groupId>
	<artifactId>redmine-maven-plugin</artifactId>
	<version>1.7.0</version>
	<configuration>
		<projectIdentifier>myproject</projectIdentifier>
		<projectVersionPrefix>myprefix</projectVersionPrefix>
		<changelogFile>target/redmine/changelog</changelogFile>
		<changelogVersion>${project.version}</changelogVersion>
		<rpmChangelogFile>target/redmine/rpmchangelog</rpmChangelogFile>
		<rpmChangelogAuthor>John Doe &lt;john@doe.com&gt;</rpmChangelogAuthor>
	</configuration>
</plugin>

changelogTemplate usage example

For example, if changelogTemplate variable specifies path to file with the following content:

<html>
<head>Simple test template</head>
<body>
<#list versions as version>
    ${version}
    <#assign tickets = tickets[version]/>
        <#list tickets as ticket>
            #${ticket.id} - ${ticket.subject}
        </#list>
</#list>
</body>
</html>

After executing maven goal redmine:changelog the output file changelog will be look like this:

<html>
<head>Simple test template</head>
<body>
    Version [description=Test version, name=TEST, status=READY]
            #101 - First ticket
            #102 - Second ticket
</body>
</html>