|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
maven-pdf-plugin ready for testingFor all those interested: I have just deployed a new snapshot of the sandbox pdf-plugin: http://people.apache.org/repo/m2-snapshot-repository/org/apache/maven/plugins/maven-pdf-plugin/ We are now shading the doxia deps to resolve the conflicts between doxia-1.0 and 1.1, this seems to make the plugin work also with maven 2.0.x (I did some tests with 2.0.6, 2.0.9 and 2.0.10). However, I have no other experience with the shade plugin and am wondering about side effects, so I would appreciate any comments and testing feedback. The site with basic instructions is here: http://people.apache.org/~ltheussl/maven-pdf-plugin/ Thanks! -Lukas PS disclaimer: the fo sink is much more sensitive about valid input docs and parser bugs than the xhtml sinks used by the site plugin. The pdf generation is much more likely to give you build errors on complicated projects even if the site builds fine. It's still sandbox quality, so be warned! :) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: maven-pdf-plugin ready for testingOn Thu, Feb 19, 2009 at 6:30 AM, Lukas Theussl <ltheussl@...> wrote:
> > For all those interested: I have just deployed a new snapshot of the sandbox > pdf-plugin: > > http://people.apache.org/repo/m2-snapshot-repository/org/apache/maven/plugins/maven-pdf-plugin/ > > We are now shading the doxia deps to resolve the conflicts between doxia-1.0 > and 1.1, this seems to make the plugin work also with maven 2.0.x (I did > some tests with 2.0.6, 2.0.9 and 2.0.10). However, I have no other > experience with the shade plugin and am wondering about side effects, so I > would appreciate any comments and testing feedback. First, thanks for doing this. I've really missed the m1 pdf plugin since upgrading. :) I initially got a build failure because the plugin uses _itself_ during the build. I commented that part out and jumped through some hoops building doxia and various parent poms, then it worked. I tried a 'mvn pdf:pdf' in https://svn.apache.org/repos/asf/continuum/trunk/continuum-docs and it failed: [INFO] [pdf:pdf] [INFO] No TOC is defined in the document descriptor. Merging all documents. [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] String index out of range: -1 [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1768) at org.apache.maven.doxia.module.fo.FoAggregateSink.link(FoAggregateSink.java:312) at org.apache.maven.doxia.module.apt.AptParser.doTraverseText(AptParser.java:457) at org.apache.maven.doxia.module.apt.AptParser$Block.traverseText(AptParser.java:1683) at org.apache.maven.doxia.module.apt.AptParser$Block.traverseText(AptParser.java:1670) at org.apache.maven.doxia.module.apt.AptParser$Paragraph.traverse(AptParser.java:2104) at org.apache.maven.doxia.module.apt.AptParser.traverseSectionBlocks(AptParser.java:814) at org.apache.maven.doxia.module.apt.AptParser.traverseSection(AptParser.java:760) at org.apache.maven.doxia.module.apt.AptParser.traverseSection(AptParser.java:769) at org.apache.maven.doxia.module.apt.AptParser.traverseBody(AptParser.java:711) at org.apache.maven.doxia.module.apt.AptParser.parse(AptParser.java:208) at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:63) at org.apache.maven.doxia.docrenderer.AbstractDocumentRenderer.parse(AbstractDocumentRenderer.java:334) at org.apache.maven.doxia.docrenderer.pdf.fo.FoPdfRenderer.render(FoPdfRenderer.java:160) at org.apache.maven.doxia.docrenderer.AbstractDocumentRenderer.render(AbstractDocumentRenderer.java:108) at org.apache.maven.plugins.pdf.PdfMojo.execute(PdfMojo.java:165) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:513) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:301) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) I can't tell what page it's unhappy about from the error, so I'll create a pdf.xml with a table of contents as described in the docs, and add things in until it blows up again. :) -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: maven-pdf-plugin ready for testingOn Thu, Feb 19, 2009 at 9:47 AM, Wendy Smoak <wsmoak@...> wrote:
> I can't tell what page it's unhappy about from the error, so I'll > create a pdf.xml with a table of contents as described in the docs, > and add things in until it blows up again. :) ... and of course right after I hit send it occurred to me to try with -X. That resulted in: [INFO] [pdf:pdf] [DEBUG] Generated a default document model: /Users/wsmoak/svn/continuum/continuum/continuum-docs/target/pdf/pdf1356178421.xml [INFO] No TOC is defined in the document descriptor. Merging all documents. [DEBUG] Parsing file /Users/wsmoak/svn/continuum/continuum/continuum-docs/src/site/apt/user_guides/viewing_queues/index.apt [DEBUG] Parsing file /Users/wsmoak/svn/continuum/continuum/continuum-docs/src/site/apt/user_guides/notification/index.apt [DEBUG] Parsing file /Users/wsmoak/svn/continuum/continuum/continuum-docs/src/site/apt/user_guides/release/perform.apt [DEBUG] Parsing file /Users/wsmoak/svn/continuum/continuum/continuum-docs/src/site/apt/administrator_guides/security/ldap.apt [DEBUG] Parsing file /Users/wsmoak/svn/continuum/continuum/continuum-docs/src/site/apt/developer_guides/building.apt [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] String index out of range: -1 [INFO] ------------------------------------------------------------------------ [DEBUG] Trace java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1768) at org.apache.maven.doxia.module.fo.FoAggregateSink.link(FoAggregateSink.java:312) ... Here's the page that it doesn't like: https://svn.apache.org/repos/asf/continuum/trunk/continuum-docs/src/site/apt/developer_guides/building.apt It renders okay in html: http://continuum.apache.org/docs/1.3.1/developer_guides/building.html -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: maven-pdf-plugin ready for testingHi Wendy, First, thanks for testing! Wendy Smoak wrote: > > I initially got a build failure because the plugin uses _itself_ > during the build. I commented that part out and jumped through some > hoops building doxia and various parent poms, then it worked. The plugin is only used to build the pdf for the site, it's not needed for building the plugin itself. Since the snaphot is deployed, I suppose you didn't have the m2 snapshot repo configured? All the doxia snapshots should be deployed as well, I'll try to build with a clean repo again, maybe I missed something. > > I tried a 'mvn pdf:pdf' in > https://svn.apache.org/repos/asf/continuum/trunk/continuum-docs and it > failed: The StringIndexOutOfBoundsException is due to two relative links ({{{../../../download.html} Download page}} in installation/standalone.apt and {{{../../../source-repository.html}Source Repository page}} in developer_guides/building.apt), both of which point outside the source document tree (I guess due to the breadcrumbs used) and the fo sink can't handle that. I replaced both links with absolute links and it worked. [snip] > > I can't tell what page it's unhappy about from the error, so I'll > create a pdf.xml with a table of contents as described in the docs, > and add things in until it blows up again. :) > I have created a simple pdf.xml from site.xml which I attach. Note that the pdf plugin can't handle nested items (yet). There are a few warnings about links and images but the pdf builds so you may use this as a start. Some remarks: *) The link warnings are expected, as doxia 1.1 is more strict about invalid anchors/links. In particular, in apt source files, local links (links to other source documents) have to start with "./" or "../", eg {{{standalone.html}Standalone}} should be {{{./standalone.html}Standalone}}. *) I have to investigate the image warnings, it seems that some resources are not copied *) images from apt source files are not handled well because apt doesn't allow to specify the image width and other options. This works better if you use xdocs instead. *) the TOC doesn't break across pages, need to check as I think this worked in m1 HTH, -Lukas <?xml version="1.0" encoding="ISO-8859-1"?> <!-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file ~ distributed with this work for additional information ~ regarding copyright ownership. The ASF licenses this file ~ to you under the Apache License, Version 2.0 (the ~ "License"); you may not use this file except in compliance ~ with the License. You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, ~ software distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the License for the ~ specific language governing permissions and limitations ~ under the License. --> <document outputName="Apache Continuum"> <meta> <title>Apache Continuum</title> <author>The Apache Continuum Project</author> </meta> <toc name="Documentation"> <item name="Index (category)" ref="index.html"/> <item name="Getting Started" ref="getting-started.html"/> <item name="Installation/Upgrade Guides" ref="installation/index.html"/> <item name="System Requirements" ref="installation/requirements.html"/> <item name="Installation" ref="installation/installation.html"/> <item name="Standalone" ref="installation/standalone.html"/> <item name="Tomcat" ref="installation/tomcat.html"/> <item name="JBoss" ref="installation/jboss.html"/> <item name="Jetty" ref="installation/jetty.html"/> <item name="Geronimo" ref="installation/geronimo.html"/> <item name="Glassfish" ref="installation/glassfish.html"/> <item name="Release Notes" ref="installation/release-notes.html"/> <item name="Upgrade" ref="installation/upgrade.html"/> <item name="User's Guides" collapse="true" ref="user_guides/index.html"/> <item name="Managing Projects" ref="user_guides/managing_project/index.html"/> <item name="Add a Project" ref="user_guides/managing_project/addProject.html"/> <item name="Edit a Project" ref="user_guides/managing_project/editProject.html"/> <item name="Remove a Project" ref="user_guides/managing_project/removeProject.html"/> <item name="Managing Build Definitions" ref="user_guides/managing_builddef/index.html"/> <item name="Project Build Definition" ref="user_guides/managing_builddef/builddefProject.html"/> <item name="Project Group Build Definition" ref="user_guides/managing_builddef/builddefGroup.html"/> <item name="Managing Notification" ref="user_guides/notification/index.html"/> <item name="Mail Notification" ref="user_guides/notification/mail.html"/> <item name="IRC Notification" ref="user_guides/notification/irc.html"/> <item name="Jabber Notification" ref="user_guides/notification/jabber.html"/> <item name="MSN Notification" ref="user_guides/notification/msn.html"/> <item name="Wagon Notification" ref="user_guides/notification/wagon.html"/> <item name="Building a project" ref="user_guides/building_project/index.html"/> <item name="Release Management" ref="user_guides/release/index.html"/> <item name="Administrator's Guides" ref="administrator_guides/index.html"/> <item name="Managing Users and Security" ref="administrator_guides/security/index.html"/> <item name="Security Configuration" ref="administrator_guides/security/customising-security.html"/> <item name="LDAP Configuration" ref="administrator_guides/security/ldap.html"/> <item name="Adding Project Group" ref="administrator_guides/projectgroup.html"/> <item name="Managing Builders" ref="administrator_guides/builder.html"/> <item name="Managing JDKs" ref="administrator_guides/jdk.html"/> <item name="Managing Build Environments" ref="administrator_guides/profiles.html"/> <item name="Managing Schedules" ref="administrator_guides/schedules.html"/> <item name="Managing General Configuration" ref="administrator_guides/configuration.html"/> <item name="Managing Local Repositories" ref="administrator_guides/localRepository.html"/> <item name="Managing Purge Configuration" ref="administrator_guides/purgeConfiguration.html"/> <item name="Managing Parallel Builds" ref="administrator_guides/parallelBuilds.html"/> <item name="External databases" ref="administrator_guides/external-db.html"/> <item name="Monitoring Continuum" ref="administrator_guides/monitoring.html"/> <item name="Appearance Configuration" ref="administrator_guides/appearance.html"/> <item name="Build Definition Template" ref="administrator_guides/builddefTemplate.html"/> <item name="Shutdown Continuum" ref="administrator_guides/shutdown.html"/> <item name="Developer's Guides" ref="developer_guides/index.html"/> <item name="Building Continuum" ref="developer_guides/building.html"/> <item name="XML-RPC" ref="developer_guides/xmlrpc.html"/> </toc> </document> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: maven-pdf-plugin ready for testing> > *) I have to investigate the image warnings, it seems that some > resources are not copied > This was actually a bug in relative link resolution for figure sources, it's fixed and new snapshot deployed. -Lukas --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: maven-pdf-plugin ready for testingOn Fri, Feb 20, 2009 at 1:56 AM, Lukas Theussl <ltheussl@...> wrote:
> The plugin is only used to build the pdf for the site, it's not needed for > building the plugin itself. Since the snaphot is deployed, I suppose you > didn't have the m2 snapshot repo configured? All the doxia snapshots should > be deployed as well, I'll try to build with a clean repo again, maybe I > missed something. It's a circular dependency, the plugin's build depends on itself, right? > The StringIndexOutOfBoundsException is due to two relative links > ({{{../../../download.html} Download page}} in installation/standalone.apt > and {{{../../../source-repository.html}Source Repository page}} in > developer_guides/building.apt), both of which point outside the source > document tree (I guess due to the breadcrumbs used) and the fo sink can't > handle that. I replaced both links with absolute links and it worked. > > I have created a simple pdf.xml from site.xml which I attach. Note that the > pdf plugin can't handle nested items (yet). There are a few warnings about > links and images but the pdf builds so you may use this as a start. Thanks! I fixed the links and used the pdf.xml you attached. I'll work on fixing the other links and resizing the images too. In an hour or so, it will sync to... http://continuum.apache.org/docs/1.3.2-SNAPSHOT/apache-continuum.pdf I also created a component in MSANDBOX and added a wish to use ${project.version} in pdf.xml. Thanks, Lukas. This is great. Release it! :) -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
| Free embeddable forum powered by Nabble | Forum Help |