o some fixes to the install mojo to make the integration test for JAR

installation work.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162796 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2004-06-18 02:15:49 +00:00
parent 196e328086
commit 7e90a62081
1 changed files with 13 additions and 23 deletions

View File

@ -39,15 +39,13 @@ import java.io.File;
* validator="" * validator=""
* expression="#maven.final.name" * expression="#maven.final.name"
* description="" * description=""
*
* @parameter * @parameter
* name="outputDirectory" * name="outputDirectory"
* type="String" * type="String"
* required="true" * required="true"
* validator="" * validator=""
* expression="#maven.build.dir" * expression="#project.build.directory"
* description="" * description=""
*
* @parameter * @parameter
* name="project" * name="project"
* type="org.apache.maven.project.MavenProject" * type="org.apache.maven.project.MavenProject"
@ -55,7 +53,6 @@ import java.io.File;
* validator="" * validator=""
* expression="#project" * expression="#project"
* description="" * description=""
*
* @parameter * @parameter
* name="installer" * name="installer"
* type="org.apache.maven.artifact.installer.ArtifactInstaller" * type="org.apache.maven.artifact.installer.ArtifactInstaller"
@ -63,10 +60,6 @@ import java.io.File;
* validator="" * validator=""
* expression="#component.org.apache.maven.artifact.installer.ArtifactInstaller" * expression="#component.org.apache.maven.artifact.installer.ArtifactInstaller"
* description="" * description=""
*
*
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
* @version $Id$
*/ */
public class JarInstallMojo public class JarInstallMojo
extends AbstractPlugin extends AbstractPlugin
@ -74,19 +67,16 @@ public class JarInstallMojo
public void execute( PluginExecutionRequest request, PluginExecutionResponse response ) public void execute( PluginExecutionRequest request, PluginExecutionResponse response )
throws Exception throws Exception
{ {
String outputDirectory = (String) request.getParameter( "outputDirectory" );
String outputDirectory = ( String ) request.getParameter( "outputDirectory" ); String jarName = (String) request.getParameter( "jarName" );
String jarName = ( String ) request.getParameter( "jarName" ); File jarFile = new File( outputDirectory, jarName + ".jar" );
File jarFile = new File( outputDirectory , jarName + ".jar" ); MavenProject project = (MavenProject) request.getParameter( "project" );
MavenProject project = ( MavenProject ) request.getParameter( "project" ); ArtifactInstaller artifactInstaller = (ArtifactInstaller) request.getParameter( "installer" );
ArtifactInstaller artifactInstaller = ( ArtifactInstaller ) request.getParameter( "component.org.apache.maven.artifact.installer.ArtifactInstaller" );
artifactInstaller.install( jarFile, "jar", project ); artifactInstaller.install( jarFile, "jar", project );
} }
} }