You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Petar Tahchiev <pa...@gmail.com> on 2016/04/19 20:26:56 UTC

Does doxia render velocity macros in site

Hello,

I'm asking this question here, as I don't really see the answer in the
documentation or anywhere else on the internet. If you have a website
document: src/site/asciidoc/index.adoc.vm and you use a velocity macro in
it:

# myMacro()


I know doxia will process the velocity and it works fine, but will it also
process the macro? I doesn't work for me, and I'm not sure if it is
implemented at all. I'm trying to debug it now, but I can't seem to find
any setting regarding this.

P.S. myMacro is defined in my own custom theme and I can see in the -X log
that it is being picked up:

[INFO] Rendering 1 Doxia document: 1 asciidoc
[DEBUG] Generating /home/petar/workspace/test/target/site/index.html
[DEBUG] Processing Velocity for index.adoc.vm
[DEBUG] Processing Velocity for template META-INF/maven/site.vm on
index.adoc.vm
[DEBUG] Velocimacro : added VM link: source=META-INF/maven/site.vm
[DEBUG] Velocimacro : added VM image: source=META-INF/maven/site.vm
[DEBUG] Velocimacro : added VM banner: source=META-INF/maven/site.vm
[DEBUG] Velocimacro : added VM links: source=META-INF/maven/site.vm
[DEBUG] Velocimacro : added VM breadcrumbs: source=META-INF/maven/site.vm
[DEBUG] Velocimacro : added VM displayTree: source=META-INF/maven/site.vm
[DEBUG] Velocimacro : added VM menuItem: source=META-INF/maven/site.vm
[DEBUG] Velocimacro : added VM mainMenu: source=META-INF/maven/site.vm
[DEBUG] Velocimacro : added VM copyright: source=META-INF/maven/site.vm
[DEBUG] Velocimacro : added VM publishDate: source=META-INF/maven/site.vm
[DEBUG] Velocimacro : added VM poweredByLogo: source=META-INF/maven/site.vm
[DEBUG] Velocimacro : added VM googleAnalytics:
source=META-INF/maven/site.vm
[DEBUG] Velocimacro : added VM myMacro: source=META-INF/maven/site.vm


-- 
Regards, Petar!
Karlovo, Bulgaria.
---
Public PGP Key at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611

Re: Re: Re: Does doxia render velocity macros in site

Posted by Petar Tahchiev <pa...@gmail.com>.
Hi Michael,

I have a custom theme, but what you have written doesn't work. It gives me:

[ERROR] ResourceManager : unable to find resource
'C:\test\src\site\asciidoc/macro.vm' in any resource loader.

Anyways, I think it's a nice feature, but I'll just leave it like this.

Thanks for the reply

2016-04-20 15:04 GMT+02:00 Michael Osipov <19...@gmx.net>:

> If your parse.vm lives next to your template.vm, call #parse('parse.vm')
> and
> your macro should be available to the rest. Though, I have not tried that.
> You will probably have to create a custom skin. You should really create
> complete sample project.
>
> Michael
>
> > Gesendet: Mittwoch, 20. April 2016 um 14:51 Uhr
> > Von: "Petar Tahchiev" <pa...@gmail.com>
> > An: "Maven Developers List" <de...@maven.apache.org>
> > Betreff: Re: Re: Does doxia render velocity macros in site
> >
> > Indeed,
> >
> > with MSITE 3.5.1 I can add my macro in a .vm file next to my
> documentation,
> > but since i have 50 modules in my project and they are require this macro
> > it kind of makes it unusable. I was hoping to have it declared in my
> theme
> > just once, and then reference it from every module.
> >
> > 2016-04-20 13:13 GMT+02:00 Michael Osipov <19...@gmx.net>:
> >
> > > > Here's the test repo:
> > > >
> > > > https://github.com/ptahchiev/maven-velocity-macro
> > >
> > > Cloned and tested. Upgrade to MSITE 3.5.1 and your pain will go away.
> > > #parse/#include
> > > has been resolved with DOXIASITETOOLS 1.7.1/MSITE 3.5.1.
> > >
> > > Michael
> > >
> > > > 2016-04-20 8:57 GMT+02:00 Petar Tahchiev <pa...@gmail.com>:
> > > >
> > > > > Ok,
> > > > >
> > > > > here's what I've tried:
> > > > >    = NOMACRO: I create a file properties.vm, right next to my
> > > > > index.adoc.vm and inside it I put
> > > > >
> > > > >       #set($a = "Petar")
> > > > >       $a
> > > > >
> > > > >       then inside my index.adoc.vm I put
> > > > >       #parse("properties.vm")
> > > > >
> > > > >       [ERROR] Max recursion depth reached (10) File stack: >
> > > > > C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
> > > > > properties.vm > properties.vm > properties.vm > properties.vm >
> > > > > properties.vm > properties.vm > properties.vm > properties.vm
> > > > >
> > > > >    = MACRO: again I create properties.vm right next to my
> index.adoc.vm
> > > > > and inside it I put
> > > > >
> > > > >       #macro( petar )
> > > > >           Petar
> > > > >       #end
> > > > >
> > > > >        then inside the index.adoc.vm I put:
> > > > >
> > > > >      #parse("properties.vm")
> > > > >      #petar()
> > > > >
> > > > > and I get
> > > > >
> > > > > [ERROR] Max recursion depth reached (10) File stack: >
> > > > > C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
> > > > > properties.vm > properties.vm > properties.vm > properties.vm >
> > > > > properties.vm > properties.vm > properties.vm > properties.vm
> > > > >
> > > > >      = MACRO IN THEME: I put properties.vm right next to site.vm
> in my
> > > > > theme and I reference it from index.adov.vm with
> > > #parse("properties.vm")
> > > > > and maven does not find the file.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > I'll try to make a test project.
> > > > >
> > > > >
> > > > >
> > > > > 2016-04-20 8:42 GMT+02:00 Michael Osipov <mi...@apache.org>:
> > > > >
> > > > >> Am 2016-04-20 um 08:35 schrieb Petar Tahchiev:
> > > > >>
> > > > >>> Hi Michael,
> > > > >>>
> > > > >>> I had a chat with Herve last night, and he mentioned this is
> > > actually not
> > > > >>> possible. If one wants to use velocity macros one must put it in
> the
> > > site
> > > > >>> (if you put them in your theme it will not work). Which is a
> shame,
> > > as I
> > > > >>> have a project with 50 submodules and each module requires
> #myMacro()
> > > > >>> just
> > > > >>> once, so I was hoping to have it declared once in the site.vm in
> the
> > > > >>> theme,
> > > > >>> and then use it in each of those modules.
> > > > >>>
> > > > >>
> > > > >> Seriously? We now have #parse() support. That should actually
> parse
> > > your
> > > > >> subtemplate and make the macro available. Have you tried that?
> > > Templates
> > > > >> which are not skins are deprecated though and have limited
> support.
> > > They
> > > > >> will be removed in 2.0.
> > > > >>
> > > > >> Michael
> > > > >>
> > > > >>
> > > > >> 2016-04-20 8:31 GMT+02:00 Michael Osipov <mi...@apache.org>:
> > > > >>>
> > > > >>> Am 2016-04-19 um 20:26 schrieb Petar Tahchiev:
> > > > >>>>
> > > > >>>> Hello,
> > > > >>>>>
> > > > >>>>> I'm asking this question here, as I don't really see the
> answer in
> > > the
> > > > >>>>> documentation or anywhere else on the internet. If you have a
> > > website
> > > > >>>>> document: src/site/asciidoc/index.adoc.vm and you use a
> velocity
> > > macro
> > > > >>>>> in
> > > > >>>>> it:
> > > > >>>>>
> > > > >>>>> # myMacro()
> > > > >>>>>
> > > > >>>>>
> > > > >>>>> I know doxia will process the velocity and it works fine, but
> will
> > > it
> > > > >>>>> also
> > > > >>>>> process the macro? I doesn't work for me, and I'm not sure if
> it is
> > > > >>>>> implemented at all. I'm trying to debug it now, but I can't
> seem to
> > > > >>>>> find
> > > > >>>>> any setting regarding this.
> > > > >>>>>
> > > > >>>>>
> > > > >>>> Hervé and me have been working at Doxia and the rest lately a
> lot.
> > > Do
> > > > >>>> you
> > > > >>>> think you could create a sample project for that? I would take a
> > > look
> > > > >>>> at it.
> > > > >>>>
> > > > >>>> Michael
> > > > >>>>
> > > > >>>>
> > > > >>>>
> > > > >>>>
> > > ---------------------------------------------------------------------
> > > > >>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > >>>> For additional commands, e-mail: dev-help@maven.apache.org
> > > > >>>>
> > > > >>>>
> > > > >>>>
> > > > >>>
> > > > >>>
> > > > >>
> > > > >>
> > > > >>
> ---------------------------------------------------------------------
> > > > >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > >> For additional commands, e-mail: dev-help@maven.apache.org
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > > --
> > > > > Regards, Petar!
> > > > > Karlovo, Bulgaria.
> > > > > ---
> > > > > Public PGP Key at:
> > > > >
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> > > > > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Regards, Petar!
> > > > Karlovo, Bulgaria.
> > > > ---
> > > > Public PGP Key at:
> > > > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> > > > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > Regards, Petar!
> > Karlovo, Bulgaria.
> > ---
> > Public PGP Key at:
> > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
Regards, Petar!
Karlovo, Bulgaria.
---
Public PGP Key at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611

Re: Re: Re: Does doxia render velocity macros in site

Posted by Michael Osipov <19...@gmx.net>.
If your parse.vm lives next to your template.vm, call #parse('parse.vm') and
your macro should be available to the rest. Though, I have not tried that.
You will probably have to create a custom skin. You should really create
complete sample project.

Michael

> Gesendet: Mittwoch, 20. April 2016 um 14:51 Uhr
> Von: "Petar Tahchiev" <pa...@gmail.com>
> An: "Maven Developers List" <de...@maven.apache.org>
> Betreff: Re: Re: Does doxia render velocity macros in site
>
> Indeed,
> 
> with MSITE 3.5.1 I can add my macro in a .vm file next to my documentation,
> but since i have 50 modules in my project and they are require this macro
> it kind of makes it unusable. I was hoping to have it declared in my theme
> just once, and then reference it from every module.
> 
> 2016-04-20 13:13 GMT+02:00 Michael Osipov <19...@gmx.net>:
> 
> > > Here's the test repo:
> > >
> > > https://github.com/ptahchiev/maven-velocity-macro
> >
> > Cloned and tested. Upgrade to MSITE 3.5.1 and your pain will go away.
> > #parse/#include
> > has been resolved with DOXIASITETOOLS 1.7.1/MSITE 3.5.1.
> >
> > Michael
> >
> > > 2016-04-20 8:57 GMT+02:00 Petar Tahchiev <pa...@gmail.com>:
> > >
> > > > Ok,
> > > >
> > > > here's what I've tried:
> > > >    = NOMACRO: I create a file properties.vm, right next to my
> > > > index.adoc.vm and inside it I put
> > > >
> > > >       #set($a = "Petar")
> > > >       $a
> > > >
> > > >       then inside my index.adoc.vm I put
> > > >       #parse("properties.vm")
> > > >
> > > >       [ERROR] Max recursion depth reached (10) File stack: >
> > > > C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
> > > > properties.vm > properties.vm > properties.vm > properties.vm >
> > > > properties.vm > properties.vm > properties.vm > properties.vm
> > > >
> > > >    = MACRO: again I create properties.vm right next to my index.adoc.vm
> > > > and inside it I put
> > > >
> > > >       #macro( petar )
> > > >           Petar
> > > >       #end
> > > >
> > > >        then inside the index.adoc.vm I put:
> > > >
> > > >      #parse("properties.vm")
> > > >      #petar()
> > > >
> > > > and I get
> > > >
> > > > [ERROR] Max recursion depth reached (10) File stack: >
> > > > C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
> > > > properties.vm > properties.vm > properties.vm > properties.vm >
> > > > properties.vm > properties.vm > properties.vm > properties.vm
> > > >
> > > >      = MACRO IN THEME: I put properties.vm right next to site.vm in my
> > > > theme and I reference it from index.adov.vm with
> > #parse("properties.vm")
> > > > and maven does not find the file.
> > > >
> > > >
> > > >
> > > >
> > > > I'll try to make a test project.
> > > >
> > > >
> > > >
> > > > 2016-04-20 8:42 GMT+02:00 Michael Osipov <mi...@apache.org>:
> > > >
> > > >> Am 2016-04-20 um 08:35 schrieb Petar Tahchiev:
> > > >>
> > > >>> Hi Michael,
> > > >>>
> > > >>> I had a chat with Herve last night, and he mentioned this is
> > actually not
> > > >>> possible. If one wants to use velocity macros one must put it in the
> > site
> > > >>> (if you put them in your theme it will not work). Which is a shame,
> > as I
> > > >>> have a project with 50 submodules and each module requires #myMacro()
> > > >>> just
> > > >>> once, so I was hoping to have it declared once in the site.vm in the
> > > >>> theme,
> > > >>> and then use it in each of those modules.
> > > >>>
> > > >>
> > > >> Seriously? We now have #parse() support. That should actually parse
> > your
> > > >> subtemplate and make the macro available. Have you tried that?
> > Templates
> > > >> which are not skins are deprecated though and have limited support.
> > They
> > > >> will be removed in 2.0.
> > > >>
> > > >> Michael
> > > >>
> > > >>
> > > >> 2016-04-20 8:31 GMT+02:00 Michael Osipov <mi...@apache.org>:
> > > >>>
> > > >>> Am 2016-04-19 um 20:26 schrieb Petar Tahchiev:
> > > >>>>
> > > >>>> Hello,
> > > >>>>>
> > > >>>>> I'm asking this question here, as I don't really see the answer in
> > the
> > > >>>>> documentation or anywhere else on the internet. If you have a
> > website
> > > >>>>> document: src/site/asciidoc/index.adoc.vm and you use a velocity
> > macro
> > > >>>>> in
> > > >>>>> it:
> > > >>>>>
> > > >>>>> # myMacro()
> > > >>>>>
> > > >>>>>
> > > >>>>> I know doxia will process the velocity and it works fine, but will
> > it
> > > >>>>> also
> > > >>>>> process the macro? I doesn't work for me, and I'm not sure if it is
> > > >>>>> implemented at all. I'm trying to debug it now, but I can't seem to
> > > >>>>> find
> > > >>>>> any setting regarding this.
> > > >>>>>
> > > >>>>>
> > > >>>> Hervé and me have been working at Doxia and the rest lately a lot.
> > Do
> > > >>>> you
> > > >>>> think you could create a sample project for that? I would take a
> > look
> > > >>>> at it.
> > > >>>>
> > > >>>> Michael
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > ---------------------------------------------------------------------
> > > >>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > >>>> For additional commands, e-mail: dev-help@maven.apache.org
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>
> > > >>>
> > > >>
> > > >>
> > > >> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: dev-help@maven.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > Regards, Petar!
> > > > Karlovo, Bulgaria.
> > > > ---
> > > > Public PGP Key at:
> > > > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> > > > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
> > > >
> > >
> > >
> > >
> > > --
> > > Regards, Petar!
> > > Karlovo, Bulgaria.
> > > ---
> > > Public PGP Key at:
> > > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> > > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> 
> 
> -- 
> Regards, Petar!
> Karlovo, Bulgaria.
> ---
> Public PGP Key at:
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Re: Does doxia render velocity macros in site

Posted by Petar Tahchiev <pa...@gmail.com>.
Indeed,

with MSITE 3.5.1 I can add my macro in a .vm file next to my documentation,
but since i have 50 modules in my project and they are require this macro
it kind of makes it unusable. I was hoping to have it declared in my theme
just once, and then reference it from every module.

2016-04-20 13:13 GMT+02:00 Michael Osipov <19...@gmx.net>:

> > Here's the test repo:
> >
> > https://github.com/ptahchiev/maven-velocity-macro
>
> Cloned and tested. Upgrade to MSITE 3.5.1 and your pain will go away.
> #parse/#include
> has been resolved with DOXIASITETOOLS 1.7.1/MSITE 3.5.1.
>
> Michael
>
> > 2016-04-20 8:57 GMT+02:00 Petar Tahchiev <pa...@gmail.com>:
> >
> > > Ok,
> > >
> > > here's what I've tried:
> > >    = NOMACRO: I create a file properties.vm, right next to my
> > > index.adoc.vm and inside it I put
> > >
> > >       #set($a = "Petar")
> > >       $a
> > >
> > >       then inside my index.adoc.vm I put
> > >       #parse("properties.vm")
> > >
> > >       [ERROR] Max recursion depth reached (10) File stack: >
> > > C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
> > > properties.vm > properties.vm > properties.vm > properties.vm >
> > > properties.vm > properties.vm > properties.vm > properties.vm
> > >
> > >    = MACRO: again I create properties.vm right next to my index.adoc.vm
> > > and inside it I put
> > >
> > >       #macro( petar )
> > >           Petar
> > >       #end
> > >
> > >        then inside the index.adoc.vm I put:
> > >
> > >      #parse("properties.vm")
> > >      #petar()
> > >
> > > and I get
> > >
> > > [ERROR] Max recursion depth reached (10) File stack: >
> > > C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
> > > properties.vm > properties.vm > properties.vm > properties.vm >
> > > properties.vm > properties.vm > properties.vm > properties.vm
> > >
> > >      = MACRO IN THEME: I put properties.vm right next to site.vm in my
> > > theme and I reference it from index.adov.vm with
> #parse("properties.vm")
> > > and maven does not find the file.
> > >
> > >
> > >
> > >
> > > I'll try to make a test project.
> > >
> > >
> > >
> > > 2016-04-20 8:42 GMT+02:00 Michael Osipov <mi...@apache.org>:
> > >
> > >> Am 2016-04-20 um 08:35 schrieb Petar Tahchiev:
> > >>
> > >>> Hi Michael,
> > >>>
> > >>> I had a chat with Herve last night, and he mentioned this is
> actually not
> > >>> possible. If one wants to use velocity macros one must put it in the
> site
> > >>> (if you put them in your theme it will not work). Which is a shame,
> as I
> > >>> have a project with 50 submodules and each module requires #myMacro()
> > >>> just
> > >>> once, so I was hoping to have it declared once in the site.vm in the
> > >>> theme,
> > >>> and then use it in each of those modules.
> > >>>
> > >>
> > >> Seriously? We now have #parse() support. That should actually parse
> your
> > >> subtemplate and make the macro available. Have you tried that?
> Templates
> > >> which are not skins are deprecated though and have limited support.
> They
> > >> will be removed in 2.0.
> > >>
> > >> Michael
> > >>
> > >>
> > >> 2016-04-20 8:31 GMT+02:00 Michael Osipov <mi...@apache.org>:
> > >>>
> > >>> Am 2016-04-19 um 20:26 schrieb Petar Tahchiev:
> > >>>>
> > >>>> Hello,
> > >>>>>
> > >>>>> I'm asking this question here, as I don't really see the answer in
> the
> > >>>>> documentation or anywhere else on the internet. If you have a
> website
> > >>>>> document: src/site/asciidoc/index.adoc.vm and you use a velocity
> macro
> > >>>>> in
> > >>>>> it:
> > >>>>>
> > >>>>> # myMacro()
> > >>>>>
> > >>>>>
> > >>>>> I know doxia will process the velocity and it works fine, but will
> it
> > >>>>> also
> > >>>>> process the macro? I doesn't work for me, and I'm not sure if it is
> > >>>>> implemented at all. I'm trying to debug it now, but I can't seem to
> > >>>>> find
> > >>>>> any setting regarding this.
> > >>>>>
> > >>>>>
> > >>>> Hervé and me have been working at Doxia and the rest lately a lot.
> Do
> > >>>> you
> > >>>> think you could create a sample project for that? I would take a
> look
> > >>>> at it.
> > >>>>
> > >>>> Michael
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> ---------------------------------------------------------------------
> > >>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > >>>> For additional commands, e-mail: dev-help@maven.apache.org
> > >>>>
> > >>>>
> > >>>>
> > >>>
> > >>>
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: dev-help@maven.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > Regards, Petar!
> > > Karlovo, Bulgaria.
> > > ---
> > > Public PGP Key at:
> > > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> > > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
> > >
> >
> >
> >
> > --
> > Regards, Petar!
> > Karlovo, Bulgaria.
> > ---
> > Public PGP Key at:
> > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
Regards, Petar!
Karlovo, Bulgaria.
---
Public PGP Key at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611

Re: Re: Does doxia render velocity macros in site

Posted by Michael Osipov <19...@gmx.net>.
> Here's the test repo:
> 
> https://github.com/ptahchiev/maven-velocity-macro

Cloned and tested. Upgrade to MSITE 3.5.1 and your pain will go away. #parse/#include
has been resolved with DOXIASITETOOLS 1.7.1/MSITE 3.5.1.

Michael

> 2016-04-20 8:57 GMT+02:00 Petar Tahchiev <pa...@gmail.com>:
> 
> > Ok,
> >
> > here's what I've tried:
> >    = NOMACRO: I create a file properties.vm, right next to my
> > index.adoc.vm and inside it I put
> >
> >       #set($a = "Petar")
> >       $a
> >
> >       then inside my index.adoc.vm I put
> >       #parse("properties.vm")
> >
> >       [ERROR] Max recursion depth reached (10) File stack: >
> > C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
> > properties.vm > properties.vm > properties.vm > properties.vm >
> > properties.vm > properties.vm > properties.vm > properties.vm
> >
> >    = MACRO: again I create properties.vm right next to my index.adoc.vm
> > and inside it I put
> >
> >       #macro( petar )
> >           Petar
> >       #end
> >
> >        then inside the index.adoc.vm I put:
> >
> >      #parse("properties.vm")
> >      #petar()
> >
> > and I get
> >
> > [ERROR] Max recursion depth reached (10) File stack: >
> > C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
> > properties.vm > properties.vm > properties.vm > properties.vm >
> > properties.vm > properties.vm > properties.vm > properties.vm
> >
> >      = MACRO IN THEME: I put properties.vm right next to site.vm in my
> > theme and I reference it from index.adov.vm with #parse("properties.vm")
> > and maven does not find the file.
> >
> >
> >
> >
> > I'll try to make a test project.
> >
> >
> >
> > 2016-04-20 8:42 GMT+02:00 Michael Osipov <mi...@apache.org>:
> >
> >> Am 2016-04-20 um 08:35 schrieb Petar Tahchiev:
> >>
> >>> Hi Michael,
> >>>
> >>> I had a chat with Herve last night, and he mentioned this is actually not
> >>> possible. If one wants to use velocity macros one must put it in the site
> >>> (if you put them in your theme it will not work). Which is a shame, as I
> >>> have a project with 50 submodules and each module requires #myMacro()
> >>> just
> >>> once, so I was hoping to have it declared once in the site.vm in the
> >>> theme,
> >>> and then use it in each of those modules.
> >>>
> >>
> >> Seriously? We now have #parse() support. That should actually parse your
> >> subtemplate and make the macro available. Have you tried that? Templates
> >> which are not skins are deprecated though and have limited support. They
> >> will be removed in 2.0.
> >>
> >> Michael
> >>
> >>
> >> 2016-04-20 8:31 GMT+02:00 Michael Osipov <mi...@apache.org>:
> >>>
> >>> Am 2016-04-19 um 20:26 schrieb Petar Tahchiev:
> >>>>
> >>>> Hello,
> >>>>>
> >>>>> I'm asking this question here, as I don't really see the answer in the
> >>>>> documentation or anywhere else on the internet. If you have a website
> >>>>> document: src/site/asciidoc/index.adoc.vm and you use a velocity macro
> >>>>> in
> >>>>> it:
> >>>>>
> >>>>> # myMacro()
> >>>>>
> >>>>>
> >>>>> I know doxia will process the velocity and it works fine, but will it
> >>>>> also
> >>>>> process the macro? I doesn't work for me, and I'm not sure if it is
> >>>>> implemented at all. I'm trying to debug it now, but I can't seem to
> >>>>> find
> >>>>> any setting regarding this.
> >>>>>
> >>>>>
> >>>> Hervé and me have been working at Doxia and the rest lately a lot. Do
> >>>> you
> >>>> think you could create a sample project for that? I would take a look
> >>>> at it.
> >>>>
> >>>> Michael
> >>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >>>> For additional commands, e-mail: dev-help@maven.apache.org
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: dev-help@maven.apache.org
> >>
> >>
> >
> >
> > --
> > Regards, Petar!
> > Karlovo, Bulgaria.
> > ---
> > Public PGP Key at:
> > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
> >
> 
> 
> 
> -- 
> Regards, Petar!
> Karlovo, Bulgaria.
> ---
> Public PGP Key at:
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Does doxia render velocity macros in site

Posted by Petar Tahchiev <pa...@gmail.com>.
Here's the test repo:

https://github.com/ptahchiev/maven-velocity-macro

2016-04-20 8:57 GMT+02:00 Petar Tahchiev <pa...@gmail.com>:

> Ok,
>
> here's what I've tried:
>    = NOMACRO: I create a file properties.vm, right next to my
> index.adoc.vm and inside it I put
>
>       #set($a = "Petar")
>       $a
>
>       then inside my index.adoc.vm I put
>       #parse("properties.vm")
>
>       [ERROR] Max recursion depth reached (10) File stack: >
> C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
> properties.vm > properties.vm > properties.vm > properties.vm >
> properties.vm > properties.vm > properties.vm > properties.vm
>
>    = MACRO: again I create properties.vm right next to my index.adoc.vm
> and inside it I put
>
>       #macro( petar )
>           Petar
>       #end
>
>        then inside the index.adoc.vm I put:
>
>      #parse("properties.vm")
>      #petar()
>
> and I get
>
> [ERROR] Max recursion depth reached (10) File stack: >
> C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
> properties.vm > properties.vm > properties.vm > properties.vm >
> properties.vm > properties.vm > properties.vm > properties.vm
>
>      = MACRO IN THEME: I put properties.vm right next to site.vm in my
> theme and I reference it from index.adov.vm with #parse("properties.vm")
> and maven does not find the file.
>
>
>
>
> I'll try to make a test project.
>
>
>
> 2016-04-20 8:42 GMT+02:00 Michael Osipov <mi...@apache.org>:
>
>> Am 2016-04-20 um 08:35 schrieb Petar Tahchiev:
>>
>>> Hi Michael,
>>>
>>> I had a chat with Herve last night, and he mentioned this is actually not
>>> possible. If one wants to use velocity macros one must put it in the site
>>> (if you put them in your theme it will not work). Which is a shame, as I
>>> have a project with 50 submodules and each module requires #myMacro()
>>> just
>>> once, so I was hoping to have it declared once in the site.vm in the
>>> theme,
>>> and then use it in each of those modules.
>>>
>>
>> Seriously? We now have #parse() support. That should actually parse your
>> subtemplate and make the macro available. Have you tried that? Templates
>> which are not skins are deprecated though and have limited support. They
>> will be removed in 2.0.
>>
>> Michael
>>
>>
>> 2016-04-20 8:31 GMT+02:00 Michael Osipov <mi...@apache.org>:
>>>
>>> Am 2016-04-19 um 20:26 schrieb Petar Tahchiev:
>>>>
>>>> Hello,
>>>>>
>>>>> I'm asking this question here, as I don't really see the answer in the
>>>>> documentation or anywhere else on the internet. If you have a website
>>>>> document: src/site/asciidoc/index.adoc.vm and you use a velocity macro
>>>>> in
>>>>> it:
>>>>>
>>>>> # myMacro()
>>>>>
>>>>>
>>>>> I know doxia will process the velocity and it works fine, but will it
>>>>> also
>>>>> process the macro? I doesn't work for me, and I'm not sure if it is
>>>>> implemented at all. I'm trying to debug it now, but I can't seem to
>>>>> find
>>>>> any setting regarding this.
>>>>>
>>>>>
>>>> Hervé and me have been working at Doxia and the rest lately a lot. Do
>>>> you
>>>> think you could create a sample project for that? I would take a look
>>>> at it.
>>>>
>>>> Michael
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
>
> --
> Regards, Petar!
> Karlovo, Bulgaria.
> ---
> Public PGP Key at:
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
> Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611
>



-- 
Regards, Petar!
Karlovo, Bulgaria.
---
Public PGP Key at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611

Re: Does doxia render velocity macros in site

Posted by Petar Tahchiev <pa...@gmail.com>.
Ok,

here's what I've tried:
   = NOMACRO: I create a file properties.vm, right next to my index.adoc.vm
and inside it I put

      #set($a = "Petar")
      $a

      then inside my index.adoc.vm I put
      #parse("properties.vm")

      [ERROR] Max recursion depth reached (10) File stack: >
C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
properties.vm > properties.vm > properties.vm > properties.vm >
properties.vm > properties.vm > properties.vm > properties.vm

   = MACRO: again I create properties.vm right next to my index.adoc.vm and
inside it I put

      #macro( petar )
          Petar
      #end

       then inside the index.adoc.vm I put:

     #parse("properties.vm")
     #petar()

and I get

[ERROR] Max recursion depth reached (10) File stack: >
C:\workspace\test\src\site\asciidoc\index.adoc.vm > properties.vm >
properties.vm > properties.vm > properties.vm > properties.vm >
properties.vm > properties.vm > properties.vm > properties.vm

     = MACRO IN THEME: I put properties.vm right next to site.vm in my
theme and I reference it from index.adov.vm with #parse("properties.vm")
and maven does not find the file.




I'll try to make a test project.



2016-04-20 8:42 GMT+02:00 Michael Osipov <mi...@apache.org>:

> Am 2016-04-20 um 08:35 schrieb Petar Tahchiev:
>
>> Hi Michael,
>>
>> I had a chat with Herve last night, and he mentioned this is actually not
>> possible. If one wants to use velocity macros one must put it in the site
>> (if you put them in your theme it will not work). Which is a shame, as I
>> have a project with 50 submodules and each module requires #myMacro() just
>> once, so I was hoping to have it declared once in the site.vm in the
>> theme,
>> and then use it in each of those modules.
>>
>
> Seriously? We now have #parse() support. That should actually parse your
> subtemplate and make the macro available. Have you tried that? Templates
> which are not skins are deprecated though and have limited support. They
> will be removed in 2.0.
>
> Michael
>
>
> 2016-04-20 8:31 GMT+02:00 Michael Osipov <mi...@apache.org>:
>>
>> Am 2016-04-19 um 20:26 schrieb Petar Tahchiev:
>>>
>>> Hello,
>>>>
>>>> I'm asking this question here, as I don't really see the answer in the
>>>> documentation or anywhere else on the internet. If you have a website
>>>> document: src/site/asciidoc/index.adoc.vm and you use a velocity macro
>>>> in
>>>> it:
>>>>
>>>> # myMacro()
>>>>
>>>>
>>>> I know doxia will process the velocity and it works fine, but will it
>>>> also
>>>> process the macro? I doesn't work for me, and I'm not sure if it is
>>>> implemented at all. I'm trying to debug it now, but I can't seem to find
>>>> any setting regarding this.
>>>>
>>>>
>>> Hervé and me have been working at Doxia and the rest lately a lot. Do you
>>> think you could create a sample project for that? I would take a look at
>>> it.
>>>
>>> Michael
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
Regards, Petar!
Karlovo, Bulgaria.
---
Public PGP Key at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611

Re: Does doxia render velocity macros in site

Posted by Michael Osipov <mi...@apache.org>.
Am 2016-04-20 um 08:35 schrieb Petar Tahchiev:
> Hi Michael,
>
> I had a chat with Herve last night, and he mentioned this is actually not
> possible. If one wants to use velocity macros one must put it in the site
> (if you put them in your theme it will not work). Which is a shame, as I
> have a project with 50 submodules and each module requires #myMacro() just
> once, so I was hoping to have it declared once in the site.vm in the theme,
> and then use it in each of those modules.

Seriously? We now have #parse() support. That should actually parse your
subtemplate and make the macro available. Have you tried that? Templates
which are not skins are deprecated though and have limited support. They
will be removed in 2.0.

Michael

> 2016-04-20 8:31 GMT+02:00 Michael Osipov <mi...@apache.org>:
>
>> Am 2016-04-19 um 20:26 schrieb Petar Tahchiev:
>>
>>> Hello,
>>>
>>> I'm asking this question here, as I don't really see the answer in the
>>> documentation or anywhere else on the internet. If you have a website
>>> document: src/site/asciidoc/index.adoc.vm and you use a velocity macro in
>>> it:
>>>
>>> # myMacro()
>>>
>>>
>>> I know doxia will process the velocity and it works fine, but will it also
>>> process the macro? I doesn't work for me, and I'm not sure if it is
>>> implemented at all. I'm trying to debug it now, but I can't seem to find
>>> any setting regarding this.
>>>
>>
>> Hervé and me have been working at Doxia and the rest lately a lot. Do you
>> think you could create a sample project for that? I would take a look at it.
>>
>> Michael
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Does doxia render velocity macros in site

Posted by Petar Tahchiev <pa...@gmail.com>.
Hi Michael,

I had a chat with Herve last night, and he mentioned this is actually not
possible. If one wants to use velocity macros one must put it in the site
(if you put them in your theme it will not work). Which is a shame, as I
have a project with 50 submodules and each module requires #myMacro() just
once, so I was hoping to have it declared once in the site.vm in the theme,
and then use it in each of those modules.

2016-04-20 8:31 GMT+02:00 Michael Osipov <mi...@apache.org>:

> Am 2016-04-19 um 20:26 schrieb Petar Tahchiev:
>
>> Hello,
>>
>> I'm asking this question here, as I don't really see the answer in the
>> documentation or anywhere else on the internet. If you have a website
>> document: src/site/asciidoc/index.adoc.vm and you use a velocity macro in
>> it:
>>
>> # myMacro()
>>
>>
>> I know doxia will process the velocity and it works fine, but will it also
>> process the macro? I doesn't work for me, and I'm not sure if it is
>> implemented at all. I'm trying to debug it now, but I can't seem to find
>> any setting regarding this.
>>
>
> Hervé and me have been working at Doxia and the rest lately a lot. Do you
> think you could create a sample project for that? I would take a look at it.
>
> Michael
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
Regards, Petar!
Karlovo, Bulgaria.
---
Public PGP Key at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611

Re: Does doxia render velocity macros in site

Posted by Michael Osipov <mi...@apache.org>.
Am 2016-04-19 um 20:26 schrieb Petar Tahchiev:
> Hello,
>
> I'm asking this question here, as I don't really see the answer in the
> documentation or anywhere else on the internet. If you have a website
> document: src/site/asciidoc/index.adoc.vm and you use a velocity macro in
> it:
>
> # myMacro()
>
>
> I know doxia will process the velocity and it works fine, but will it also
> process the macro? I doesn't work for me, and I'm not sure if it is
> implemented at all. I'm trying to debug it now, but I can't seem to find
> any setting regarding this.

Hervé and me have been working at Doxia and the rest lately a lot. Do 
you think you could create a sample project for that? I would take a 
look at it.

Michael



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org