Author: jdcasey
Date: Mon Jun 5 12:46:44 2006
New Revision: 411900
URL: http://svn.apache.org/viewvc?rev=411900&view=rev
Log:
[MDEPLOY-33] Fixed ArtifactDeployer call to pass in the pomFile (generated or
provided) along with the artifact, instead of the artifact-file. The main file
is passed to the artifact using setFile(..) now.
Modified:
maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java
Modified:
maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java?rev=411900&r1=411899&r2=411900&view=diff
==============================================================================
---
maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java
(original)
+++
maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java
Mon Jun 5 12:46:44 2006
@@ -207,22 +207,21 @@
// Create the artifact
Artifact artifact =
artifactFactory.createArtifactWithClassifier( groupId, artifactId,
version, packaging, classifier );
+
+ artifact.setFile( file );
// Upload the POM if requested, generating one if need be
if ( generatePom )
{
- ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact,
generatePomFile() );
- artifact.addMetadata( metadata );
- }
- else if ( pomFile != null && pomFile.exists() )
- {
- ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact,
pomFile );
- artifact.addMetadata( metadata );
+ pomFile = generatePomFile();
}
+ ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact,
pomFile );
+ artifact.addMetadata( metadata );
+
try
{
- getDeployer().deploy( file, artifact, deploymentRepository,
getLocalRepository() );
+ getDeployer().deploy( pomFile, artifact, deploymentRepository,
getLocalRepository() );
}
catch ( ArtifactDeploymentException e )
{