apache / apache/maven-changes-plugin
[MCHANGES-468] custom template can not be loaded anymore
- Lingua principale
- Java
- Stelle
- 15
- Fork
- 22
- Merge medio
- 8h 1m
- PR unite (30g)
- 3
Descrizione
**[David Pilato](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=dadoonet)** opened **[MCHANGES-468](https://issues.apache.org/jira/browse/MCHANGES-468?redirect=false)** 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](https://maven.apache.org/plugins/maven-changes-plugin/examples/using-a-custom-announcement-template.html) 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.](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:
`announcement.vm`
`announcements`
And creating my template in:
`src/main/resources/announcements/announcement.vm`
As suggested by [the documentation](https://maven.apache.org/plugins/maven-changes-plugin/examples/using-a-custom-announcement-template.html).
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia con le modifiche:announcement-generate e confronta i percorsi dei template documentati con src/main/resources/org/apache/maven/plugins/changes/announcement/announcement.vm e src/main/resources/announcements/announcement.vm. Riproduci l’errore di risorsa mancante usando il template e la configurazione templateDirectory mostrati; il lavoro è completato quando il template personalizzato viene caricato e la documentazione indica la posizione corretta del template predefinito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- build-system
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100