-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MSITE-856] - NullPointer on org.apache.maven.plugins.site.render.SiteMap.relativePath #31
Conversation
src/it/projects/MSITE-856/pom.xml
Outdated
<packaging>pom</packaging> | ||
<name>MSITE-856</name> | ||
|
||
<build> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maven uses 2 space indents in XML files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/it/projects/MSITE-856/pom.xml
Outdated
<configuration> | ||
<generateSitemap>true</generateSitemap> | ||
</configuration> | ||
<dependencies><!-- TODO remove when prerequisite is Java 7 --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think java 7 is minimum now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, removed this dependency
src/it/projects/MSITE-856/verify.bsh
Outdated
if ( !siteDirectory.exists() || !siteDirectory.isDirectory() ) | ||
{ | ||
System.err.println( "generated-site is missing or not a directory." ); | ||
result = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should probably return here since you know the answer now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider returning when there's an answer unless for some reason you actually need the result variable in BSH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Removed the variable "result" so that false would be returned as soon as an error occurred. Not sure if this is the cleanest way to fix this.
sink.link( relativePath( item.getHref() ) ); | ||
sink.text( item.getName() ); | ||
sink.link_(); | ||
if ( !( item.getHref() == null ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!= null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
<project xmlns="http://maven.apache.org/DECORATION/1.6.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.6.0 http://maven.apache.org/xsd/decoration-1.6.0.xsd"> | ||
<body> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two space indents in all XML files, per Maven project guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/it/projects/MSITE-856/verify.bsh
Outdated
@@ -0,0 +1,49 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete blank line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/it/projects/MSITE-856/verify.bsh
Outdated
if ( !siteDirectory.exists() || !siteDirectory.isDirectory() ) | ||
{ | ||
System.err.println( "generated-site is missing or not a directory." ); | ||
result = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider returning when there's an answer unless for some reason you actually need the result variable in BSH?
…eMap.relativePath Removing debugging statements from fixed method. Changing error statements in verify.bsh to be relevant to the integration test. Cleaning up pom that was used as reference from another integration test. Added earlier return in verify.bsh, fixed boolean logic in SiteMap, changed xml indent to two spaces. Fixed indent size on MSITE-856 IT site.xml, removed boolean 'result' variable from verify.bsh so that false is immediately returned on an error, deleted blank line in verify.bsh.
No description provided.