You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/10/04 04:26:41 UTC
svn commit: r293493 - in /maven/components/trunk:
maven-artifact-manager/src/test/java/org/apache/maven/artifact/deployer/
maven-artifact-manager/src/test/java/org/apache/maven/artifact/installer/
maven-artifact/src/main/java/org/apache/maven/artifact/...
Author: brett
Date: Mon Oct 3 19:26:25 2005
New Revision: 293493
URL: http://svn.apache.org/viewcvs?rev=293493&view=rev
Log:
PR: MNG-644
remove use of deprecated artifact method (retain signature for backwards compat until next release of install/deploy plugins)
Modified:
maven/components/trunk/maven-artifact-manager/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java
maven/components/trunk/maven-artifact-manager/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java
maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java
maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java
maven/components/trunk/maven-plugins/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java
maven/components/trunk/maven-plugins/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java
Modified: maven/components/trunk/maven-artifact-manager/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact-manager/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java?rev=293493&r1=293492&r2=293493&view=diff
==============================================================================
--- maven/components/trunk/maven-artifact-manager/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java (original)
+++ maven/components/trunk/maven-artifact-manager/src/test/java/org/apache/maven/artifact/deployer/ArtifactDeployerTest.java Mon Oct 3 19:26:25 2005
@@ -50,7 +50,9 @@
Artifact artifact = createArtifact( "artifact", "1.0" );
- artifactDeployer.deploy( artifactBasedir, "artifact-1.0", artifact, remoteRepository(), localRepository() );
+ File file = new File( artifactBasedir, "artifact-1.0.jar" );
+
+ artifactDeployer.deploy( file, artifact, remoteRepository(), localRepository() );
assertRemoteArtifactPresent( artifact );
}
Modified: maven/components/trunk/maven-artifact-manager/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact-manager/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java?rev=293493&r1=293492&r2=293493&view=diff
==============================================================================
--- maven/components/trunk/maven-artifact-manager/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java (original)
+++ maven/components/trunk/maven-artifact-manager/src/test/java/org/apache/maven/artifact/installer/ArtifactInstallerTest.java Mon Oct 3 19:26:25 2005
@@ -50,7 +50,9 @@
Artifact artifact = createArtifact( "artifact", "1.0" );
- artifactInstaller.install( artifactBasedir, "artifact-1.0", artifact, localRepository() );
+ File source = new File( artifactBasedir, "artifact-1.0.jar" );
+
+ artifactInstaller.install( source, artifact, localRepository() );
assertLocalArtifactPresent( artifact );
}
Modified: maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java?rev=293493&r1=293492&r2=293493&view=diff
==============================================================================
--- maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java (original)
+++ maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/deployer/ArtifactDeployer.java Mon Oct 3 19:26:25 2005
@@ -25,10 +25,31 @@
{
String ROLE = ArtifactDeployer.class.getName();
+ /**
+ * Deploy an artifact from a particular directory. The artifact handler is used to determine the filename
+ * of the source file.
+ *
+ * @param basedir the directory where the artifact is stored
+ * @param finalName the name of the artifact sans extension
+ * @param artifact the artifact definition
+ * @param deploymentRepository the repository to deploy to
+ * @param localRepository the local repository to install into
+ * @throws ArtifactDeploymentException if an error occurred deploying the artifact
+ * @deprecated to be removed before 2.0 after the instlal/deploy plugins use the alternate method
+ */
void deploy( String basedir, String finalName, Artifact artifact, ArtifactRepository deploymentRepository,
ArtifactRepository localRepository )
throws ArtifactDeploymentException;
+ /**
+ * Deploy an artifact from a particular file.
+ *
+ * @param source the file to deploy
+ * @param artifact the artifact definition
+ * @param deploymentRepository the repository to deploy to
+ * @param localRepository the local repository to install into
+ * @throws ArtifactDeploymentException if an error occurred deploying the artifact
+ */
void deploy( File source, Artifact artifact, ArtifactRepository deploymentRepository,
ArtifactRepository localRepository )
throws ArtifactDeploymentException;
Modified: maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java?rev=293493&r1=293492&r2=293493&view=diff
==============================================================================
--- maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java (original)
+++ maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/installer/ArtifactInstaller.java Mon Oct 3 19:26:25 2005
@@ -33,11 +33,12 @@
* Install an artifact from a particular directory. The artifact handler is used to determine the filename
* of the source file.
*
- * @param basedir the directory where the artifact is stored
- * @param finalName the name of the artifact sans extension
- * @param artifact the artifact definition
+ * @param basedir the directory where the artifact is stored
+ * @param finalName the name of the artifact sans extension
+ * @param artifact the artifact definition
* @param localRepository the local repository to install into
* @throws ArtifactInstallationException if an error occurred installing the artifact
+ * @deprecated to be removed before 2.0 after the instlal/deploy plugins use the alternate method
*/
void install( String basedir, String finalName, Artifact artifact, ArtifactRepository localRepository )
throws ArtifactInstallationException;
@@ -46,8 +47,8 @@
/**
* Install an artifact from a particular file.
*
- * @param source the file to install
- * @param artifact the artifact definition
+ * @param source the file to install
+ * @param artifact the artifact definition
* @param localRepository the local repository to install into
* @throws ArtifactInstallationException if an error occurred installing the artifact
*/
Modified: maven/components/trunk/maven-plugins/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java?rev=293493&r1=293492&r2=293493&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java (original)
+++ maven/components/trunk/maven-plugins/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java Mon Oct 3 19:26:25 2005
@@ -139,7 +139,8 @@
}
else
{
- deployer.deploy( buildDirectory, finalName, artifact, deploymentRepository, localRepository );
+ File file = new File( buildDirectory, finalName + "." + artifact.getArtifactHandler().getExtension() );
+ deployer.deploy( file, artifact, deploymentRepository, localRepository );
}
for ( Iterator i = attachedArtifacts.iterator(); i.hasNext(); )
Modified: maven/components/trunk/maven-plugins/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java?rev=293493&r1=293492&r2=293493&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java (original)
+++ maven/components/trunk/maven-plugins/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java Mon Oct 3 19:26:25 2005
@@ -108,8 +108,8 @@
}
else
{
- // TODO: would be something nice to get back from the project to get the full filename (the OGNL feedback thing)
- installer.install( buildDirectory, finalName, artifact, localRepository );
+ File file = new File( buildDirectory, finalName + "." + artifact.getArtifactHandler().getExtension() );
+ installer.install( file, artifact, localRepository );
}
for ( Iterator i = attachedArtifacts.iterator(); i.hasNext(); )
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org