You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andrea Pöschel <po...@aidossoftware.com> on 2003/11/03 14:59:13 UTC
precompile-only xsp with cli
Problems with precomile xsp's (Cocoon 2.1)
I want precompile my xsp's with the Command line Interface using by
cli.xconf (Option precompile-only="true").
The xsp's are found, but not compiled.
snipped from cli.log
DEBUG (2003-11-03) 13:40.46:457 [cli] (Unknown-URI)
Unknown-thread/LinkSamplingEnvironment: LinkSamplingEnvironment: uri = /
DEBUG (2003-11-03) 13:40.46:457 [cli] (Unknown-URI)
Unknown-thread/Cocoon: XSP generation
begin:WEB-INF\Cocoon\xsp\german\language\indexadmin.xsp
DEBUG (2003-11-03) 13:40.46:457 [cli] (Unknown-URI)
Unknown-thread/LinkSamplingEnvironment: LinkSamplingEnvironment: uri = /
DEBUG (2003-11-03) 13:40.46:457 [cli] (Unknown-URI)
Unknown-thread/Cocoon: XSP generation
begin:WEB-INF\Cocoon\xsp\german\login\config_account.xsp
...
The method CocconComponentManager.getSitemapComponents() returned null,but
no Exception is thrown.
Can that be the reason?
I send you cli.xconf and a snippet from the build.xml
Thanks for your help!
Andrea
<?xml version="1.0"?>
<!--+
| This is the Apache Cocoon command line configuration file.
| Here you give the command line interface details of where
| to find various aspects of your Cocoon installation.
|
| If you wish, you can also use this file to specify the URIs
| that you wish to generate.
|
| The current configuration information in this file is for
| building the Cocoon documentation. Therefore, all links here
| are relative to the build context dir, which, in the build.xml
| file, is set to ${build.context}
|
| Options:
| verbose: increase amount of information presented
| to standard output (default: false)
| follow-links: whether linked pages should also be
| generated (default: true)
| precompile-only: precompile sitemaps and XSP pages, but
| do not generate any pages (default: false)
| confirm-extensions: check the mime type for the generated page
| and adjust filename and links extensions
| to match the mime type
| (e.g. text/html->.html)
|
| Note: Whilst using an xconf file to configure the Cocoon
| Command Line gives access to more features, the use of
| command line parameters is more stable, as there are
| currently plans to improve the xconf format to allow
| greater flexibility. If you require a stable and
| consistent method for accessing the CLI, it is recommended
| that you use the command line parameters to configure
| the CLI.</note>
| CVS: $Id: cli.xconf,v 1.1 2003/09/01 14:45:56 zschiesche Exp $
+-->
<cocoon verbose="true"
follow-links="false"
precompile-only="true"
confirm-extensions="false"
version="2.1">
<broken-links type="text" report="../build/webapp/logs/broken.txt"/>
<!--+
| Broken link reporting options:
| Report into a text file, one link per line:
| <broken-links type="text" report="filename"/>
| Report into an XML file:
| <broken-links type="xml" report="filename"/>
| Ignore broken links (default):
| <broken-links type="none"/>
| When a page includes an error, should a page be generated?
|
| Two attributes to this node specify whether a page should
| be generated when an error occured. 'generate' specifies
| whether a page should be generated (default: true) and
| extension specifies an extension that should be appended
| to the generated page's filename (default: none)
| <broken-links generate="true" extension=".error.txt"/>
|
<broken-links type="xml"
file="../brokenlinks.xml"
generate="false"
extension=".error"/>+-->
<!--+
| Load classes at startup. This is necessary for generating
| from sites that use SQL databases and JDBC.
| The <load-class> element can be repeated if multiple classes
| are needed.
+-->
<!--
<load-class>org.firebirdsql.jdbc.Driver</load-class>
-->
<logging log-kit="../etc/logkit4cli.xconf" logger="cli" level="DEBUG" />
<!--+
| The context directory is usually the webapp directory
| containing the sitemap.xmap file.
|
| The config file is the cocoon.xconf file.
|
| The work directory is used by Cocoon to store temporary
| files and cache files.
|
| The destination directory is where generated pages will
| be written (assuming the 'simple' mapper is used)
+-->
<context-dir>../build/webapp/WEB-INF</context-dir>
<config-file>cocoon.xconf</config-file>
<work-dir>../build/webapp/WEB-INF/work</work-dir>
<dest-dir>../build/webapp/WEB-INF/work</dest-dir>
<!--+
| Specifies the filename to be appended to URIs that
| refer to a directory (i.e. end with a forward slash).
<default-filename>index.html</default-filename>+-->
<!--+
| Specifies a user agent string to the sitemap when
| generating the site.
+-->
<!--
<user-agent>xxx</user-agent>
-->
<!--+
| Specifies an accept string to the sitemap when generating
| the site.
+-->
<accept>*/*</accept>
<!--+
| Specifies the URIs that should be generated (using <uri>
| elements, and (if necessary) what should be done with the
| generated pages.
|
| The old behaviour - appends uri to the specified destination
| directory (as specified in <dest-dir>):
|
| <uri>documents/index.html</uri>
|
| Append: append the generated page's URI to the end of the
| source URI:
|
| <uri type="append" src-prefix="documents/" src="index.html"
| dest="build/dest/"/>
|
| Replace: Completely ignore the generated page's URI - just
| use the destination URI:
|
| <uri type="replace" src-prefix="documents/" src="index.html"
| dest="build/dest/docs.html"/>
|
| Insert: Insert generated page's URI into the destination
| URI at the point marked with a * (example uses fictional
| zip protocol)
|
| <uri type="insert" src-prefix="documents/" src="index.html"
| dest="zip://*.zip/page.html"/>
|
<uri>favicon.ico</uri> +-->
<!--+
| File containing URIs (plain text, one per
| line).
+-->
<!--
<uri-file></uri-file>
-->
</cocoon>
snippet from build.xml
<build>
...
<java
classname="org.apache.cocoon.Main"
classpathref="compilexsp.path"
dir="${build.dir}"
fork="true"
failonerror="true"
>
<arg line="-x src/${kaibox.web.home}/etc/cli.xconf "/>
</java>
...
</build>
Mit freundlichen Grueßen
Andrea Poeschel
Knowledge Engine Development
_______________________________________
AIDOS Software AG
Dresdner Str. 7
D-01662 Meißen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: precompile-only xsp with cli
Posted by Upayavira <uv...@upaya.co.uk>.
Andrea,
Your subject was fine - you didn't need to repost!
I have seen the 'precompile' code within the Cocoon CLI for a long time,
but have never used it nor heard of anyone using it. I do not use XSP
myself, so I have never needed to precompile my XSPs.
If you are willing to look into how the code works for the CocoonBean
and CocoonWrapper classes, you should be able to see what is going on
and find out whether you're doing something wrong or whether there's a
bug there.
Sorry I can't offer more help.
[It might be easier to, if you're using Ant, to have a <get> task that
requests each page for a specific XSP from your servlet container, thus
compiling it for you, rather than using the CLI. Just a thought.]
Regards, Upayavira
Andrea Pöschel wrote:
>Problems with precomile xsp's (Cocoon 2.1)
>
>I want precompile my xsp's with the Command line Interface using by
>cli.xconf (Option precompile-only="true").
>The xsp's are found, but not compiled.
>
>snipped from cli.log
>DEBUG (2003-11-03) 13:40.46:457 [cli] (Unknown-URI)
>Unknown-thread/LinkSamplingEnvironment: LinkSamplingEnvironment: uri = /
>DEBUG (2003-11-03) 13:40.46:457 [cli] (Unknown-URI)
>Unknown-thread/Cocoon: XSP generation
>begin:WEB-INF\Cocoon\xsp\german\language\indexadmin.xsp
>DEBUG (2003-11-03) 13:40.46:457 [cli] (Unknown-URI)
>Unknown-thread/LinkSamplingEnvironment: LinkSamplingEnvironment: uri = /
>DEBUG (2003-11-03) 13:40.46:457 [cli] (Unknown-URI)
>Unknown-thread/Cocoon: XSP generation
>begin:WEB-INF\Cocoon\xsp\german\login\config_account.xsp
>...
>
>
>The method CocconComponentManager.getSitemapComponents() returned null,but
>no Exception is thrown.
>Can that be the reason?
>I send you cli.xconf and a snippet from the build.xml
>
>Thanks for your help!
>
>Andrea
>
>
><?xml version="1.0"?>
>
><!--+
> | This is the Apache Cocoon command line configuration file.
> | Here you give the command line interface details of where
> | to find various aspects of your Cocoon installation.
> |
> | If you wish, you can also use this file to specify the URIs
> | that you wish to generate.
> |
> | The current configuration information in this file is for
> | building the Cocoon documentation. Therefore, all links here
> | are relative to the build context dir, which, in the build.xml
> | file, is set to ${build.context}
> |
> | Options:
> | verbose: increase amount of information presented
> | to standard output (default: false)
> | follow-links: whether linked pages should also be
> | generated (default: true)
> | precompile-only: precompile sitemaps and XSP pages, but
> | do not generate any pages (default: false)
> | confirm-extensions: check the mime type for the generated page
> | and adjust filename and links extensions
> | to match the mime type
> | (e.g. text/html->.html)
> |
> | Note: Whilst using an xconf file to configure the Cocoon
> | Command Line gives access to more features, the use of
> | command line parameters is more stable, as there are
> | currently plans to improve the xconf format to allow
> | greater flexibility. If you require a stable and
> | consistent method for accessing the CLI, it is recommended
> | that you use the command line parameters to configure
> | the CLI.</note>
> | CVS: $Id: cli.xconf,v 1.1 2003/09/01 14:45:56 zschiesche Exp $
> +-->
>
><cocoon verbose="true"
> follow-links="false"
> precompile-only="true"
> confirm-extensions="false"
> version="2.1">
> <broken-links type="text" report="../build/webapp/logs/broken.txt"/>
>
> <!--+
> | Broken link reporting options:
> | Report into a text file, one link per line:
> | <broken-links type="text" report="filename"/>
> | Report into an XML file:
> | <broken-links type="xml" report="filename"/>
> | Ignore broken links (default):
> | <broken-links type="none"/>
> | When a page includes an error, should a page be generated?
> |
> | Two attributes to this node specify whether a page should
> | be generated when an error occured. 'generate' specifies
> | whether a page should be generated (default: true) and
> | extension specifies an extension that should be appended
> | to the generated page's filename (default: none)
> | <broken-links generate="true" extension=".error.txt"/>
> |
>
> <broken-links type="xml"
> file="../brokenlinks.xml"
> generate="false"
> extension=".error"/>+-->
>
> <!--+
> | Load classes at startup. This is necessary for generating
> | from sites that use SQL databases and JDBC.
> | The <load-class> element can be repeated if multiple classes
> | are needed.
> +-->
> <!--
> <load-class>org.firebirdsql.jdbc.Driver</load-class>
> -->
>
>
>
> <logging log-kit="../etc/logkit4cli.xconf" logger="cli" level="DEBUG" />
>
> <!--+
> | The context directory is usually the webapp directory
> | containing the sitemap.xmap file.
> |
> | The config file is the cocoon.xconf file.
> |
> | The work directory is used by Cocoon to store temporary
> | files and cache files.
> |
> | The destination directory is where generated pages will
> | be written (assuming the 'simple' mapper is used)
> +-->
> <context-dir>../build/webapp/WEB-INF</context-dir>
> <config-file>cocoon.xconf</config-file>
> <work-dir>../build/webapp/WEB-INF/work</work-dir>
> <dest-dir>../build/webapp/WEB-INF/work</dest-dir>
>
> <!--+
> | Specifies the filename to be appended to URIs that
> | refer to a directory (i.e. end with a forward slash).
>
> <default-filename>index.html</default-filename>+-->
>
> <!--+
> | Specifies a user agent string to the sitemap when
> | generating the site.
> +-->
> <!--
> <user-agent>xxx</user-agent>
> -->
>
> <!--+
> | Specifies an accept string to the sitemap when generating
> | the site.
> +-->
> <accept>*/*</accept>
>
> <!--+
> | Specifies the URIs that should be generated (using <uri>
> | elements, and (if necessary) what should be done with the
> | generated pages.
> |
> | The old behaviour - appends uri to the specified destination
> | directory (as specified in <dest-dir>):
> |
> | <uri>documents/index.html</uri>
> |
> | Append: append the generated page's URI to the end of the
> | source URI:
> |
> | <uri type="append" src-prefix="documents/" src="index.html"
> | dest="build/dest/"/>
> |
> | Replace: Completely ignore the generated page's URI - just
> | use the destination URI:
> |
> | <uri type="replace" src-prefix="documents/" src="index.html"
> | dest="build/dest/docs.html"/>
> |
> | Insert: Insert generated page's URI into the destination
> | URI at the point marked with a * (example uses fictional
> | zip protocol)
> |
> | <uri type="insert" src-prefix="documents/" src="index.html"
> | dest="zip://*.zip/page.html"/>
> |
>
> <uri>favicon.ico</uri> +-->
>
> <!--+
> | File containing URIs (plain text, one per
> | line).
> +-->
> <!--
> <uri-file></uri-file>
> -->
>
></cocoon>
>
>snippet from build.xml
>
><build>
>...
> <java
> classname="org.apache.cocoon.Main"
> classpathref="compilexsp.path"
> dir="${build.dir}"
> fork="true"
> failonerror="true"
> >
> <arg line="-x src/${kaibox.web.home}/etc/cli.xconf "/>
> </java>
>...
></build>
>
>
>Mit freundlichen Grueßen
>
>
>Andrea Poeschel
>Knowledge Engine Development
>_______________________________________
>AIDOS Software AG
>Dresdner Str. 7
>D-01662 Meißen
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org