[MCHANGES-468] custom template can not be loaded anymore
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- build-system
Research direction
Start with the changes:announcement-generate goal and compare the documented template paths with src/main/resources/org/apache/maven/plugins/changes/announcement/announcement.vm and src/main/resources/announcements/announcement.vm. Reproduce the missing-resource error using the shown template and templateDirectory configuration; done means the custom template loads and the documentation points to the correct default-template location.
Written by the indexing model from the issue text.
Description
David Pilato opened MCHANGES-468 and commented
Hey team
I noticed few things about the mail generation when using a custom template.
First the default one moved from
src/main/resources/org/apache/maven/plugin/announcement/announcement.vm
to
src/main/resources/org/apache/maven/plugins/changes/announcement/announcement.vm
But the documentation proposes to download the default one that is included in the plugin from https://github.com/apache/maven-changes-plugin/blob/master/src/main/resources/org/apache/maven/plugins/announcement/announcement.vm although the file moved to https://github.com/apache/maven-changes-plugin/blob/master/src/main/resources/org/apache/maven/plugins/changes/announcement/announcement.vm.
Then when trying to use my own template by either overloading the default one in my project:
src/main/resources/org/apache/maven/plugins/changes/announcement/announcement.vm
Or by setting the following configuration:
<template>announcement.vm</template>
<templateDirectory>announcements</templateDirectory>
And creating my template in:
src/main/resources/announcements/announcement.vm
As suggested by the documentation.
When running:
mvn changes:announcement-generate
I'm getting:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-changes-plugin:3.0.0-M2:announcement-generate (default-cli) on project elasticsearch-beyonder: Resource not found.: Template not found. ( announcements/announcement.vm ): Unable to find resource 'announcements/announcement.vm' -> [Help 1]
Although my file does exist:
> ls -l src/main/resources/announcements/announcement.vm
{-}rw-r{-}{-}r{-}-@ 1 david staff 3535 Mar 6 19:28 src/main/resources/announcements/announcement.vm
I'm running
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: /Users/david/.sdkman/candidates/maven/current
Java version: 21.0.2, vendor: Oracle Corporation, runtime: /Users/david/.sdkman/candidates/java/21.0.2-open
Default locale: fr_FR, platform encoding: UTF-8
OS name: "mac os x", version: "15.3.1", arch: "aarch64", family: "mac"
Affects: 3.0.0-M2
- Dominant language
- Java
- Stars
- 15
- Forks
- 22
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 7
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/maven-changes-plugin
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
apache/maven-changes-plugin#650 ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 52/100
apache/maven-changes-plugin#633 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
apache/maven-changes-plugin#619 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
apache/maven-changes-plugin#610 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 30/100
apache/maven-changes-plugin#608 ·
All issues in apache/maven-changes-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100