diff --git a/artifact/src/main/org/apache/maven/artifact/deployer/RepositoryInfoBuilder.java b/artifact/src/main/org/apache/maven/artifact/deployer/RepositoryInfoBuilder.java index 410dd3e5..be517f44 100644 --- a/artifact/src/main/org/apache/maven/artifact/deployer/RepositoryInfoBuilder.java +++ b/artifact/src/main/org/apache/maven/artifact/deployer/RepositoryInfoBuilder.java @@ -27,7 +27,7 @@ import org.apache.maven.project.Project; * Perform mapping between project's properties and attributes of DeployRequest class. * * @author Michal Maczka - * @version $Id: RepositoryInfoBuilder.java,v 1.4 2004/05/12 12:33:55 evenisse Exp $ + * @version $Id: RepositoryInfoBuilder.java,v 1.5 2004/06/25 18:19:35 brett Exp $ */ public class RepositoryInfoBuilder { @@ -90,6 +90,10 @@ public class RepositoryInfoBuilder String proxyPort = (String) project.getContext().getProxyPort(); + if (username == null) { + username = (String) project.getContext().getVariable("maven.username"); + } + repoInfo.setUserName(username); repoInfo.setPassword(password); repoInfo.setPassphrase(passphrase); diff --git a/artifact/src/main/org/apache/maven/deploy/deployers/GenericSshDeployer.java b/artifact/src/main/org/apache/maven/deploy/deployers/GenericSshDeployer.java index 48038e6a..665b3665 100644 --- a/artifact/src/main/org/apache/maven/deploy/deployers/GenericSshDeployer.java +++ b/artifact/src/main/org/apache/maven/deploy/deployers/GenericSshDeployer.java @@ -43,7 +43,7 @@ import com.jcraft.jsch.UserInfo; * and if that doesn't work then we fall back * to using the login and password * - * @version $Id: GenericSshDeployer.java,v 1.10 2004/06/25 13:50:05 brett Exp $ + * @version $Id: GenericSshDeployer.java,v 1.11 2004/06/25 18:19:35 brett Exp $ * @todo still have to account for differing setups for people deploying to * their own sites and to the central repository. * @todo improve exception handling @@ -118,11 +118,7 @@ public abstract class GenericSshDeployer extends AbstractDeployer { if (repoInfo.getPassphrase() == null) { - String msg = - "Private key provided " - + "without passphrase for repo: " - + repoInfo.getRepositoryAlias(); - throw new AuthenticationException(msg); + repoInfo.setPassphrase(""); } LOG.info("Using private key: " + privateKey);