You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by jv...@apache.org on 2004/08/15 18:19:39 UTC
cvs commit: maven-components/maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar JarInstallMojo.java
jvanzyl 2004/08/15 09:19:39
Modified: maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar
JarInstallMojo.java
Log:
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.
Revision Changes Path
1.12 +13 -6 maven-components/maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarInstallMojo.java
Index: JarInstallMojo.java
===================================================================
RCS file: /home/cvs/maven-components/maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarInstallMojo.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- JarInstallMojo.java 9 Aug 2004 19:10:10 -0000 1.11
+++ JarInstallMojo.java 15 Aug 2004 16:19:38 -0000 1.12
@@ -27,32 +27,26 @@
/**
* @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 @@
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 );
+
}
}