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:41:07 UTC
svn commit: r293494 - in /maven/components/trunk/maven-plugins:
maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java
maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallMojo.java
Author: brett
Date: Mon Oct 3 19:40:58 2005
New Revision: 293494
URL: http://svn.apache.org/viewcvs?rev=293494&view=rev
Log:
PR: MNG-653
use the file assigned by the packager for installation/deployment. Error out if that isn't done.
Modified:
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-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=293494&r1=293493&r2=293494&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:40:58 2005
@@ -139,7 +139,12 @@
}
else
{
- File file = new File( buildDirectory, finalName + "." + artifact.getArtifactHandler().getExtension() );
+ File file = artifact.getFile();
+ if ( file == null )
+ {
+ throw new MojoExecutionException(
+ "The packaging for this project did not assign a file to the build artifact" );
+ }
deployer.deploy( file, artifact, deploymentRepository, localRepository );
}
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=293494&r1=293493&r2=293494&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:40:58 2005
@@ -108,7 +108,12 @@
}
else
{
- File file = new File( buildDirectory, finalName + "." + artifact.getArtifactHandler().getExtension() );
+ File file = artifact.getFile();
+ if ( file == null )
+ {
+ throw new MojoExecutionException(
+ "The packaging for this project did not assign a file to the build artifact" );
+ }
installer.install( file, artifact, localRepository );
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org