Ok,
so let say I have
<htmlTemplate>${basedir}/src/main/resources/mdl-js-index-template.html</htmlTemplate>
so "mdl-js-index-template.html" is the file processed by the compiler, that
file does not have the vars "primary" and "accent" inside (since it will be
overridden) and so this will not be used.
If I create another file (i.e: index.html) with the same code as
"mdl-js-index-template.html", but with the vars ${primary} and ${accent}, I
will get translated since is in resource folder, but the ones from compiler
${header}, ${body} will not processed right?
2016-12-01 19:02 GMT+01:00 Alex Harui <[email protected]>:
> This was discussed earlier in another thread. IIRC Chris says resources
> processing before compiling is the default in Maven and we shouldn't
> change it.
>
> I think you have the options of:
>
> 1) using -html-output-filename to tell the compiler to generate a
> different filename that won't bash the one you want
> 2) Using the resource plugin to generate a template like js-index-template
> that the compiler will fill in.
>
> We could add another config option or detect a special
> -html-output-filename that means don't generate html, but I would think
> option #2 would be best. That way the output html would pick up other
> stuff from the compiler like inject_html directives.
>
> -Alex
>
>
>
> On 12/1/16, 9:51 AM, "[email protected] on behalf of Carlos Rovira"
> <[email protected] on behalf of [email protected]>
> wrote:
>
> >I can confirm that compiler is overriding maven changes
> >
> >If I use
> >
> >mvn clean process-resources
> >
> >I can see the file with the right changes, and I think this is what we
> >need.
> >
> >So how could we change the order of this (first compiler, then process
> >resources)?
> >
> >Some thoughts?
> >
> >
> >
> >
> >El 1 de diciembre de 2016, 1:32, Alex Harui <[email protected]> escribió:
> >
> >> The compiler generates a new index.html. If the resource plugin runs
> >> first, then yes, the index.html will be overwritten, although if you use
> >> the resource plugin to generate the template, then the compiler should
> >> just fill in its part and not touch the stuff you added.
> >>
> >> On 11/30/16, 2:57 PM, "[email protected] on behalf of Carlos
> >>Rovira"
> >> <[email protected] on behalf of [email protected]>
> >> wrote:
> >>
> >> >Hi Chris,
> >> >
> >> >I just tried with maven using the following link
> >> >https://maven.apache.org/plugins/maven-resources-plugin/
> >> examples/filter.ht
> >> >ml
> >> >
> >> >in pom.xml insert:
> >> >
> >> ><properties>
> >> > <primary>indigo</primary>
> >> > <accent>pink</accent>
> >> > </properties>
> >> >
> >> >added filtering true here:
> >> >
> >> ><resource>
> >> > <directory>src/main/resources</directory>
> >> > <filtering>true</filtering>
> >> > </resource>
> >> >
> >> >in mdl-js-index-template.html use the vars
> >> >
> >> ><link rel="stylesheet" href="
> >> >https://code.getmdl.io/1.2.1/material.${primary}-${accent}.min.css">
> >> >
> >> >but nothing is changed and I get the same output
> >> >
> >> >I'm missing something? or maybe flexjs compiler is stoping the process
> >>of
> >> >the html file translation?
> >> >
> >> >I suppose that I only need to use mvn clean install right?
> >> >
> >> >Thanks
> >> >
> >> >Carlos
> >> >
> >> >
> >> >
> >> >El 30 de noviembre de 2016, 17:50, Christofer Dutz <
> >> >[email protected]> escribió:
> >> >
> >> >> When using the maven resource plugin it should be relatively easy to
> >>do
> >> >> this ...
> >> >>
> >> >> Chris
> >> >>
> >> >>
> >> >> Am 29.11.16, 23:48 schrieb "[email protected] im Auftrag von
> >> >>Carlos
> >> >> Rovira" <[email protected] im Auftrag von
> >> >> [email protected]>:
> >> >>
> >> >> Can I create a custom var in html template?
> >> >> if so how?
> >> >> for example, I'd like to add to my html ${color} (just like
> >>${body}
> >> >>or
> >> >> ${head}
> >> >> thanks
> >> >>
> >> >> --
> >> >>
> >> >> Carlos Rovira
> >> >> Director General
> >> >> M: +34 607 22 60 05
> >> >> http://www.codeoscopic.com
> >> >> http://www.avant2.es
> >> >>
> >> >> Este mensaje se dirige exclusivamente a su destinatario y puede
> >> >> contener
> >> >> información privilegiada o confidencial. Si ha recibido este
> >>mensaje
> >> >> por
> >> >> error, le rogamos que nos lo comunique inmediatamente por esta
> >>misma
> >> >> vía y
> >> >> proceda a su destrucción.
> >> >>
> >> >> De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> >> >> comunicamos
> >> >> que sus datos forman parte de un fichero cuyo responsable es
> >> >> CODEOSCOPIC
> >> >> S.A. La finalidad de dicho tratamiento es facilitar la prestación
> >> >>del
> >> >> servicio o información solicitados, teniendo usted derecho de
> >> >>acceso,
> >> >> rectificación, cancelación y oposición de sus datos dirigiéndose
> >>a
> >> >> nuestras
> >> >> oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la
> >> >>documentación
> >> >> necesaria.
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >--
> >> >
> >> >Carlos Rovira
> >> >Director General
> >> >M: +34 607 22 60 05
> >> >http://www.codeoscopic.com
> >> >http://www.avant2.es
> >> >
> >> >Este mensaje se dirige exclusivamente a su destinatario y puede
> >>contener
> >> >información privilegiada o confidencial. Si ha recibido este mensaje
> >>por
> >> >error, le rogamos que nos lo comunique inmediatamente por esta misma
> >>vía y
> >> >proceda a su destrucción.
> >> >
> >> >De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> >> >comunicamos
> >> >que sus datos forman parte de un fichero cuyo responsable es
> >>CODEOSCOPIC
> >> >S.A. La finalidad de dicho tratamiento es facilitar la prestación del
> >> >servicio o información solicitados, teniendo usted derecho de acceso,
> >> >rectificación, cancelación y oposición de sus datos dirigiéndose a
> >> >nuestras
> >> >oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
> >> >necesaria.
> >>
> >>
> >
> >
> >--
> >
> >Carlos Rovira
> >Director General
> >M: +34 607 22 60 05 <607%2022%2060%2005>
> >http://www.codeoscopic.com
> >http://www.avant2.es
> >
> >Este mensaje se dirige exclusivamente a su destinatario y puede contener
> >información privilegiada o confidencial. Si ha recibido este mensaje por
> >error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
> >proceda a su destrucción.
> >
> >De la vigente Ley Orgánica de Protección de Datos (15/1999), le
> >comunicamos
> >que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
> >S.A. La finalidad de dicho tratamiento es facilitar la prestación del
> >servicio o información solicitados, teniendo usted derecho de acceso,
> >rectificación, cancelación y oposición de sus datos dirigiéndose a
> >nuestras
> >oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
> >necesaria.
>
>
--
Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es
Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.
De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.