PR: MNG-653

use the file assigned by the packager for installation/deployment. Error out if that isn't done.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@293494 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-10-04 02:40:58 +00:00
parent 0eb43da1bb
commit 7fd4c749fb
2 changed files with 12 additions and 2 deletions

View File

@ -139,7 +139,12 @@ public class DeployMojo
}
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 );
}

View File

@ -108,7 +108,12 @@ public class InstallMojo
}
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 );
}