You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by Mohammad Islam <mi...@yahoo.com> on 2011/10/11 21:33:19 UTC

Oozie documentation in Apache using APT

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

Re: Oozie documentation in Apache using APT

Posted by Alejandro Abdelnur <tu...@gmail.com>.
* Easy & simple syntax that is 'graphically' identical to what you see
when 'compiled' (which is not the case for XDOC)
* 100% integration with Maven
* Ease of debugging, you can run mvn site:run and edit pages on the
fly and see how they look
* I don't know of any APT wysiwyg editor, IMO the syntax is quite
simple to worry about one.

because of this i'd say it is good enough.

thxs.

Alejandro

On Tue, Oct 11, 2011 at 2:00 PM, Santhosh Srinivasan <sm...@yahoo-inc.com> wrote:
> Mohammad and Params are sharing their early feedback on the tool. Looking at the bigger picture, the question centers around the following:
>
> What are the criteria to determine the choice of documentation tool/technology for Oozie?
>
> E.g.:
>        - Integration with the build system, i.e., Maven
>        - Ease of use (are there too many quirks)
>        - Standard editors that will ease the burden of programming/editing
>        - Ease of debugging
>        - Feedback from other Apache projects
>
> It will be good to list criteria, evaluate the pros/cons and then decide to proceed with APT or choose a different documentation tool.
>
> Thanks,
> Santhosh
>
>
> -----Original Message-----
> From: Alejandro Abdelnur [mailto:tucu@cloudera.com]
> Sent: Tuesday, October 11, 2011 1:30 PM
> To: oozie-dev@incubator.apache.org
> Subject: Re: Oozie documentation in Apache using APT
>
> Sorry, meant Params.
>
> Thanks.
>
> On Tue, Oct 11, 2011 at 1:29 PM, Alejandro Abdelnur <tu...@cloudera.com>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 <pa...@gmail.com> 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-snipp
>>> ets-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 ( doxia-users-subscribe@maven.apache.org 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 <mi...@yahoo.com>
>>> 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
>>>
>>
>>
>

RE: Oozie documentation in Apache using APT

Posted by Santhosh Srinivasan <sm...@yahoo-inc.com>.
Mohammad and Params are sharing their early feedback on the tool. Looking at the bigger picture, the question centers around the following:

What are the criteria to determine the choice of documentation tool/technology for Oozie?

E.g.:
	- Integration with the build system, i.e., Maven
	- Ease of use (are there too many quirks)
	- Standard editors that will ease the burden of programming/editing
	- Ease of debugging
	- Feedback from other Apache projects

It will be good to list criteria, evaluate the pros/cons and then decide to proceed with APT or choose a different documentation tool.

Thanks,
Santhosh
 

-----Original Message-----
From: Alejandro Abdelnur [mailto:tucu@cloudera.com] 
Sent: Tuesday, October 11, 2011 1:30 PM
To: oozie-dev@incubator.apache.org
Subject: Re: Oozie documentation in Apache using APT

Sorry, meant Params.

Thanks.

On Tue, Oct 11, 2011 at 1:29 PM, Alejandro Abdelnur <tu...@cloudera.com>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 <pa...@gmail.com> 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-snipp
>> ets-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 ( doxia-users-subscribe@maven.apache.org 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 <mi...@yahoo.com>
>> 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
>>
>
>

Re: Oozie documentation in Apache using APT

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
Sorry, meant Params.

Thanks.

On Tue, Oct 11, 2011 at 1:29 PM, Alejandro Abdelnur <tu...@cloudera.com>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 <pa...@gmail.com> 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 (
>> doxia-users-subscribe@maven.apache.org 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 <mi...@yahoo.com>
>> 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
>>
>
>

Re: Oozie documentation in Apache using APT

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
Following is a snippet of a POM that would do the post processing as I've
indicated from '$.{' to '${' :

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>2.0.1</version>
        <configuration>

<outputDirectory>${project.build.directory}/pre-site</outputDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <id>site</id>
            <phase>site</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <copy todir="${project.build.directory}/site">
                  <fileset dir="${project.build.directory}/pre-site">
                    <exclude name="**/*.html"/>
                  </fileset>
                </copy>
                <copy todir="${project.build.directory}/site">
                  <fileset dir="${project.build.directory}/pre-site">
                    <include name="**/*.html"/>
                  </fileset>
                  <filterchain>
                    <tokenfilter>
                      <replaceregex pattern="\$\.\{" replace="${"
flags="g"/>
                    </tokenfilter>
                  </filterchain>
                </copy>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
    ..
    </plugins>
   </build>

Thanks.

Alejandro

On Mon, Oct 17, 2011 at 4:35 PM, Alejandro Abdelnur <tu...@cloudera.com>wrote:

> Hi Param,
>
> We could do a find and replace of single quotes for double quotes. We'll
> have to go through out all twiki docs as we convert them to APT, thus this
> could be done then as well.
>
> Not that happy with the #set() syntax, I'd go for $.{ } with post
> processing. Does in this case the single quote fails?
>
> Thanks.
>
> Alejandro
>
> On Mon, Oct 17, 2011 at 4:21 PM, Params <pa...@gmail.com> wrote:
>
>> Hi Alejandro,
>>
>> There is another problem in using this workaround. If we have any
>> single-quotes inside the function $, then the parse still fails, unless we
>> convert all of them to double-quotes.
>>
>> eg the following will still fail:
>> <value>#set($varline = '${wf:errorCode('wordcount')}')  ${varline}</value>
>>
>> We have to replace 'wordcount' with "wordcount" to make it work.
>>
>>
>> This becomes really problematic when we have large expressions with
>> several
>> single-quotes such as:
>>
>>
>> <case
>> to="end_1">${fs:exists(concat(concat(concat(concat(concat(nameNode,'/user/'),wf:user()),'/'),wf:conf('outputDir')),'/streaming/part-00000'))
>> and
>> (fs:fileSize(concat(concat(concat(concat(concat(nameNode,'/user/'),wf:user()),'/'),wf:conf('outputDir')),'/streaming/part-00000'))
>> gt 0) == "true"}</case>
>>
>> --
>> Thanks,
>> Params
>>
>> On Fri, Oct 14, 2011 at 9:36 AM, Alejandro Abdelnur <tucu@cloudera.com
>> >wrote:
>>
>> > They answered that is a feature :)
>> >
>> > So the workaround is to do:
>> >
>> > ----
>> > #set( $D = '$' )
>> >
>> > ...
>> >
>> > ${D}{foo:bar}
>> > ----
>> >
>> > Quite ugly I'd say as we would have that all over the docs ${D} instead
>> > just
>> > $.
>> >
>> > The options are:
>> >
>> > 1* ${D} for $
>> > 2* Use $. for $ and we do a post-processing of the docs to do
>> 's/$\./$/g'
>> >
>> > I'm fine with both of them, and more incline to #2.
>> >
>> > Thoughts?
>> >
>> > Thanks.
>> >
>> > Alejandro
>> >
>> >
>> > On Fri, Oct 14, 2011 at 2:07 AM, Params <pa...@gmail.com> wrote:
>> >
>> > > Hi,
>> > >
>> > > I created a JIRA ticket for this issue in the Maven DOXIA project.
>> > > The url is: http://jira.codehaus.org/browse/DOXIA-447
>> > >
>> > > There seems to be some recent activity in the apt-dev (
>> > > http://jira.codehaus.org/browse/DOXIA). So, I hope that ours would be
>> > > looked
>> > > at soon.
>> > >
>> > > --
>> > > params
>> > >
>> > > On Thu, Oct 13, 2011 at 5:24 PM, Mohammad Islam <mi...@yahoo.com>
>> > > wrote:
>> > >
>> > > > 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 <tu...@cloudera.com>
>> > > > To: oozie-dev@incubator.apache.org
>> > > > 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 <pa...@gmail.com>
>> 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 <
>> > tucu@cloudera.com
>> > > > > >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 <pa...@gmail.com>
>> > 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
>> > > (
>> > > > > > > doxia-users-subscribe@maven.apache.org 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 <
>> > > mislam77@yahoo.com
>> > > > >
>> > > > > > > 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
>> > > > >
>> > > >
>> > >
>> >
>>
>>
>>
>> --
>> params
>>
>
>

Re: Oozie documentation in Apache using APT

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
Hi Param,

We could do a find and replace of single quotes for double quotes. We'll
have to go through out all twiki docs as we convert them to APT, thus this
could be done then as well.

Not that happy with the #set() syntax, I'd go for $.{ } with post
processing. Does in this case the single quote fails?

Thanks.

Alejandro

On Mon, Oct 17, 2011 at 4:21 PM, Params <pa...@gmail.com> wrote:

> Hi Alejandro,
>
> There is another problem in using this workaround. If we have any
> single-quotes inside the function $, then the parse still fails, unless we
> convert all of them to double-quotes.
>
> eg the following will still fail:
> <value>#set($varline = '${wf:errorCode('wordcount')}')  ${varline}</value>
>
> We have to replace 'wordcount' with "wordcount" to make it work.
>
>
> This becomes really problematic when we have large expressions with several
> single-quotes such as:
>
>
> <case
> to="end_1">${fs:exists(concat(concat(concat(concat(concat(nameNode,'/user/'),wf:user()),'/'),wf:conf('outputDir')),'/streaming/part-00000'))
> and
> (fs:fileSize(concat(concat(concat(concat(concat(nameNode,'/user/'),wf:user()),'/'),wf:conf('outputDir')),'/streaming/part-00000'))
> gt 0) == "true"}</case>
>
> --
> Thanks,
> Params
>
> On Fri, Oct 14, 2011 at 9:36 AM, Alejandro Abdelnur <tucu@cloudera.com
> >wrote:
>
> > They answered that is a feature :)
> >
> > So the workaround is to do:
> >
> > ----
> > #set( $D = '$' )
> >
> > ...
> >
> > ${D}{foo:bar}
> > ----
> >
> > Quite ugly I'd say as we would have that all over the docs ${D} instead
> > just
> > $.
> >
> > The options are:
> >
> > 1* ${D} for $
> > 2* Use $. for $ and we do a post-processing of the docs to do 's/$\./$/g'
> >
> > I'm fine with both of them, and more incline to #2.
> >
> > Thoughts?
> >
> > Thanks.
> >
> > Alejandro
> >
> >
> > On Fri, Oct 14, 2011 at 2:07 AM, Params <pa...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > I created a JIRA ticket for this issue in the Maven DOXIA project.
> > > The url is: http://jira.codehaus.org/browse/DOXIA-447
> > >
> > > There seems to be some recent activity in the apt-dev (
> > > http://jira.codehaus.org/browse/DOXIA). So, I hope that ours would be
> > > looked
> > > at soon.
> > >
> > > --
> > > params
> > >
> > > On Thu, Oct 13, 2011 at 5:24 PM, Mohammad Islam <mi...@yahoo.com>
> > > wrote:
> > >
> > > > 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 <tu...@cloudera.com>
> > > > To: oozie-dev@incubator.apache.org
> > > > 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 <pa...@gmail.com> 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 <
> > tucu@cloudera.com
> > > > > >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 <pa...@gmail.com>
> > 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
> > > (
> > > > > > > doxia-users-subscribe@maven.apache.org 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 <
> > > mislam77@yahoo.com
> > > > >
> > > > > > > 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
> > > > >
> > > >
> > >
> >
>
>
>
> --
> params
>

Re: Oozie documentation in Apache using APT

Posted by Params <pa...@gmail.com>.
Hi Alejandro,

There is another problem in using this workaround. If we have any
single-quotes inside the function $, then the parse still fails, unless we
convert all of them to double-quotes.

eg the following will still fail:
<value>#set($varline = '${wf:errorCode('wordcount')}')  ${varline}</value>

We have to replace 'wordcount' with "wordcount" to make it work.


This becomes really problematic when we have large expressions with several
single-quotes such as:


<case to="end_1">${fs:exists(concat(concat(concat(concat(concat(nameNode,'/user/'),wf:user()),'/'),wf:conf('outputDir')),'/streaming/part-00000'))
and (fs:fileSize(concat(concat(concat(concat(concat(nameNode,'/user/'),wf:user()),'/'),wf:conf('outputDir')),'/streaming/part-00000'))
gt 0) == "true"}</case>

--
Thanks,
Params

On Fri, Oct 14, 2011 at 9:36 AM, Alejandro Abdelnur <tu...@cloudera.com>wrote:

> They answered that is a feature :)
>
> So the workaround is to do:
>
> ----
> #set( $D = '$' )
>
> ...
>
> ${D}{foo:bar}
> ----
>
> Quite ugly I'd say as we would have that all over the docs ${D} instead
> just
> $.
>
> The options are:
>
> 1* ${D} for $
> 2* Use $. for $ and we do a post-processing of the docs to do 's/$\./$/g'
>
> I'm fine with both of them, and more incline to #2.
>
> Thoughts?
>
> Thanks.
>
> Alejandro
>
>
> On Fri, Oct 14, 2011 at 2:07 AM, Params <pa...@gmail.com> wrote:
>
> > Hi,
> >
> > I created a JIRA ticket for this issue in the Maven DOXIA project.
> > The url is: http://jira.codehaus.org/browse/DOXIA-447
> >
> > There seems to be some recent activity in the apt-dev (
> > http://jira.codehaus.org/browse/DOXIA). So, I hope that ours would be
> > looked
> > at soon.
> >
> > --
> > params
> >
> > On Thu, Oct 13, 2011 at 5:24 PM, Mohammad Islam <mi...@yahoo.com>
> > wrote:
> >
> > > 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 <tu...@cloudera.com>
> > > To: oozie-dev@incubator.apache.org
> > > 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 <pa...@gmail.com> 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 <
> tucu@cloudera.com
> > > > >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 <pa...@gmail.com>
> 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
> > (
> > > > > > doxia-users-subscribe@maven.apache.org 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 <
> > mislam77@yahoo.com
> > > >
> > > > > > 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
> > > >
> > >
> >
>



-- 
params

Re: Oozie documentation in Apache using APT

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
They answered that is a feature :)

So the workaround is to do:

----
#set( $D = '$' )

...

${D}{foo:bar}
----

Quite ugly I'd say as we would have that all over the docs ${D} instead just
$.

The options are:

1* ${D} for $
2* Use $. for $ and we do a post-processing of the docs to do 's/$\./$/g'

I'm fine with both of them, and more incline to #2.

Thoughts?

Thanks.

Alejandro


On Fri, Oct 14, 2011 at 2:07 AM, Params <pa...@gmail.com> wrote:

> Hi,
>
> I created a JIRA ticket for this issue in the Maven DOXIA project.
> The url is: http://jira.codehaus.org/browse/DOXIA-447
>
> There seems to be some recent activity in the apt-dev (
> http://jira.codehaus.org/browse/DOXIA). So, I hope that ours would be
> looked
> at soon.
>
> --
> params
>
> On Thu, Oct 13, 2011 at 5:24 PM, Mohammad Islam <mi...@yahoo.com>
> wrote:
>
> > 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 <tu...@cloudera.com>
> > To: oozie-dev@incubator.apache.org
> > 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 <pa...@gmail.com> 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 <tucu@cloudera.com
> > > >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 <pa...@gmail.com> 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
> (
> > > > > doxia-users-subscribe@maven.apache.org 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 <
> mislam77@yahoo.com
> > >
> > > > > 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
> > >
> >
>

Re: Oozie documentation in Apache using APT

Posted by Params <pa...@gmail.com>.
Hi,

I created a JIRA ticket for this issue in the Maven DOXIA project.
The url is: http://jira.codehaus.org/browse/DOXIA-447

There seems to be some recent activity in the apt-dev (
http://jira.codehaus.org/browse/DOXIA). So, I hope that ours would be looked
at soon.

--
params

On Thu, Oct 13, 2011 at 5:24 PM, Mohammad Islam <mi...@yahoo.com> wrote:

> 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 <tu...@cloudera.com>
> To: oozie-dev@incubator.apache.org
> 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 <pa...@gmail.com> 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 <tucu@cloudera.com
> > >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 <pa...@gmail.com> 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 (
> > > > doxia-users-subscribe@maven.apache.org 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 <mislam77@yahoo.com
> >
> > > > 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
> >
>

Re: Oozie documentation in Apache using APT

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
gr8, what is the workaround? (actually I wouldn't mind using '$.{foo()}'
until it is fixed, then it would be a simple find&replace. And we can have a
note explaining this.

how active apt dev is? I don't know, but is part of the rewrite of the site
plugin for maven 3, thus fairly new.

+1 to go with APT for everything.

Thanks.

Alejandro

On Thu, Oct 13, 2011 at 5:24 PM, Mohammad Islam <mi...@yahoo.com> wrote:

> 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 <tu...@cloudera.com>
> To: oozie-dev@incubator.apache.org
> 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 <pa...@gmail.com> 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 <tucu@cloudera.com
> > >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 <pa...@gmail.com> 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 (
> > > > doxia-users-subscribe@maven.apache.org 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 <mislam77@yahoo.com
> >
> > > > 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
> >
>

Re: Oozie documentation in Apache using APT

Posted by Mohammad Islam <mi...@yahoo.com>.
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 <tu...@cloudera.com>
To: oozie-dev@incubator.apache.org
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 <pa...@gmail.com> 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 <tucu@cloudera.com
> >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 <pa...@gmail.com> 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 (
> > > doxia-users-subscribe@maven.apache.org 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 <mi...@yahoo.com>
> > > 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
>

Re: Oozie documentation in Apache using APT

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
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 <pa...@gmail.com> 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 <tucu@cloudera.com
> >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 <pa...@gmail.com> 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 (
> > > doxia-users-subscribe@maven.apache.org 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 <mi...@yahoo.com>
> > > 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
>

Re: Oozie documentation in Apache using APT

Posted by Params <pa...@gmail.com>.
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 <tu...@cloudera.com>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 <pa...@gmail.com> 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 (
> > doxia-users-subscribe@maven.apache.org 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 <mi...@yahoo.com>
> > 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

Re: Oozie documentation in Apache using APT

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
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 <pa...@gmail.com> 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 (
> doxia-users-subscribe@maven.apache.org 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 <mi...@yahoo.com>
> 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
>

Re: Oozie documentation in Apache using APT

Posted by Params <pa...@gmail.com>.
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 (
doxia-users-subscribe@maven.apache.org 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 <mi...@yahoo.com> 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

Re: Oozie documentation in Apache using APT

Posted by Alejandro Abdelnur <tu...@gmail.com>.
Glad you find APT easy to use as well.

For simplicity we should use a single docs syntax.

Yes, we should migrate twiki to APT.

Can you explain the problem with EL functions and APT.

Thanks.

Alejandro

On Tue, Oct 11, 2011 at 12:33 PM, Mohammad Islam <mi...@yahoo.com> 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
>