From e09022e3942c5c41f3f106573f37df7412519f8e Mon Sep 17 00:00:00 2001 From: Emmanuel Venisse Date: Fri, 28 Oct 2005 09:51:15 +0000 Subject: [PATCH] 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 --- .../org/apache/maven/plugin/deploy/DeployMojo.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/maven-plugins/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java b/maven-plugins/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java index c05e820a97..08ca8f3498 100644 --- a/maven-plugins/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java +++ b/maven-plugins/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java @@ -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 ); } } -} \ No newline at end of file +}