Customization layer changes in docbkx-maven-plugin 2.0.15

98 views
Skip to first unread message

David Porter

unread,
Jan 24, 2014, 9:03:34 AM1/24/14
to docbkx-to...@googlegroups.com
We are consuming the docbkx-maven-plugin in our own in-house doc plugin, which is in turn used by a number of our documentation projects.

Our plugin copies our customization files into the relevant DocBook XSL directory (html, fo, webhelp, etc) and then packages the whole lot as a JAR.

Previously we were using docbkx-maven-plugin 2.0.13 and the following entry in our doc plugin pom.xml worked fine:

<htmlCustomization>docbook/html/custom.xsl</htmlCustomization>

I am now trying out 2.0.15. Now, mvn site builds that use our doc plugin fail because they can no longer find our customization files. The build is looking in the directory structure of the documentation project itself, when in fact they are in our doc plugin JAR in the local .m2 repository.

The error looks like this

Failed to read stylesheet from file:...target/sitedocs/myguide/docbook/html/custom.xsl (No such file or directory)

I imagine this has something to do with the fix for Issue 93.

Any ideas for a workaround? I'd like to move to 2.0.15 to get the latest WebHelp changes.

Mimil Mimil

unread,
Jan 24, 2014, 2:45:36 PM1/24/14
to docbkx-to...@googlegroups.com
Hello,

adding ${basedir} at the beginning isn't working? (<htmlCustomization>${basedir}/docbook/html/custom.xsl</htmlCustomization>)

Regards,
Cedric,


--
You received this message because you are subscribed to the Google Groups "Docbkx Tools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-us...@googlegroups.com.
To post to this group, send email to docbkx-to...@googlegroups.com.
Visit this group at http://groups.google.com/group/docbkx-tools-users.
For more options, visit https://groups.google.com/groups/opt_out.

Mimil Mimil

unread,
Jan 24, 2014, 2:45:46 PM1/24/14
to docbkx-to...@googlegroups.com
Hello,

adding ${basedir} at the beginning isn't working? (<htmlCustomization>${basedir}/docbook/html/custom.xsl</htmlCustomization>)

Regards,
Cedric,
On Fri, Jan 24, 2014 at 3:03 PM, David Porter <davidp...@gmail.com> wrote:

--

David Porter

unread,
Jan 27, 2014, 7:00:16 AM1/27/14
to docbkx-to...@googlegroups.com
Hi Cedric

No, that doesn't work.

We define all the customization and DocBook XSL parameters in our in-house doc plugin. Then each of our documentation projects inherits that plugin.

So, when I add ${baseDir} to the path in the htmlCustomization element (in the plugin pom), the build interprets that as being the base directory of the documentation project, not the plugin. 

This worked in previous versions. 

Thanks

On Friday, January 24, 2014 7:45:46 PM UTC, Mimi...@gmail.com wrote:
Hello,

adding ${basedir} at the beginning isn't working? (<htmlCustomization>${basedir}/docbook/html/custom.xsl</htmlCustomization>)

Regards,
Cedric,
On Fri, Jan 24, 2014 at 3:03 PM, David Porter <davidp...@gmail.com> wrote:
We are consuming the docbkx-maven-plugin in our own in-house doc plugin, which is in turn used by a number of our documentation projects.

Our plugin copies our customization files into the relevant DocBook XSL directory (html, fo, webhelp, etc) and then packages the whole lot as a JAR.

Previously we were using docbkx-maven-plugin 2.0.13 and the following entry in our doc plugin pom.xml worked fine:

<htmlCustomization>docbook/html/custom.xsl</htmlCustomization>

I am now trying out 2.0.15. Now, mvn site builds that use our doc plugin fail because they can no longer find our customization files. The build is looking in the directory structure of the documentation project itself, when in fact they are in our doc plugin JAR in the local .m2 repository.

The error looks like this

Failed to read stylesheet from file:...target/sitedocs/myguide/docbook/html/custom.xsl (No such file or directory)

I imagine this has something to do with the fix for Issue 93.

Any ideas for a workaround? I'd like to move to 2.0.15 to get the latest WebHelp changes.

--
You received this message because you are subscribed to the Google Groups "Docbkx Tools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-users+unsub...@googlegroups.com.

Mimil Mimil

unread,
Feb 13, 2014, 5:22:15 PM2/13/14
to docbkx-to...@googlegroups.com
Hello,


we have to look how to support both features.

Regards,
Cedric


To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-us...@googlegroups.com.

David Porter

unread,
Apr 14, 2016, 12:39:35 PM4/14/16
to Docbkx Tools Users
Hi Cedric, 

It's two years since I asked about this, and I must admit I'd forgotten about it.

I would now very much like to move to docbx-maven-plugin 2.0.16, but I am still experiencing the problem outlined above, namely that the customization layers declared in our pom files are being incorrectly interpreted as being in the project file system, rather than a JAR file managed by Maven. Our doc builds are failing as a result.

Here is the debug output from a successful build with 2.0.13:


[DEBUG] Configuring mojo com.agilejava.docbkx:docbkx-maven-plugin:2.0.13:generate-html from plugin realm ClassRealm[plugin>com.agilejava.docbkx:docbkx-maven-plugin:2.0.13, parent: sun.misc.Launcher$AppClassLoader@135fbaa4]
[DEBUG] Configuring mojo 'com.agilejava.docbkx:docbkx-maven-plugin:2.0.13:generate-html' with override configurator -->
...
[DEBUG] Using stylesheet: jar:file:/Users/david.porter/.m2/repository/com/newbay/maven/plugins/doc/1.0.16/doc-1.0.16-resources.jar!/docbook/html/docbook.xsl
[DEBUG] SourceFile: /Users/david.porter/projects/my-book/target/working/my-book.xml
[DEBUG] TargetFile: /Users/david.porter/projects/target/site/docs/my-book/htmlsingle/my-book.html
[INFO] Processing input file: my-book.xml
[DEBUG] Xerces XInclude mode entered
[DEBUG] Customization: docbook/html/customhtmlsingle.xsl




And here's the equivalent output from a failed build with 2.0.16:

[DEBUG] Configuring mojo com.agilejava.docbkx:docbkx-maven-plugin:2.0.16:generate-html from plugin realm ClassRealm[plugin>com.agilejava.docbkx:docbkx-maven-plugin:2.0.16, parent: sun.misc.Launcher$AppClassLoader@135fbaa4]
[DEBUG] Configuring mojo 'com.agilejava.docbkx:docbkx-maven-plugin:2.0.16:generate-html' with override configurator -->
...

[DEBUG] Using stylesheet: jar:file:/Users/david.porter/.m2/repository/com/newbay/maven/plugins/doc/1.0.20-SNAPSHOT/doc-1.0.20-SNAPSHOT-resources.jar!/docbook/html/docbook.xsl

[DEBUG] SourceFile: /Users/david.porter/projects/my-other-book/target/working/my-other-book.xml

[DEBUG] TargetFile: /Users/david.porter/projects/my-other-book/target/site/docs/my-other-book/htmlsingle/my-other-book.html

[INFO] Processing input file: my-other-book.xml

[DEBUG] Xerces XInclude mode entered

[DEBUG] Customization: /Users/david.porter/projects/my-other-book/docbook/html/customhtmlsingle.xsl

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE



Do you have any ideas on how to workaround this?

Thanks

Mimil Owns

unread,
Apr 17, 2016, 5:45:21 PM4/17/16
to docbkx-to...@googlegroups.com
Hi there,

I just pushed a fix on 2.0.17-SNAPSHOT (get it from sonatype snapshot, I think it is synched with maven central snapshots).

Here is a sample:

<!-- This sample shows how to use a stylesheet customization located in the dependency classpath. It must start by 'classpath:/'. -->

<profile>
<id>docbkx.jar-configuration</id>
<build>
<plugins>
<plugin>
<groupId>com.agilejava.docbkx</groupId>
<artifactId>docbkx-maven-plugin</artifactId>
<version>${project.version}</version>
<dependencies>
<dependency>
<groupId>net.sf.docbook</groupId>
<artifactId>docbook-xsl</artifactId>
<version>1.78.1</version>
<classifier>ns-resources</classifier>
<type>zip</type>
<scope>runtime</scope>
</dependency>
</dependencies>
<configuration>
<foCustomization>classpath:/docbook/fo/docbook.xsl</foCustomization>
<includes>article.xml</includes>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<example.title>Additional customization</example.title>
<example.input>article.xml</example.input>
</properties>
</profile>

Regards,
Cedric,

--
You received this message because you are subscribed to the Google Groups "Docbkx Tools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-us...@googlegroups.com.
To post to this group, send email to docbkx-to...@googlegroups.com.

David Porter

unread,
Apr 19, 2016, 10:40:16 AM4/19/16
to Docbkx Tools Users
Many thanks Cedric. That worked. 

So, um, when do you plan to release 2.0.17? I don't think we can rely on a snapshot in our builds.

David

Mimil Owns

unread,
Apr 22, 2016, 5:04:09 AM4/22/16
to docbkx-to...@googlegroups.com
Yes I will in the few days.

Regards,
Cedric,

--
Reply all
Reply to author
Forward
0 new messages