Details

Description

This is a major patch to the decoration model to bring some sanity in the link resolution when it is used under the reactor build. It generates breadcrumbs and item links correctly in all scenarios that I have tested (the current HEAD code does not) and passes all the unit tests that are already there.

Yep, same here. Maven 2.0.4 and 2.0.5-SNAPSHOT (do we have a release yet?).

Which platform did you use? I ran my tests on Linux, I don't have a built HEAD on Windows and the process of getting the jumble of maven, plexus, doxia and everything else to get built took my fastest machines two hours. I don't want to think how long my old windows notebook would take for this...

If you are on Windows, I will try to run the tests for you this weekend.

Can you attach the failed test report? That would help me tremendously.

Henning Schmiedehausen
added a comment - 24/Jan/07 4:25 PM Yep, same here. Maven 2.0.4 and 2.0.5-SNAPSHOT (do we have a release yet?).
Which platform did you use? I ran my tests on Linux, I don't have a built HEAD on Windows and the process of getting the jumble of maven, plexus, doxia and everything else to get built took my fastest machines two hours. I don't want to think how long my old windows notebook would take for this...
If you are on Windows, I will try to run the tests for you this weekend.
Can you attach the failed test report? That would help me tremendously.

java.lang.NullPointerException
at java.io.File.<init>(File.java:194)
at org.apache.maven.doxia.site.decoration.inheritance.PathUtils.getRelativeFilePath(PathUtils.java:130)
at org.apache.maven.doxia.site.decoration.inheritance.PathUtils.getRelativePath(PathUtils.java:103)
at org.apache.maven.doxia.site.decoration.inheritance.PathUtils.convertPath(PathUtils.java:40)
at org.apache.maven.doxia.site.decoration.inheritance.DefaultDecorationModelInheritanceAssembler.convertPath(DefaultDecorationModelInheritanceAssembler.java:338)
at org.apache.maven.doxia.site.decoration.inheritance.DefaultDecorationModelInheritanceAssembler.resolveBannerPaths(DefaultDecorationModelInheritanceAssembler.java:150)
at org.apache.maven.doxia.site.decoration.inheritance.DefaultDecorationModelInheritanceAssembler.resolvePaths(DefaultDecorationModelInheritanceAssembler.java:97)
at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getDecorationModel(AbstractSiteRenderingMojo.java:555)
...

Vincent Siveton
added a comment - 16/Feb/07 5:05 AM I got a NPE in a multi project case without any documentation.
java.lang.NullPointerException
at java.io.File.<init>(File.java:194)
at org.apache.maven.doxia.site.decoration.inheritance.PathUtils.getRelativeFilePath(PathUtils.java:130)
at org.apache.maven.doxia.site.decoration.inheritance.PathUtils.getRelativePath(PathUtils.java:103)
at org.apache.maven.doxia.site.decoration.inheritance.PathUtils.convertPath(PathUtils.java:40)
at org.apache.maven.doxia.site.decoration.inheritance.DefaultDecorationModelInheritanceAssembler.convertPath(DefaultDecorationModelInheritanceAssembler.java:338)
at org.apache.maven.doxia.site.decoration.inheritance.DefaultDecorationModelInheritanceAssembler.resolveBannerPaths(DefaultDecorationModelInheritanceAssembler.java:150)
at org.apache.maven.doxia.site.decoration.inheritance.DefaultDecorationModelInheritanceAssembler.resolvePaths(DefaultDecorationModelInheritanceAssembler.java:97)
at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getDecorationModel(AbstractSiteRenderingMojo.java:555)
...

Ok, you got me confused. This is only possible when a PathDescriptor contains null for both the PathUrl and the relativePath. Which can only happen when the PathDescriptor has been constructed using a 'null' path. And the only place where this is possible is in PathUtils line 47 and there is an explicit null test in front of it.

Can you give some pointers on what project exactly you tried to build the sites for? Or is that some non-public site?

If possible, could you put a breakpoint at PathUtils::getRelativePath(String, String) and tell me what exactly goes in there. I'd guess that oldPath is null.

I'll add another patch shortly which has another minor fix and I will add some explicit testing on that. Also some unit tests.

Henning Schmiedehausen
added a comment - 07/Apr/07 5:52 AM Ok, you got me confused. This is only possible when a PathDescriptor contains null for both the PathUrl and the relativePath. Which can only happen when the PathDescriptor has been constructed using a 'null' path. And the only place where this is possible is in PathUtils line 47 and there is an explicit null test in front of it.
Can you give some pointers on what project exactly you tried to build the sites for? Or is that some non-public site?
If possible, could you put a breakpoint at PathUtils::getRelativePath(String, String) and tell me what exactly goes in there. I'd guess that oldPath is null.
I'll add another patch shortly which has another minor fix and I will add some explicit testing on that. Also some unit tests.

Henning Schmiedehausen
added a comment - 07/Apr/07 3:42 PM Updated version for the doxia decoration patch. This should now avoid all possible NPE problems even with complex builds. Also adds some unit tests for the code.

the unit tests in the last patch actually depended on the existence of a "/tmp/foo" directory (they might report a trailing slash). This is an updated version where the unit tests pass in all cases. Still need to test on Windows, though.

Henning Schmiedehausen
added a comment - 08/Apr/07 6:39 AM the unit tests in the last patch actually depended on the existence of a "/tmp/foo" directory (they might report a trailing slash). This is an updated version where the unit tests pass in all cases. Still need to test on Windows, though.