o install the POM for the integration tests

NOTE: this is not how I would like this handled, the artifact layer will
  be responsible for dealing with metadata in a way that is controlled by
  the artifact handler.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162982 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2004-08-15 16:19:38 +00:00
parent bf3c8b0576
commit 8991c26f9c
1 changed files with 13 additions and 6 deletions

View File

@ -27,32 +27,26 @@ import org.apache.maven.project.MavenProject;
/**
* @goal install
*
* @description installs project's main artifact in local repository
*
* @parameter name="project"
* type="org.apache.maven.project.MavenProject"
* required="true"
* validator=""
* expression="#project"
* description=""
*
* @parameter name="installer"
* type="org.apache.maven.artifact.installer.ArtifactInstaller"
* required="true"
* validator=""
* expression="#component.org.apache.maven.artifact.installer.ArtifactInstaller"
* description=""
*
* @parameter name="localRepository"
* type="org.apache.maven.artifact.repository.ArtifactRepository"
* required="true"
* validator=""
* expression="#localRepository"
* description=""
*
* @prereq jar:jar
*
*/
public class JarInstallMojo
extends AbstractPlugin
@ -72,5 +66,18 @@ public class JarInstallMojo
project.getType() );
artifactInstaller.install( project.getBuild().getDirectory(), artifact, localRepository );
// ----------------------------------------------------------------------
// This is not the way to do this, but in order to get the integration
// tests working this is what I'm doing. jvz.
// ----------------------------------------------------------------------
Artifact pomArtifact = new DefaultArtifact( project.getGroupId(),
project.getArtifactId(),
project.getVersion(),
project.getType() );
artifactInstaller.install( project.getFile(), pomArtifact, localRepository );
}
}