michal 2003/06/19 03:52:25 Modified: src/plugins-build/artifact/src/main/org/apache/maven/artifact/deployer DefaultArtifactDeployer.java MavenDeployRequest.java Log: Install goal fixed Revision Changes Path 1.3 +22 -12 maven/src/plugins-build/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java Index: DefaultArtifactDeployer.java =================================================================== RCS file: /home/cvs/maven/src/plugins-build/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- DefaultArtifactDeployer.java 17 Jun 2003 22:06:00 -0000 1.2 +++ DefaultArtifactDeployer.java 19 Jun 2003 10:52:25 -0000 1.3 @@ -142,7 +142,7 @@ } /** - * 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 @@ 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 @@ 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); 1.2 +17 -11 maven/src/plugins-build/artifact/src/main/org/apache/maven/artifact/deployer/MavenDeployRequest.java Index: MavenDeployRequest.java =================================================================== RCS file: /home/cvs/maven/src/plugins-build/artifact/src/main/org/apache/maven/artifact/deployer/MavenDeployRequest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MavenDeployRequest.java 17 Jun 2003 22:06:00 -0000 1.1 +++ MavenDeployRequest.java 19 Jun 2003 10:52:25 -0000 1.2 @@ -88,44 +88,49 @@ 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 @@ setPass(password); setPassphrase(passphrase); setPrivateKey(url); + setGroup(remoteGroup); setUrl(url); try
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]