Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: _Plugin Submission
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :3
Description
This is a inital release of a plugin supporting transformation of Docbook files. As mentioned in some threads at Maven lists, I think it would be a good idea to have a separate Docbook plugin in Maven, in addition to the current support in Doxia. This plugin is based on the transformations contained in the Docbook stylesheets you may find at http://docbook.sourceforge.net/. This way this plugin could automate generation in a lot of formats from Docbook source files with minimal effort, just using the JAXP transformation API.
I've tried to make the plugin as complete as possible in terms of documentation, source format,... Please tell me if there is anything else needed in order to publish this plugin at the Mojo project. The plugin also includes some Docbook source files to show the implemented functionality.
Comments are welcome regarding default place for Docbook source and target files, generated database, possibility of integration with site generation, ...
Thanks in advance, best regards
Jose
-
Hide
- maven-docbook-plugin.zip
- 24/Dec/05 6:54 AM
- 30 kB
- Jose Gonzalez Gomez
-
- maven-docbook-plugin/LICENSE.txt 1 kB
- maven-docbook-plugin/pom.xml 3 kB
- maven-docbook-plugin/src/.../nested/UCS3.xml 14 kB
- maven-docbook-plugin/src/.../pass/UCS2.xml 14 kB
- maven-docbook-plugin/src/.../other/UCS1.xml 14 kB
- maven-docbook-plugin/src/.../css/xhtml.css 0.4 kB
- maven-docbook-plugin/src/docbook/SRS.xml 9 kB
- maven-docbook-plugin/.../DocumentTransformer.java 8 kB
- maven-docbook-plugin/.../OLinkDBUpdater.java 13 kB
- maven-docbook-plugin/.../TransformMojo.java 8 kB
- maven-docbook-plugin/src/.../apt/howto.apt 1 kB
- maven-docbook-plugin/.../introduction.apt 3 kB
- maven-docbook-plugin/src/site/site.xml 0.7 kB
-
Hide
- maven-docbook-plugin.zip
- 20/Dec/05 4:55 AM
- 30 kB
- Jose Gonzalez Gomez
-
- maven-docbook-plugin/LICENSE.txt 1 kB
- maven-docbook-plugin/pom.xml 3 kB
- maven-docbook-plugin/src/.../nested/UCS3.xml 14 kB
- maven-docbook-plugin/src/.../pass/UCS2.xml 14 kB
- maven-docbook-plugin/src/.../other/UCS1.xml 14 kB
- maven-docbook-plugin/src/.../css/xhtml.css 0.4 kB
- maven-docbook-plugin/src/docbook/SRS.xml 9 kB
- maven-docbook-plugin/.../DocumentTransformer.java 8 kB
- maven-docbook-plugin/.../OLinkDBUpdater.java 13 kB
- maven-docbook-plugin/.../TransformMojo.java 7 kB
- maven-docbook-plugin/src/.../apt/howto.apt 1 kB
- maven-docbook-plugin/.../introduction.apt 3 kB
- maven-docbook-plugin/src/site/site.xml 0.7 kB
-
Hide
- maven-docbook-plugin.zip
- 01/Dec/05 4:58 AM
- 29 kB
- Jose Gonzalez Gomez
-
- maven-docbook-plugin/LICENSE.txt 1 kB
- maven-docbook-plugin/pom.xml 3 kB
- maven-docbook-plugin/src/.../nested/UCS3.xml 14 kB
- maven-docbook-plugin/src/.../pass/UCS2.xml 14 kB
- maven-docbook-plugin/src/.../other/UCS1.xml 14 kB
- maven-docbook-plugin/src/docbook/SRS.xml 9 kB
- maven-docbook-plugin/.../DocumentTransformer.java 7 kB
- maven-docbook-plugin/.../OLinkDBUpdater.java 13 kB
- maven-docbook-plugin/.../TransformMojo.java 7 kB
- maven-docbook-plugin/src/.../apt/howto.apt 1 kB
- maven-docbook-plugin/.../introduction.apt 3 kB
- maven-docbook-plugin/src/site/site.xml 0.7 kB
Activity
I would prefer JDK 1.4 myself. I will mostly like use this plugin when I get around to converting my docs to maven and I currently build with 1.4
No problem in making it 1.4 friendly, there is no real need to make it depend on 1.5, just I got used to develop using 1.5 and I didn't think about it before starting.
Here you have a 1.4 friendly version of the plugin, with a very simple support for adding a stylesheet to the generated HTML.
Thanks for the update. There were a few more changes needed, but I used the project itself as a testcase and ran docbook:transform against it:
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:393)
at java.util.Properties.setProperty(Properties.java:102)
at java.lang.System.setProperty(System.java:656)
at org.codehaus.mojo.docbook.TransformMojo.execute(TransformMojo.java:179)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399)
...
Your original code cleared some system properties, but setting them to null isn't allowed in 1.4. We need another alternative here before I can test and commit it.
Also, I changed occurances of StringBuilder to StringBuffer and String.replace(string, string) with replaceAll(string, string). The compiler complained about these as well.
I cleared the system properties instead of setting them to null for now to see what other issues may arise. Here is what I got next.
java.lang.NoClassDefFoundError: org/xml/sax/ext/Attributes2
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
So then I switched the the xercesImpl to 2.6.2 instead to see if I could dodge the problem and got the following. Ran out of time to pursue it further.
[INFO] Unexpected internal error near index 1
\
^
[INFO] ----------------------------------------------------------------------------
[INFO] Trace
java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
\
^
at java.util.regex.Pattern.error(Pattern.java:1541)
at java.util.regex.Pattern.compile(Pattern.java:1298)
at java.util.regex.Pattern.<init>(Pattern.java:1047)
at java.util.regex.Pattern.compile(Pattern.java:785)
at java.lang.String.replaceAll(String.java:1663)
at org.codehaus.mojo.docbook.OLinkDBUpdater.computeFileID(OLinkDBUpdater.java:286)
at org.codehaus.mojo.docbook.DocumentTransformer.transformDocuments(DocumentTransformer.java
:165)
at org.codehaus.mojo.docbook.DocumentTransformer.transform(DocumentTransformer.java:110)
at org.codehaus.mojo.docbook.TransformMojo.execute(TransformMojo.java:148)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor
.java:519)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycl
eExecutor.java:482)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.
java:452)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultL
ifecycleExecutor.java:301)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleE
xecutor.java:268)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java
:137)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
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:324)
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)
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Tue Dec 20 16:10:46 EST 2005
[INFO] Final Memory: 8M/15M
[INFO] ----------------------------------------------------------------------------
As soon as I can (don't know if I'll be able today) I'm gonna try to run the plugin in a 1.4 only environment to see what I get.
Thanks a lot
Here you have a JDK1.4 friendly version working properly (at least for me). The problem was related to xalan and xerces versions: I was using the latest versions of both, that included support for JAXP 1.3, that was included in JDK1.5. That's why you were getting that class not found exception.
Could anybody using JDK1.4 please test this? Take into account that this plugin in its default cofiguration reads the docbook stylesheet from the Internet, so things may slow down a lot inthis case. You may download the stylesheets and place them in your local disk, and the configure the plugin including something like this:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>maven-docbook-plugin</artifactId>
<configuration> <stylesheetLocation>file:/C:/Documents%20and%20Settings/user/My%20documents/software/docbook-xsl-1.69.1/</stylesheetLocation>
</configuration>
</plugin>
Happy New year folks. Jose & watchers, taking another look at this over the next few days.
Happy New Year... I hope you haven't forgotten this, as your last message is from a week ago :o)
Should you need any help with this, feel free to contact me any time.
Thanks again
Nope, just juggling lots of large objects with sharp points. And our internal dev environment just migrated to jdk 1.5
. I'll be at an office where I can test the plugin in 1.4 with little effort later today. If everything goes well, I'll commit your plugin to the sandbox..
Added this to the mojo sandbox.
Performed a docbook:transform on the existing docbook directory. It was sloooow, but produced documents in the site folder.
At some point, I expect that this will need to be converted to a report plugin.
At first glance through the code, there is a dependency on JDK 1.5 but they appear to be code simplifications only (i.e., generics, System.clearProperty()). I checked the rest of the projects and did not find any other plugins dependenct upon 1.5.
Could I get some feedback from those of you watching this issue to see if this requirement is okay? I'm inclined to modify the code to make it 1.4 friendly prior to checkin.