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
- 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
Find below the possible parameters for the plugin. The string in () is the maven expression. The string in [] is the default value.
- 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) []
- 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 []
- 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 []
- changelogVersion The version to print changelog for (changelogVersion) [${project.version}]
- changelogTemplate The freemarker template file for generated changelog []
- closeVersion The version to close (closeVersion) [${project.version}]
- createVersion The version to create (createVersion) [${project.version}]
- renameVersion The version to rename (renameVersion) [${project.version}]
- newName The new version name (newName) [${project.version}]
- assertVersion The version to check for open tickets (assertVersion) [${project.version}]
<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 <john@doe.com></rpmChangelogAuthor>
</configuration>
</plugin>
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>