Hi Params,
Would you pls create a JIRA for APT and let us know the JIRA id?

Hi Alejandro,
I think Param already found a (not-clean) workaround. Based on that, do you 
think we should go ahead with APT? How active is APT dev? I propose to do APT 
for all new apache site documentation and then  we could go for twiki to APT 
conversion of our existing doc.
Any thoughts?

Regards,
Mohammad



________________________________
From: Alejandro Abdelnur <[email protected]>
To: [email protected]
Sent: Tuesday, October 11, 2011 3:43 PM
Subject: Re: Oozie documentation in Apache using APT

Param,

${foo} works
${foo()} fails
${foo:bar} fails
${foo:bar()} fails

Adding a '.' after the '$' works.

It seems like a but in the doxia APT compiler.

A bug should be filed against the doxia site plugin.

Thanks.

Alejandro

On Tue, Oct 11, 2011 at 2:48 PM, Params <[email protected]> wrote:

> Hi Alejandro,
>
> That also fails. The problem seems to be more with the
> ${wf:errorCode('wordcount')} kind of expressions than the verbatim
> syntax/style.
>
> 1) Irrespective of using --------- or +--------+, I *get* the same
> exception
> on adding an expression like ${wf:errorCode('wordcount')} inside the xml.
> 2) Irrespective of using --------- or +--------+, I *do not get* any
> exception on adding an expression like ${project.version}  inside the xml.
>
> *Sample:*
>
>
> +-------------------------------------------------------------------------------------+
> <configuration>
>        <property>
>            <name>project.version</name>
>            <value>${project.version}</value>
>   //WORKS FINE
>         </property>
>        <property>
>            <name>error.message</name>
>             <value>${wf:errorCode('wordcount')}'</value>
> //ERROR
>        </property>
> </configuration>
>
> +--------------------------------------------------------------------------------------+
>
> *Exception thrown clearly mentions - *[ERROR]
> org.apache.velocity.exception.ParseErrorException: Encountered
> ":errorCode(\'wordcount\')}\'</value>
>
> --
> Thanks,
> Params
>
>
> On Tue, Oct 11, 2011 at 1:29 PM, Alejandro Abdelnur <[email protected]
> >wrote:
>
> > Mohammad,
> >
> > Would you try the following syntax for snippets:
> >
> > +---+
> >  ...
> >  <dependency>
> >      <groupId>com.cloudera.hoop</groupId>
> >      <artifactId>hoop-client</artifactId>
> >      <version>${project.version}</version>
> >  </dependency>
> >  ...
> > +---+
> >
> > Thanks.
> >
> > Alejandro
> >
> > On Tue, Oct 11, 2011 at 1:19 PM, Params <[email protected]> wrote:
> >
> > > Hi,
> > >
> > > Following are the details of the issue we ran into:
> > >
> > > *Description:*
> > > I tried to add the following snippet of xml into my .apt source file
> > inside
> > > a 'verbatim' block.
> > >
> > >
> > >
> >
> --------------------------------------------------------------------------------------------
> > > <configuration>
> > >        <property>
> > >            <name>mapred.job.queue.name</name>
> > >            <value>${queueName}</value>
> > >        </property>
> > >        <property>
> > >            <name>error.message</name>
> > >            <value>Something went wrong:
> > > ${wf:errorCode('wordcount')}</value>
> > >        </property>
> > > </configuration>
> > >
> > >
> >
> --------------------------------------------------------------------------------------------
> > >
> > > On trying to build the maven project for the site documentation,
> > > $ mvn site
> > >
> > > I get the following error:
> > >
> > > [ERROR] org.apache.velocity.runtime.parser.ParseException: Encountered
> > > ":errorCode(\'wordcount\')}</message>\n    </kill/>\n    <end
> > >
> > >
> >
> name=\'end\'/>\n</workflow-app>\n----------------------------------------------------------------------------------\n\n
> > >  <<Notes:>>\n\n  <<" at line 134, column 44.
> > > Was expecting one of:
> > >    "}" ...
> > >    <DOT> ...
> > >
> > >
> > > Observations:
> > > 1) It appears that whenever I use any text of the format:
> > > ${wf:errorCode('wordcount')} , APT throws a parse exception (even if
> its
> > > contained in the verbatim block).
> > >
> > > 2) Other text like ${queueName} seems to work well.
> > >
> > > 3) I tried escaping the characters - {, $, :, etc.. but it doesnt work
> > > either.
> > >
> > > 4) I tried using the APT Editor (Eclipse plugin). It does not give any
> > > errors on preview, but publishing the .apt using a 'mvn site' still
> > fails.
> > >
> > > *Workaround (based on response from the maven nabble forum):*
> > > Source:
> > >
> > >
> >
> http://maven.40175.n5.nabble.com/APT-Issue-with-adding-xml-code-snippets-as-Verbatim-tt4831524.html#a4831572
> > >
> > > The idea is to assign the "complex" value to a variable, next print
> that
> > > variable:
> > > <value>#set($varline = '${wf:errorCode("wordcount")}')
> >  ${varline}</value>
> > >
> > > However, the display text I now get on the html page is:
> > > <value>  ${wf:errorCode("wordcount")}</value>
> > >
> > > This is not exactly the output we desire, we would prefer the wordcount
> > to
> > > appear inside single-quotes (in the html file generated) as:
> > > ${wf:errorCode('wordcount')}
> > >
> > > The three following combinations (of the workaround described) don't
> work
> > > (fail while running the mvn build):
> > > <value>#set($varline = '${wf:errorCode(\'wordcount\')}')
> > >  ${varline}</value>
> > > <value>#set($varline = "${wf:errorCode('wordcount')}")
> >  ${varline}</value>
> > > <value>#set($varline = "${wf:errorCode(\'wordcount\')}")
> > >  ${varline}</value>
> > >
> > > To summarize, it appears that there could be such other issues as well
> in
> > > the future (with other APT document elements) that could slow down the
> > > documentation process. It would be a good idea to assess the
> capabilities
> > > and shortcomings of APT. We also found that the doxia mailing lists (
> > > [email protected] and doxia-dev-subscribe@maven
> > > .apache.org) have been shutdown and merged into the main maven list:
> > > http://maven.40175.n5.nabble.com/
> > >
> > > Please let me know if any more information is required.
> > > --
> > > Thanks,
> > > Params
> > >
> > >
> > >
> > > On Tue, Oct 11, 2011 at 12:33 PM, Mohammad Islam <[email protected]>
> > > wrote:
> > >
> > > > Hi,
> > > > As previously discussed, we did a POC using APT based documentation (
> > > > http://maven.apache.org/doxia/references/apt-format.html).
> > > > In short, we found APT is very simple and easy to use.
> > > > However, at least in one common case, we didn't find any good way of
> > > > writing the EL functions.
> > > > (@Params: Would you please provide more details of the issue?).
> > > >
> > > > Please give your comments on the followings:
> > > > * Should we continue to use APT? Is there any other better option
> > > > available?
> > > >
> > > > * Should we move our existing official Oozie doc from twiki to APT as
> > > well?
> > > > Currently we plan to adopt the new documentation framework for Apache
> > > Oozie
> > > > site.
> > > >
> > > >
> > > > Regards,
> > > > Mohammad
> > > >
> > >
> > >
> > >
> > > --
> > > params
> > >
> >
>
>
>
> --
> params
>

Reply via email to