diff --git a/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java b/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
index 659b8c5d..28d8cf39 100644
--- a/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
+++ b/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java
@@ -73,7 +73,7 @@ import org.apache.maven.project.Project;
* Default implemenataion of Artifact Deployer interface
*
* @author Michal Maczka
- * @version $Id: DefaultArtifactDeployer.java,v 1.2 2003/06/17 22:06:00 michal Exp $
+ * @version $Id: DefaultArtifactDeployer.java,v 1.3 2003/06/19 10:52:25 michal Exp $
*/
public class DefaultArtifactDeployer implements ArtifactDeployer
{
@@ -142,7 +142,7 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
}
/**
- * Istall given file in repsoitory
+ * Install given file in local repsoitory
* @param artifact the artifact file to insatall
* @param type The type of the artiafct
* @param project
@@ -156,22 +156,32 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
String version)
throws MavenException
{
- String repositoryPath = getRepositoryPath(type, project, version);
+
try
- {
- String dest = getLocalRepository(project) + "/" + repositoryPath;
+ {
+ File file =
+ new File(
+ getLocalRepository(project),
+ getRepositoryPath(type, project, version));
+
+ if (!file.exists())
+ {
+ file.mkdirs();
+ }
+ file = new File(file, getRepositoryFile(type, project, version));
System.out.println(
- "Copying: from '" + artifact + "' to: '" + dest + "'");
- FileUtils.copyFile(new File(artifact), new File(dest));
+ "Copying: from '" + artifact + "' to: '" + file + "'");
+ FileUtils.copyFile(new File(artifact), file);
+
}
catch (IOException e)
{
String msg =
"Cannot install file: '"
- + repositoryPath
+ + artifact
+ "'. Reason: "
+ e.getMessage();
- throw new MavenException(msg);
+ throw new MavenException(msg, e);
}
}
@@ -201,13 +211,13 @@ public class DefaultArtifactDeployer implements ArtifactDeployer
if (distSite != null && distSite.length() > 0)
{
project.getContext().setVariable(
- "maven.deploy.default.url",
+ "maven.deploy.repo.central",
project.getDistributionSite());
project.getContext().setVariable(
- "maven.deploy.default.dir",
+ "maven.deploy.repo.central.directory",
project.getDistributionDirectory());
- repos = "default, " + repos;
+ repos = "central, " + repos;
}
String repositoryPath = getRepositoryPath(type, project, version);
diff --git a/artifact/src/main/org/apache/maven/artifact/deployer/MavenDeployRequest.java b/artifact/src/main/org/apache/maven/artifact/deployer/MavenDeployRequest.java
index 32d64b15..52789d1c 100644
--- a/artifact/src/main/org/apache/maven/artifact/deployer/MavenDeployRequest.java
+++ b/artifact/src/main/org/apache/maven/artifact/deployer/MavenDeployRequest.java
@@ -64,7 +64,7 @@ import org.apache.maven.project.Project;
* The Bean which serves as Proxy for Jelly scripts To Artifact Deployement API
*
* @author Michal Maczka
- * @version $Id: MavenDeployRequest.java,v 1.1 2003/06/17 22:06:00 michal Exp $
+ * @version $Id: MavenDeployRequest.java,v 1.2 2003/06/19 10:52:25 michal Exp $
*/
public class MavenDeployRequest extends DeployRequest
{
@@ -88,44 +88,49 @@ public class MavenDeployRequest extends DeployRequest
super();
String username =
(String) project.getContext().getVariable(
- "maven.deploy." + repository + ".username");
+ "maven.deploy.repo." + repository + ".username");
System.out.println(repository + " username:" + username);
String password =
(String) project.getContext().getVariable(
- "maven.deploy." + repository + ".password");
+ "maven.deploy.repo." + repository + ".password");
System.out.println(repository + " password: '" + password + "'");
String passphrase =
(String) project.getContext().getVariable(
- "maven.deploy." + repository + ".passphrase");
+ "maven.deploy.repo." + repository + ".passphrase");
String privateKey =
(String) project.getContext().getVariable(
- "maven.deploy." + repository + ".privatekey");
+ "maven.deploy.repo." + repository + ".privatekey");
String url =
(String) project.getContext().getVariable(
- "maven.deploy." + repository + ".url");
+ "maven.deploy.repo." + repository );
String dir =
(String) project.getContext().getVariable(
- "maven.deploy." + repository + ".dir");
+ "maven.deploy.repo." + repository + ".directory");
String port =
(String) project.getContext().getVariable(
- "maven.deploy." + repository + ".port");
+ "maven.deploy.repo." + repository + ".port");
+
+ String remoteGroup =
+ (String) project.getContext().getVariable(
+ "maven.deploy.repo." + repository + ".remote.group");
String proxyHost =
(String) project.getContext().getVariable(
- "maven.deploy." + repository + ".proxy.host");
+ "maven.deploy.repo." + repository + ".proxy");
String proxyUser =
(String) project.getContext().getVariable(
- "maven.deploy." + repository + ".proxy.username");
+ "maven.deploy.repo." + repository + ".proxy.username");
+
String proxyPassword =
(String) project.getContext().getVariable(
- "maven.deploy." + repository + ".proxy.password");
+ "maven.deploy.repo." + repository + ".proxy.password");
String proxyPort =
(String) project.getContext().getVariable(
@@ -135,6 +140,7 @@ public class MavenDeployRequest extends DeployRequest
setPass(password);
setPassphrase(passphrase);
setPrivateKey(url);
+ setGroup(remoteGroup);
setUrl(url);
try