You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jd...@apache.org on 2005/09/12 22:08:10 UTC

svn commit: r280405 - in /maven/components/trunk: maven-core-it/ maven-core-it/it0066/ maven-plugins/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/ maven-plugins/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/

Author: jdcasey
Date: Mon Sep 12 13:08:01 2005
New Revision: 280405

URL: http://svn.apache.org/viewcvs?rev=280405&view=rev
Log:
Resolving MNG-851. Using MavenProject.getFile() rather than constructing new. Also fixed maven-deploy-plugin with similar bug.

Added:
    maven/components/trunk/maven-core-it/it0066/
    maven/components/trunk/maven-core-it/it0066/cli-options.txt   (with props)
    maven/components/trunk/maven-core-it/it0066/expected-results.txt   (with props)
    maven/components/trunk/maven-core-it/it0066/goals.txt   (with props)
    maven/components/trunk/maven-core-it/it0066/other-pom.xml   (with props)
Modified:
    maven/components/trunk/maven-core-it/README.txt
    maven/components/trunk/maven-core-it/integration-tests.txt
    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-core-it/README.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/README.txt?rev=280405&r1=280404&r2=280405&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/README.txt (original)
+++ maven/components/trunk/maven-core-it/README.txt Mon Sep 12 13:08:01 2005
@@ -185,6 +185,8 @@
 
 it0065: Test that the basedir of the parent is set correctly.
 
+it0066: Test that nonstandard POM files will be installed correctly.
+
 -------------------------------------------------------------------------------
 
 - generated sources

Modified: maven/components/trunk/maven-core-it/integration-tests.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/integration-tests.txt?rev=280405&r1=280404&r2=280405&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/integration-tests.txt (original)
+++ maven/components/trunk/maven-core-it/integration-tests.txt Mon Sep 12 13:08:01 2005
@@ -1,3 +1,4 @@
+it0066
 it0065
 it0064
 it0063

Added: maven/components/trunk/maven-core-it/it0066/cli-options.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0066/cli-options.txt?rev=280405&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0066/cli-options.txt (added)
+++ maven/components/trunk/maven-core-it/it0066/cli-options.txt Mon Sep 12 13:08:01 2005
@@ -0,0 +1 @@
+-f other-pom.xml

Propchange: maven/components/trunk/maven-core-it/it0066/cli-options.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it0066/cli-options.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-core-it/it0066/expected-results.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0066/expected-results.txt?rev=280405&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0066/expected-results.txt (added)
+++ maven/components/trunk/maven-core-it/it0066/expected-results.txt Mon Sep 12 13:08:01 2005
@@ -0,0 +1 @@
+

Propchange: maven/components/trunk/maven-core-it/it0066/expected-results.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it0066/expected-results.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-core-it/it0066/goals.txt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0066/goals.txt?rev=280405&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0066/goals.txt (added)
+++ maven/components/trunk/maven-core-it/it0066/goals.txt Mon Sep 12 13:08:01 2005
@@ -0,0 +1 @@
+install

Propchange: maven/components/trunk/maven-core-it/it0066/goals.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it0066/goals.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-core-it/it0066/other-pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0066/other-pom.xml?rev=280405&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0066/other-pom.xml (added)
+++ maven/components/trunk/maven-core-it/it0066/other-pom.xml Mon Sep 12 13:08:01 2005
@@ -0,0 +1,7 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.it</groupId>
+  <artifactId>maven-it0066</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+</project>

Propchange: maven/components/trunk/maven-core-it/it0066/other-pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it0066/other-pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

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=280405&r1=280404&r2=280405&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 Sep 12 13:08:01 2005
@@ -57,11 +57,11 @@
     private String packaging;
 
     /**
-     * @parameter expression="${project.file.parentFile}"
+     * @parameter expression="${project.file}"
      * @required
      * @readonly
      */
-    private File parentDir;
+    private File pomFile;
 
     /**
      * @parameter expression="${project.build.directory}"
@@ -120,10 +120,9 @@
 
         // Deploy the POM
         boolean isPomArtifact = "pom".equals( packaging );
-        File pom = new File( parentDir, "pom.xml" );
         if ( !isPomArtifact )
         {
-            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom );
+            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pomFile );
             artifact.addMetadata( metadata );
         }
 
@@ -136,7 +135,7 @@
         {
             if ( isPomArtifact )
             {
-                deployer.deploy( pom, artifact, deploymentRepository, localRepository );
+                deployer.deploy( pomFile, artifact, deploymentRepository, localRepository );
             }
             else
             {

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=280405&r1=280404&r2=280405&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 Sep 12 13:08:01 2005
@@ -45,11 +45,11 @@
     protected String packaging;
 
     /**
-     * @parameter expression="${basedir}"
+     * @parameter expression="${project.file}"
      * @required
      * @readonly
      */
-    private File basedir;
+    private File pomFile;
 
     /**
      * @parameter expression="${project.build.directory}"
@@ -89,10 +89,9 @@
         // TODO: push into transformation
         boolean isPomArtifact = "pom".equals( packaging );
 
-        File pom = new File( basedir, "pom.xml" );
         if ( !isPomArtifact )
         {
-            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom );
+            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pomFile );
             artifact.addMetadata( metadata );
         }
 
@@ -105,7 +104,7 @@
         {
             if ( isPomArtifact )
             {
-                installer.install( pom, artifact, localRepository );
+                installer.install( pomFile, artifact, localRepository );
             }
             else
             {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org