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-465

-Dusername= switch ignored

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Incomplete
  • Affects Version/s: 2.0-beta-7
  • Fix Version/s: None
  • Component/s: prepare
  • Labels:
    None
  • Environment:
    Bazaar (bzr) 1.16.1
    Maven version: 2.0.9
    Java version: 1.5.0_17
    OS name: "linux" version: "2.6.26-2-686" arch: "i386" Family: "unix"
  • Testcase included:
    yes
  • Number of attachments :
    1

Description

I'm calling mvn release:prepare with the -Dusername=johanwalles switch as instructed on http://maven.apache.org/plugins/maven-release-plugin/usage.html. In spite of that, when contacting Sourceforge's bzr daemon, Maven tries to use my local user name ("johan").

The URL used by Maven is:
bzr+ssh://expectj.bzr.sourceforge.net/bzrroot/expectj/trunk/

The URL Maven should be using to work like the docs say is:
bzr+ssh://johanwalles@expectj.bzr.sourceforge.net/bzrroot/expectj/trunk/

To try this yourselves, do "bzr branch bzr://expectj.bzr.sourceforge.net/bzrroot/expectj/trunk/", then "mvn -Dusername=johanwalles release:prepare".

I'm attaching my pom.xml for reference as well.

Here's my full session, note that I'm not entering any password because I don't have one for that account:
"
johan@johansdator:~/src/expectj-bzr$ mvn -Dusername=johanwalles release:prepare
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'release'.
[INFO] ------------------------------------------------------------------------
[INFO] Building ExpectJ
[INFO] task-segment: [release:prepare] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [release:prepare]
[INFO] Verifying that there are no local modifications...
[INFO] EXECUTING: bzr status
[INFO] [release.properties:unknown]
[INFO] Checking dependencies and plugins for snapshots ...
What is the release version for "ExpectJ"? (net.sourceforge.expectj:expectj) 2.0.1: :
What is SCM release tag or label for "ExpectJ"? (net.sourceforge.expectj:expectj) expectj-2.0.1: :
What is the new development version for "ExpectJ"? (net.sourceforge.expectj:expectj) 2.0.2-SNAPSHOT: :
[INFO] Transforming 'ExpectJ'...
[INFO] Not generating release POMs
[INFO] Executing goals 'clean verify'...
[INFO] Executing: mvn clean verify --no-plugin-updates
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building ExpectJ
[INFO] task-segment: [clean, verify]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /home/johan/src/expectj-bzr/target
Downloading: http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.0.5/jna-3.0.5.pom
Downloading: http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.0.5/jna-3.0.5.pom
[INFO] [buildnumber:create

{execution: default}

]
[INFO] Checking for local modifications: skipped.
[INFO] Updating project files from SCM: skipped.
[WARNING] Cannot get the revision information from the scm repository, proceeding with revision of MOJO1300 :
Exception while executing SCM command.
[INFO] Storing buildNumber: MOJO1300 at timestamp: 1248891626907
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 12 source files to /home/johan/src/expectj-bzr/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Compiling 3 source files to /home/johan/src/expectj-bzr/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: /home/johan/src/expectj-bzr/target/surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running expectj.TestExpect
flaskagrisflaskanyckelgrisflaskagrisflaskanyckelgrisflaskahinkbilnyckelgris@SLTests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.314 sec

Results :

Tests run: 6, Failures: 0, Errors: 0, Skipped: 0

stork
[INFO] [jar:jar]
[INFO] Building jar: /home/johan/src/expectj-bzr/target/expectj-2.0.1-rMOJO1300.jar
[INFO] [gpg:sign

{execution: sign-artifacts}

]
GPG Passphrase: *********
*Reading passphrase from file descriptor 0

Du behöver en lösenfras för att låsa upp den hemliga
nyckeln för användaren: "Johan Walles <johan.walles@gmail.com>"
1024-bitars DSA-nyckel, id C37E2AE4, skapad 2004-02-09

Reading passphrase from file descriptor 0

Du behöver en lösenfras för att låsa upp den hemliga
nyckeln för användaren: "Johan Walles <johan.walles@gmail.com>"
1024-bitars DSA-nyckel, id C37E2AE4, skapad 2004-02-09

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 1 second
[INFO] Finished at: Wed Jul 29 20:21:21 CEST 2009
[INFO] Final Memory: 45M/64M
[INFO] ------------------------------------------------------------------------
[INFO] Checking in modified POMs...
[INFO] EXECUTING: bzr commit --message "[maven-release-plugin] prepare release expectj-2.0.1" /home/johan/src/expectj-bzr/pom.xml
[INFO] EXECUTING: bzr push bzr+ssh://expectj.bzr.sourceforge.net/bzrroot/expectj/trunk/
johan@expectj.bzr.sourceforge.net's password:
johan@expectj.bzr.sourceforge.net's password:
johan@expectj.bzr.sourceforge.net's password:
[ERROR] Connection closed: please check connectivity and permissions
[ERROR]
EXECUTION FAILED
Execution of cmd : push failed with exit code: 3.
Working directory was:
/home/johan/src/expectj-bzr
Your Bazaar installation seems to be invalid. Consult 'http://bazaar-vcs.org/Installation'
Python version: 2.5.4 (OK)
Bazaar version: NA (May be INVALID)
Paramiko installed: true (For remote access eg. sftp)
cCrypt installed: true (For remote access eg. sftp)
cElementTree installed: true (Not mandatory)

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to commit files
Provider message:

EXECUTION FAILED
Execution of cmd : push failed with exit code: 3.
Working directory was:
/home/johan/src/expectj-bzr
Your Bazaar installation seems to be invalid. Consult 'http://bazaar-vcs.org/Installation'
Python version: 2.5.4 (OK)
Bazaar version: NA (May be INVALID)
Paramiko installed: true (For remote access eg. sftp)
cCrypt installed: true (For remote access eg. sftp)
cElementTree installed: true (Not mandatory)

Command output:
bzr: ERROR: Connection closed: please check connectivity and permissions
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 17 seconds
[INFO] Finished at: Wed Jul 29 20:21:29 CEST 2009
[INFO] Final Memory: 17M/64M
[INFO] ------------------------------------------------------------------------
johan@johansdator:~/src/expectj-bzr$
"

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

Attachments

  1. XML File
    pom.xml
    29/Jul/09 1:22 PM
    8 kB
    Johan Walles

Issue Links

depends upon

Bug - A problem which impairs or prevents the functions of the product. SCM-489 the bazaar provider needs to support the following protocols: bzr, bzr+ssh, ssh

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Mark Struberg added a comment - 29/Jul/09 1:47 PM

hmm -Dusername=xxx -Dpassword=yyy works fine for CVS, SVN and git

Can you please post your scm section?

Do you have anything special in your settings.xml?

Show
Mark Struberg added a comment - 29/Jul/09 1:47 PM hmm -Dusername=xxx -Dpassword=yyy works fine for CVS, SVN and git Can you please post your scm section? Do you have anything special in your settings.xml?
Hide
Permalink
Johan Walles added a comment - 29/Jul/09 3:27 PM - edited

Here's my scm section:
"
<scm>
<developerConnection>scm:bazaar:bzr+ssh://expectj.bzr.sourceforge.net/bzrroot/expectj/trunk/</developerConnection>
<url>http://expectj.bzr.sourceforge.net/</url>
</scm>
"

My complete pom is attached to this bug.

My ~/.m2/settings.xml looks like this:
"
<servers>
<server>
<id>expectj</id>
<username>johanwalles,expectj</username>
</server>
</servers>
"

Can you do "bzr branch bzr://expectj.bzr.sourceforge.net/bzrroot/expectj/trunk/", then "mvn -Dusername=johanwalles release:prepare" to see if you can repro?

Show
Johan Walles added a comment - 29/Jul/09 3:27 PM - edited Here's my scm section: " <scm> <developerConnection>scm:bazaar:bzr+ssh://expectj.bzr.sourceforge.net/bzrroot/expectj/trunk/</developerConnection> <url> http://expectj.bzr.sourceforge.net/ </url> </scm> " My complete pom is attached to this bug. My ~/.m2/settings.xml looks like this: " <servers> <server> <id>expectj</id> <username>johanwalles,expectj</username> </server> </servers> " Can you do "bzr branch bzr://expectj.bzr.sourceforge.net/bzrroot/expectj/trunk/", then "mvn -Dusername=johanwalles release:prepare" to see if you can repro?
Hide
Permalink
Mark Struberg added a comment - 30/Jul/09 4:05 AM - edited

First of all, this project seems not to be a SNAPSHOT project but has <version>2.0.1</version>
So maven complains with "You don't have a SNAPSHOT project in the reactor projects list"

After moving the version to 2.0.2-SNAPSHOT (and disabling gpg signing) all went well.

I used the following commandline:

mvn -Dusername=johanwalles release:prepare -X 

and got the following output:

[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-release-plugin:2.0-beta-8:prepare' -->
[DEBUG]   (f) addSchema = true
[DEBUG]   (f) allowTimestampedSnapshots = false
[DEBUG]   (f) autoVersionSubmodules = false
[DEBUG]   (s) basedir = /home/msx/tmp/expectj/trunk
[DEBUG]   (f) commitByProject = false
[DEBUG]   (f) dryRun = false
[DEBUG]   (f) generateReleasePoms = false
[DEBUG]   (f) javaHome = /usr/java/jdk1.6.0_13/jre
[DEBUG]   (f) mavenExecutorId = invoker
[DEBUG]   (f) mavenHome = /opt/apache/maven
[DEBUG]   (f) preparationGoals = clean verify
[DEBUG]   (f) project = MavenProject: net.sourceforge.expectj:expectj:2.0.2-SNAPSHOT @ /home/msx/tmp/expectj/trunk/pom.xml
[DEBUG]   (f) reactorProjects = [MavenProject: net.sourceforge.expectj:expectj:2.0.2-SNAPSHOT @ /home/msx/tmp/expectj/trunk/pom.xml]
[DEBUG]   (f) resume = true
[DEBUG]   (f) scmCommentPrefix = [maven-release-plugin] 
[DEBUG]   (f) settings = org.apache.maven.settings.Settings@7d1a5fd0
[DEBUG]   (f) updateDependencies = true
[DEBUG]   (f) useEditMode = false
[DEBUG]   (f) username = johanwalles
[DEBUG] -- end configuration --
[INFO] [release:prepare {execution: default-cli}]
[INFO] Release preparation already completed. You can now continue with release:perform, or start again using the -Dresume=false flag

Please note that it doesn't actually perform a bazaar push, which confuses me a bit!
I'm using maven 2.2.0 and org.apache.maven.scm:maven-scm-provider-bazaar:jar:1.1

Show
Mark Struberg added a comment - 30/Jul/09 4:05 AM - edited First of all, this project seems not to be a SNAPSHOT project but has <version>2.0.1</version> So maven complains with "You don't have a SNAPSHOT project in the reactor projects list" After moving the version to 2.0.2-SNAPSHOT (and disabling gpg signing) all went well. I used the following commandline: mvn -Dusername=johanwalles release:prepare -X and got the following output: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-release-plugin:2.0-beta-8:prepare' --> [DEBUG] (f) addSchema = true [DEBUG] (f) allowTimestampedSnapshots = false [DEBUG] (f) autoVersionSubmodules = false [DEBUG] (s) basedir = /home/msx/tmp/expectj/trunk [DEBUG] (f) commitByProject = false [DEBUG] (f) dryRun = false [DEBUG] (f) generateReleasePoms = false [DEBUG] (f) javaHome = /usr/java/jdk1.6.0_13/jre [DEBUG] (f) mavenExecutorId = invoker [DEBUG] (f) mavenHome = /opt/apache/maven [DEBUG] (f) preparationGoals = clean verify [DEBUG] (f) project = MavenProject: net.sourceforge.expectj:expectj:2.0.2-SNAPSHOT @ /home/msx/tmp/expectj/trunk/pom.xml [DEBUG] (f) reactorProjects = [MavenProject: net.sourceforge.expectj:expectj:2.0.2-SNAPSHOT @ /home/msx/tmp/expectj/trunk/pom.xml] [DEBUG] (f) resume = true [DEBUG] (f) scmCommentPrefix = [maven-release-plugin] [DEBUG] (f) settings = org.apache.maven.settings.Settings@7d1a5fd0 [DEBUG] (f) updateDependencies = true [DEBUG] (f) useEditMode = false [DEBUG] (f) username = johanwalles [DEBUG] -- end configuration -- [INFO] [release:prepare {execution: default-cli}] [INFO] Release preparation already completed. You can now continue with release:perform, or start again using the -Dresume=false flag Please note that it doesn't actually perform a bazaar push, which confuses me a bit! I'm using maven 2.2.0 and org.apache.maven.scm:maven-scm-provider-bazaar:jar:1.1
Hide
Permalink
Mark Struberg added a comment - 30/Jul/09 6:59 AM

oki, got it working after deleting the release.properties

[INFO] EXECUTING: /bin/sh -c cd /home/msx/tmp/expectj/trunk && bzr commit --message '[maven-release-plugin] prepare release expectj-2.0.2' /home/msx/tmp/expectj/trunk/pom.xml
[INFO] EXECUTING: /bin/sh -c cd /home/msx/tmp/expectj/trunk && bzr push bzr+ssh://johanwalles@expectj.bzr.sourceforge.net/bzrroot/expectj/trunk/
johanwalles@expectj.bzr.sourceforge.net's password: 

The username being used looks ok, but bad news at last:

I've looked at the BazaarScmProvicer [1] and it seems that it currently doesn't support tagging!
So I fear that you won't succeed with using the release plugin for your project currently.

It should not be so much work to implement scm:tag, scm:branch (and the checkout of branches and tags!) for bazaar, but it has to be done yet.

[1] https://svn.apache.org/repos/asf/maven/scm/tags/maven-scm-1.2/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/BazaarScmProvider.java

Show
Mark Struberg added a comment - 30/Jul/09 6:59 AM oki, got it working after deleting the release.properties [INFO] EXECUTING: /bin/sh -c cd /home/msx/tmp/expectj/trunk && bzr commit --message '[maven-release-plugin] prepare release expectj-2.0.2' /home/msx/tmp/expectj/trunk/pom.xml [INFO] EXECUTING: /bin/sh -c cd /home/msx/tmp/expectj/trunk && bzr push bzr+ssh://johanwalles@expectj.bzr.sourceforge.net/bzrroot/expectj/trunk/ johanwalles@expectj.bzr.sourceforge.net's password: The username being used looks ok, but bad news at last: I've looked at the BazaarScmProvicer [1] and it seems that it currently doesn't support tagging! So I fear that you won't succeed with using the release plugin for your project currently. It should not be so much work to implement scm:tag, scm:branch (and the checkout of branches and tags!) for bazaar, but it has to be done yet. [1] https://svn.apache.org/repos/asf/maven/scm/tags/maven-scm-1.2/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/BazaarScmProvider.java
Hide
Permalink
Johan Walles added a comment - 30/Jul/09 8:22 AM

Mark, after my last comment I added a workaround for this issue by adding johanwalles@ to the bzr URL in the POM file. So to repro this you now need to:

bzr branch bzr://expectj.bzr.sourceforge.net/bzrroot/expectj/trunk/ -r70
cd trunk
mvn -Dusername=johanwalles release:prepare

Notice the -r70 at the end of the branching line.

Noted your comment about incomplete Maven support for tagging though, so I'll see how much further I can get here.

Show
Johan Walles added a comment - 30/Jul/09 8:22 AM Mark, after my last comment I added a workaround for this issue by adding johanwalles@ to the bzr URL in the POM file. So to repro this you now need to: bzr branch bzr://expectj.bzr.sourceforge.net/bzrroot/expectj/trunk/ -r70 cd trunk mvn -Dusername=johanwalles release:prepare Notice the -r70 at the end of the branching line. Noted your comment about incomplete Maven support for tagging though, so I'll see how much further I can get here.
Hide
Permalink
Olivier Lamy added a comment - 31/Jul/09 4:32 PM - edited

you have to create an issue for supporting tag in bazaar provider in SCM project.
And if possible provide a patch as personally I'm not using this scm.

Show
Olivier Lamy added a comment - 31/Jul/09 4:32 PM - edited you have to create an issue for supporting tag in bazaar provider in SCM project. And if possible provide a patch as personally I'm not using this scm.
Hide
Permalink
Mark Struberg added a comment - 14/Aug/09 4:07 PM

actually the maven-scm-provider-bazaar currently does not support the protocols bzr, bzr+ssh and ssh.
I'll create a maven-scm issue for that.

Show
Mark Struberg added a comment - 14/Aug/09 4:07 PM actually the maven-scm-provider-bazaar currently does not support the protocols bzr, bzr+ssh and ssh. I'll create a maven-scm issue for that.
Hide
Permalink
Johan Walles added a comment - 20/Aug/09 12:42 AM

I implemented tagging and sent in a patch at SCM-492.

Show
Johan Walles added a comment - 20/Aug/09 12:42 AM I implemented tagging and sent in a patch at SCM-492 .
Hide
Permalink
Robert Scholte added a comment - 19/Feb/12 8:56 AM

SCM-492 was already fixed for scm-1.3, the maven-release-plugin uses already 1.6, so can we close this issue?

Show
Robert Scholte added a comment - 19/Feb/12 8:56 AM SCM-492 was already fixed for scm-1.3, the maven-release-plugin uses already 1.6, so can we close this issue?
Hide
Permalink
Robert Scholte added a comment - 27/Feb/12 11:54 AM

No feedback from user, so closing this as incomplete

Show
Robert Scholte added a comment - 27/Feb/12 11:54 AM No feedback from user, so closing this as incomplete

People

  • Assignee:
    Robert Scholte
    Reporter:
    Johan Walles
Vote (0)
Watch (0)

Dates

  • Created:
    29/Jul/09 1:22 PM
    Updated:
    27/Feb/12 11:54 AM
    Resolved:
    27/Feb/12 11:54 AM
  • 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.