<div dir="ltr"><div><div><div><div><div>1) To create a JavaClass you are free to choose whether Freemarker templates are more adequate or use Roaster to create the class using an API [1]<br></div>2) To create an application.yaml file, you can use this code: <br><br></div>ResourcesFacet resources = project.getFacet(<wbr>ResourcesFacet.class);<br></div>YamlResource applicationYaml = resources.getResource(&quot;<wbr>application.yaml&quot;).as(YamlResource.class);<br></div>applicationYaml.createNewFile();<br></div>// Manipulate the model as in [2]<br><div><div><div><div><div><div><div><br><br>[1] <a href="https://github.com/forge/roaster" target="_blank">https://github.com/forge/<wbr>roaster</a><br>[2] <a href="https://github.com/forge/core/blob/master/parser-yaml/README.asciidoc">https://github.com/forge/core/blob/master/parser-yaml/README.asciidoc</a><br></div></div></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail-m_2635961542054312338gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b>George Gastaldi</b><br><br><a href="https://onename.com/gastaldi" target="_blank">https://onename.com/gastaldi</a><br></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Mar 9, 2017 at 2:59 PM, Charles Moulliard <span dir="ltr">&lt;<a href="mailto:cmoullia@redhat.com" target="_blank">cmoullia@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>As there are different strategies to scaffold code of a project, I would like to get your opinion about the idea to use the template approach (ex. Rest.ftl) using freemarker [1] or to create the files using JavaFacet, .... for a Spring project</div><div><br></div><div>Can we create easily a Java Class with @Annotations ?</div><div>What do you suggest to do to by example setup src/main/resources/application<wbr>.yaml file</div><div><br></div><div>[1] <a href="https://github.com/obsidian-toaster/obsidian-addon/blob/master/src/main/java/org/obsidiantoaster/generator/ui/starter/PerformExtraTasksStep.java" target="_blank">https://github.com/obsidian-to<wbr>aster/obsidian-addon/blob/mast<wbr>er/src/main/java/org/obsidiant<wbr>oaster/generator/ui/starter/<wbr>PerformExtraTasksStep.java</a></div><div>[2] : <a href="https://github.com/forge/wildfly-swarm-addon/blob/master/src/main/java/org/jboss/forge/addon/swarm/ui/CreateRestEndpointStep.java#L47-L60" target="_blank">https://github.com/forge/wil<wbr>dfly-swarm-addon/blob/master/<wbr>src/main/java/org/jboss/forge/<wbr>addon/swarm/ui/CreateRestEndpo<wbr>intStep.java#L47-L60</a></div><div><br></div><div>Regards,</div><span class="gmail-m_2635961542054312338HOEnZb"><font color="#888888"><div> </div><div><div><div class="gmail-m_2635961542054312338m_3329054245305123101gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:&quot;liberation sans&quot;,&quot;open sans&quot;,sans-serif;line-height:22.4px"><font color="#444444">Charles </font><b style="color:rgb(74,74,74)"><span></span></b></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></font></span></div>
<br>______________________________<wbr>_________________<br>
forge-users mailing list<br>
<a href="mailto:forge-users@lists.jboss.org" target="_blank">forge-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/forge-users</a><br></blockquote></div><br></div></div></div></div>