ciao!
volevo testare la libreria Mustache usando Maven.
nel mio main:
a questo punto ho creato la cartella resources con dentro il template; le cartelle sono così:codice:public class Main { public static void main(String[] args) { try { MustacheFactory mf = new DefaultMustacheFactory(); Mustache mustache = mf.compile("template.mustache"); mustache.execute(new PrintWriter(System.out), new MustacheExample()).flush(); } catch (IOException ex) { System.out.println(ex.getMessage()); } } }
in fase di esecuzione ottengo questo:codice:src/main/java -com --mp ---test --> MAIN -resources --> TEMPLATE
in sostanza, suppongo, non trova il template che gli indico.codice:Exception in thread "main" com.github.mustachejava.MustacheNotFoundException: Template template.mustache not found
come devo richiamare il file di risorse con Maven??

Rispondi quotando