PR: MNG-1255

Submitted by : Allan Ramirez
Reviewed by Emmanuel Venisse
Create .ssh directory $user.home if it doens't exist

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@329176 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Emmanuel Venisse 2005-10-28 09:51:15 +00:00
parent 1be0f61ed6
commit e09022e394
1 changed files with 13 additions and 1 deletions

View File

@ -104,7 +104,19 @@ public class DeployMojo
" distributionManagement element";
throw new MojoExecutionException( msg );
}
String protocol = deploymentRepository.getProtocol();
if( protocol.equals( "scp" ) )
{
File sshFile = new File( System.getProperty( "user.home" ), ".ssh" );
if( !sshFile.exists() )
{
sshFile.mkdirs();
}
}
// Deploy the POM
boolean isPomArtifact = "pom".equals( packaging );
if ( !isPomArtifact )
@ -146,4 +158,4 @@ public class DeployMojo
throw new MojoExecutionException( e.getMessage(), e );
}
}
}
}