Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

jonvolfson
Copy link
Contributor

No description provided.

@jonvolfson
Copy link
Contributor Author

@elharo @bimargulies

<packaging>pom</packaging>
<name>MSITE-856</name>

<build>
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

<configuration>
<generateSitemap>true</generateSitemap>
</configuration>
<dependencies><!-- TODO remove when prerequisite is Java 7 -->
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, removed this dependency

if ( !siteDirectory.exists() || !siteDirectory.isDirectory() )
{
System.err.println( "generated-site is missing or not a directory." );
result = false;
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Contributor

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?

Copy link
Contributor Author

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 ) )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!= null?

Copy link
Contributor Author

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>
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -0,0 +1,49 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete blank line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

if ( !siteDirectory.exists() || !siteDirectory.isDirectory() )
{
System.err.println( "generated-site is missing or not a directory." );
result = false;
Copy link
Contributor

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.
asfgit pushed a commit that referenced this pull request Jun 21, 2020
@asfgit asfgit closed this in ec954c8 Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants