Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.3
    • Component/s: prepare
    • Labels:
      None
    • Environment:
      Mac OS X
    • Number of attachments :
      0

      Description

      I'm trying to make a release where the pom.xml is named my-pom.xml instead of pom.xml and I suspect it is a bug. Here is my configuration and the commands I'm executing and the debug information:

      pom.xml:

      <plugin>
      	<artifactId>maven-release-plugin</artifactId>
      	<version>2.1</version>
      	<configuration>
      		<pomFileName>my-pom.xml</pomFileName>
      		<arguments>-f my-pom.xml</arguments>
      	</configuration>
      </plugin>
      

      mvn -X -f my-pom.xml release:prepare

      ...
      [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-release-plugin:2.1:prepare' -->
      [DEBUG]   (f) addSchema = true
      [DEBUG]   (f) allowReleasePluginSnapshot = false
      [DEBUG]   (f) allowTimestampedSnapshots = false
      [DEBUG]   (f) arguments = -f my-pom.xml
      [DEBUG]   (f) autoVersionSubmodules = false
      [DEBUG]   (s) basedir = /Users/toomasr/projects/myproject
      [DEBUG]   (f) commitByProject = false
      [DEBUG]   (f) dryRun = false
      [DEBUG]   (f) generateReleasePoms = false
      [DEBUG]   (f) javaHome = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
      [DEBUG]   (f) localCheckout = false
      [DEBUG]   (f) mavenExecutorId = invoker
      [DEBUG]   (f) mavenHome = /usr/share/maven
      [DEBUG]   (f) pomFileName = my-pom.xml
      [DEBUG]   (f) preparationGoals = clean verify
      [DEBUG]   (f) project = MavenProject: com.zeroturnaround:lr-agent:1.0-M5 @ /Users/toomasr/projects/myproject/my-pom.xml
      [DEBUG]   (f) pushChanges = true
      [DEBUG]   (f) reactorProjects = [MavenProject: com.zeroturnaround:lr-agent:1.0-M5 @ /Users/toomasr/projects/myproject/my-pom.xml]
      [DEBUG]   (f) remoteTagging = true
      [DEBUG]   (f) resume = true
      [DEBUG]   (f) scmCommentPrefix = [maven-release-plugin]
      [DEBUG]   (f) session = org.apache.maven.execution.MavenSession@7c4e7958
      [DEBUG]   (f) settings = org.apache.maven.settings.Settings@4d480773
      [DEBUG]   (f) suppressCommitBeforeTag = false
      [DEBUG]   (f) updateDependencies = true
      [DEBUG]   (f) updateWorkingCopyVersions = true
      [DEBUG]   (f) useEditMode = false
      [DEBUG] -- end configuration --
      [INFO] [release:prepare {execution: default-cli}]
      [INFO] Resuming release from phase 'run-preparation-goals'
      [INFO] Executing goals 'clean verify'...
      [DEBUG] Using ${maven.home} of: '/usr/share/maven'.
      [DEBUG] Executing: /bin/sh -c cd /Users/toomasr/projects/myproject && /usr/share/java/maven-2.2.1/bin/mvn -X -D maven.repo.local=/Users/toomasr/.m2/repository -P default clean verify
      ...
      

      This results in:

      toomasr@cigarillo:~/myproject$ mvn -f pom-lr.xml release:prepare
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building MyProject
      [INFO]    task-segment: [release:prepare] (aggregator-style)
      [INFO] ------------------------------------------------------------------------
      [INFO] [release:prepare {execution: default-cli}]
      [INFO] Resuming release from phase 'run-preparation-goals'
      [INFO] Executing goals 'clean verify'...
      [WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
      [INFO] [INFO] Scanning for projects...
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Building Maven Default Project
      [INFO] [INFO]    task-segment: [clean, verify]
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [ERROR] BUILD ERROR
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one.
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] For more information, run Maven with the -e switch
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Total time: < 1 second
      [INFO] [INFO] Finished at: Thu Nov 25 16:15:55 EET 2010
      [INFO] [INFO] Final Memory: 3M/81M
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Maven execution failed, exit code: '1'
      
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 3 seconds
      [INFO] Finished at: Thu Nov 25 16:15:55 EET 2010
      [INFO] Final Memory: 19M/81M
      [INFO] ------------------------------------------------------------------------
      ------
      

      So the debug shows clearly that the configuration from my-pom is picked up (pomFileName and arguments). Also from the line:
      [DEBUG] Executing: /bin/sh -c cd /Users/toomasr/projects/myproject && /usr/share/java/maven-2.2.1/bin/mvn -X -D maven.repo.local=/Users/toomasr/.m2/repository -P default clean verify

      we see that maven does not care much about my options and the error says that there is no pom.xml, which is true but it should be using my-pom.xml instead.

        Issue Links

          Activity

          Hide
          Robert Scholte added a comment -

          Fixed in rev. 1243109

          Show
          Robert Scholte added a comment - Fixed in rev. 1243109

            People

            • Assignee:
              Robert Scholte
              Reporter:
              Toomas Römer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: