mirror of https://github.com/apache/maven.git
o Fixed NPEs
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@828249 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c501175f79
commit
412ab3371b
|
@ -203,12 +203,24 @@ public class DefaultExceptionHandler
|
|||
{
|
||||
String exceptionMessage = t.getMessage();
|
||||
|
||||
if ( exceptionMessage == null )
|
||||
{
|
||||
exceptionMessage = "";
|
||||
}
|
||||
|
||||
if ( t instanceof AbstractMojoExecutionException )
|
||||
{
|
||||
String longMessage = ( (AbstractMojoExecutionException) t ).getLongMessage();
|
||||
if ( StringUtils.isNotEmpty( longMessage ) )
|
||||
{
|
||||
exceptionMessage = longMessage;
|
||||
if ( StringUtils.isEmpty( exceptionMessage ) || longMessage.contains( exceptionMessage ) )
|
||||
{
|
||||
exceptionMessage = longMessage;
|
||||
}
|
||||
else
|
||||
{
|
||||
exceptionMessage += ": " + longMessage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1800,8 +1800,8 @@ public class MavenProject
|
|||
|
||||
protected ArtifactRepository getReleaseArtifactRepository()
|
||||
{
|
||||
if ( getDistributionManagement().getRepository() != null )
|
||||
{
|
||||
if ( getDistributionManagement() != null && getDistributionManagement().getRepository() != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
ArtifactRepository repo =
|
||||
|
@ -1819,8 +1819,8 @@ public class MavenProject
|
|||
|
||||
protected ArtifactRepository getSnapshotArtifactRepository()
|
||||
{
|
||||
if ( getDistributionManagement().getSnapshotRepository() != null )
|
||||
{
|
||||
if ( getDistributionManagement() != null && getDistributionManagement().getSnapshotRepository() != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
ArtifactRepository repo =
|
||||
|
|
Loading…
Reference in New Issue