jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven 2.x Release Plugin
  • Maven 2.x Release Plugin
  • MRELEASE-705

Project directory appended twice

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Incomplete
  • Affects Version/s: 2.2, 2.2.1
  • Fix Version/s: None
  • Component/s: perform
  • Labels:
    None
  • Environment:
    accurev scm provider
  • Number of attachments :
    1

Description

During perform, the fix for MRELEASE-457 changes the checkout directory by appending the checkout path, later the release manager appends it again in determineWorkingDirectory(). As a result maven cannot find the checked out project.
Please see attached log file with -X output, specifically line 1541 that shows the correct project path, however, when it comes to running the deploy command, it appends project path again as indicated by line 1553.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    output.txt
    23/Aug/11 1:44 PM
    108 kB
    Vadim Tsing

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Robert Scholte added a comment - 22/Feb/12 2:16 PM

[WARNING] Base directory is a file. Using base directory as POM location.
[DEBUG] Specified POM file is not named 'pom.xml'. Using the '-f' command-line option to accommodate non-standard filename...
[DEBUG] Executing: cmd.exe /X /C "C:\java\apache-maven-2.2.1\bin\mvn.bat -X -D maven.repo.local=C:\Users\vadim\.m2\repository -f test-project-1 -D performRelease=true -P artifactory deploy"

These lines interest me. Do you have any clue why base directory is a file on not a directory? This is probably the root of the problem.
Could you attach your environment? (result of mvn -v

Show
Robert Scholte added a comment - 22/Feb/12 2:16 PM [WARNING] Base directory is a file. Using base directory as POM location. [DEBUG] Specified POM file is not named 'pom.xml'. Using the '-f' command-line option to accommodate non-standard filename... [DEBUG] Executing: cmd.exe /X /C "C:\java\apache-maven-2.2.1\bin\mvn.bat -X -D maven.repo.local=C:\Users\vadim\.m2\repository -f test-project-1 -D performRelease=true -P artifactory deploy" These lines interest me. Do you have any clue why base directory is a file on not a directory? This is probably the root of the problem. Could you attach your environment? (result of mvn -v
Hide
Permalink
Vadim Tsing added a comment - 22/Feb/12 2:32 PM
Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
Java version: 1.6.0_29
Java home: C:\Java\jdk1.6.0_29\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7" version: "6.1" arch: "x86" Family: "windows"
Show
Vadim Tsing added a comment - 22/Feb/12 2:32 PM Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400) Java version: 1.6.0_29 Java home: C:\Java\jdk1.6.0_29\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7" version: "6.1" arch: "x86" Family: "windows"
Hide
Permalink
Andrey Taranov added a comment - 11/Apr/12 2:06 PM

I'm having exact same problem described by Vadim. We use CVS so the fixes in MRELEASE-457 are irrelevant.

Have configured the parent POM to use maven-release-plugin:2.0 and the problem was solved.

Show
Andrey Taranov added a comment - 11/Apr/12 2:06 PM I'm having exact same problem described by Vadim. We use CVS so the fixes in MRELEASE-457 are irrelevant. Have configured the parent POM to use maven-release-plugin:2.0 and the problem was solved.
Hide
Permalink
Robert Scholte added a comment - 12/Apr/12 2:19 PM

Based on only the output above it is not possible to reproduce this issue. According to the logging the base directory is called test-project-1 (I think), but this seems to be a file and not a directory. I still think we have to find the real cause around here.
Andrey, it would be nice if you could figure out with which version this bug was introduced (the gap between 2.0 and 2.2.2, if you have tried this version, is huge).
Also: Is this also an issue for Maven3?

Show
Robert Scholte added a comment - 12/Apr/12 2:19 PM Based on only the output above it is not possible to reproduce this issue. According to the logging the base directory is called test-project-1 (I think), but this seems to be a file and not a directory. I still think we have to find the real cause around here. Andrey, it would be nice if you could figure out with which version this bug was introduced (the gap between 2.0 and 2.2.2, if you have tried this version, is huge). Also: Is this also an issue for Maven3?
Hide
Permalink
Andrey Taranov added a comment - 13/Apr/12 2:42 AM

I'm currently using Maven 3.0.3, so I assume the problem is entirely with maven-release-plugin.

I will try to reproduce with different versions beetween 2.0 and 2.2.2 and post the logs here. I will also upload a minimal test project I use.

Show
Andrey Taranov added a comment - 13/Apr/12 2:42 AM I'm currently using Maven 3.0.3, so I assume the problem is entirely with maven-release-plugin. I will try to reproduce with different versions beetween 2.0 and 2.2.2 and post the logs here. I will also upload a minimal test project I use.
Hide
Permalink
Andrey Taranov added a comment - 05/May/12 2:09 PM

So I'm sequentially trying all versions:

  • maven-release-plugin:2.0 works OK
  • maven-release-plugin:2.1 works OK
  • maven-release-plugin:2.2 doesn't work
Show
Andrey Taranov added a comment - 05/May/12 2:09 PM So I'm sequentially trying all versions: maven-release-plugin:2.0 works OK maven-release-plugin:2.1 works OK maven-release-plugin:2.2 doesn't work
Hide
Permalink
Andrey Taranov added a comment - 05/May/12 2:11 PM

Here is a log fragment from version 2.1 release goal:

C:\dev\spikes-local\mvnrelease-flat\parent>mvn release:perform -Dmaven.scm.provider.cvs.implementation=cvs_native -DcommitByProject=true
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] parent
[INFO] first-jar
[INFO] second-jar
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building parent 1.10-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.1:perform (default-cli) @ parent ---
[INFO] Checking out the project to perform the release ...
[INFO] Executing: cmd.exe /X /C "cvs -z3 -f -d :local:d:\cvsroot -q checkout -r parent-1_9 -d checkout mvnrelease-flat"
[INFO] Working directory: C:\dev\spikes-local\mvnrelease-flat\parent\target
[INFO] Executing goals 'deploy'...
Show
Andrey Taranov added a comment - 05/May/12 2:11 PM Here is a log fragment from version 2.1 release goal: C:\dev\spikes-local\mvnrelease-flat\parent>mvn release:perform -Dmaven.scm.provider.cvs.implementation=cvs_native -DcommitByProject=true [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] parent [INFO] first-jar [INFO] second-jar [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building parent 1.10-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-release-plugin:2.1:perform (default-cli) @ parent --- [INFO] Checking out the project to perform the release ... [INFO] Executing: cmd.exe /X /C "cvs -z3 -f -d :local:d:\cvsroot -q checkout -r parent-1_9 -d checkout mvnrelease-flat" [INFO] Working directory: C:\dev\spikes-local\mvnrelease-flat\parent\target [INFO] Executing goals 'deploy'...
Hide
Permalink
Andrey Taranov added a comment - 05/May/12 2:17 PM

Here is the log for version 2.2 release goal.

Notice the second warning:

Base directory is a file. Using base directory as POM location.

This was not present in version 2.1.

Also notice the error message:

Working directory "C:\dev\spikes-local\mvnrelease-flat\parent\target\checkout\parent\parent" does not exist!

The last directory is duplicated!

C:\dev\spikes-local\mvnrelease-flat\parent>mvn release:perform -Dmaven.scm.provider.cvs.implementation=cvs_native -DcommitByProject=true
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] parent
[INFO] first-jar
[INFO] second-jar
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building parent 1.11-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.2:perform (default-cli) @ parent ---
[INFO] Checking out the project to perform the release ...
[INFO] Executing: cmd.exe /X /C "cvs -z3 -f -d :local:d:\cvsroot -q checkout -r parent-1_10-SNAPSHOT -d checkout mvnrelease-flat"
[INFO] Working directory: C:\dev\spikes-local\mvnrelease-flat\parent\target
[INFO] Invoking perform goals in directory C:\dev\spikes-local\mvnrelease-flat\parent\target\checkout\parent
[INFO] Executing goals 'deploy'...
[WARNING] Base directory is a file. Using base directory as POM location.
[WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] parent ............................................ FAILURE [2.300s]
[INFO] first-jar ......................................... SKIPPED
[INFO] second-jar ........................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.572s
[INFO] Finished at: Sat May 05 22:59:16 GMT+04:00 2012
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2:perform (default-cli) on project parent: Error executing Maven. Working directory "C:\dev\spikes-local\mvnrelease-flat\parent\target\checkout\parent\parent" does not exist! -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Show
Andrey Taranov added a comment - 05/May/12 2:17 PM Here is the log for version 2.2 release goal. Notice the second warning: Base directory is a file. Using base directory as POM location. This was not present in version 2.1. Also notice the error message: Working directory "C:\dev\spikes-local\mvnrelease-flat\parent\target\checkout\parent\parent" does not exist! The last directory is duplicated! C:\dev\spikes-local\mvnrelease-flat\parent>mvn release:perform -Dmaven.scm.provider.cvs.implementation=cvs_native -DcommitByProject=true [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] parent [INFO] first-jar [INFO] second-jar [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building parent 1.11-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-release-plugin:2.2:perform (default-cli) @ parent --- [INFO] Checking out the project to perform the release ... [INFO] Executing: cmd.exe /X /C "cvs -z3 -f -d :local:d:\cvsroot -q checkout -r parent-1_10-SNAPSHOT -d checkout mvnrelease-flat" [INFO] Working directory: C:\dev\spikes-local\mvnrelease-flat\parent\target [INFO] Invoking perform goals in directory C:\dev\spikes-local\mvnrelease-flat\parent\target\checkout\parent [INFO] Executing goals 'deploy'... [WARNING] Base directory is a file. Using base directory as POM location. [WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance. [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] parent ............................................ FAILURE [2.300s] [INFO] first-jar ......................................... SKIPPED [INFO] second-jar ........................................ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.572s [INFO] Finished at: Sat May 05 22:59:16 GMT+04:00 2012 [INFO] Final Memory: 5M/15M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2:perform (default-cli) on project parent: Error executing Maven. Working directory "C:\dev\spikes-local\mvnrelease-flat\parent\target\checkout\parent\parent" does not exist! -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Hide
Permalink
Mark Struberg added a comment - 06/May/12 6:33 AM

This could be a duplicate of MRELEASE-727 , wdyt?

Show
Mark Struberg added a comment - 06/May/12 6:33 AM This could be a duplicate of MRELEASE-727 , wdyt?
Hide
Permalink
Robert Scholte added a comment - 08/Dec/12 1:33 PM

I see no reply on Marks question, so I'll close this as incomplete, hoping it's indeed a duplicate.

Show
Robert Scholte added a comment - 08/Dec/12 1:33 PM I see no reply on Marks question, so I'll close this as incomplete, hoping it's indeed a duplicate.

People

  • Assignee:
    Unassigned
    Reporter:
    Vadim Tsing
Vote (1)
Watch (3)

Dates

  • Created:
    23/Aug/11 1:44 PM
    Updated:
    08/Dec/12 1:33 PM
    Resolved:
    08/Dec/12 1:33 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.