Maven Release Plugin throws Authentication Required error

1,305 views
Skip to first unread message

D Vijay

unread,
Mar 3, 2014, 6:06:48 AM3/3/14
to jenkins...@googlegroups.com

Dear All,


I need help in configuring the Maven Release plugin. I am trying to configure the plugin in Jenkins job. I am getting authentication exception. For invoking maven release plugin do we need to have svn client from where we are invoking the release? PFA the errors & the configuration that I used for this. The requirement is as follows:

My requirement is to configure maven release plugin as follows:

1. My current version is at 1.0.0-SNAPSHOT and once testing is done and ready for movement to production the maven release plugin will be invoked from Jenkins job to move the code from branch to trunk.
2. The configuration has to check out the source from branch, update all the POMs to version 1.0.0, tag the source code and check in the code at trunk location. The tags folder will contain the tagged version at 1.0.0 (as best practice we need to change the version from 1.0.0-SNAPSHOT to 1.0.0 once the product is ready for production, right? or while moving to UAT itself it should be done?).
3. Also, the next snapshot version will be updated to 1.0.1-SNAPSHOT(which is configurable in release plugin) and checked in at branch level for the next development.

I am able to configure this, but somehow it is not working. I am getting authentication exception.
svn: Authentication required for '<https://server-mydomain.com:443>'.


Thank you,

Vijay.

pom and log files.zip

Baptiste Mathus

unread,
Mar 3, 2014, 10:58:06 AM3/3/14
to jenkins...@googlegroups.com

Hi,
Imo wrong mailing list. This is a pure maven question. Better ask it on maven users.
Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

D Vijay

unread,
Mar 4, 2014, 3:35:46 AM3/4/14
to jenkins...@googlegroups.com
Hi,

The issue is with configuring the M2Release plugin in Jenkins. I wanted some help in configuring this plugin in Jenkins like the steps that we need to follow.

Vijay


--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/wA80C4CgMtc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.

James Nord (jnord)

unread,
Mar 10, 2014, 7:08:00 AM3/10/14
to jenkins...@googlegroups.com

Hi Vijay,

 

Try setting the username and password in the release options – or make sure you run subversion client on your slave and get it to store the subversion credentials in its cache.

 

/James

D Vijay

unread,
Mar 10, 2014, 7:53:17 AM3/10/14
to jenkins...@googlegroups.com
Hi James,

I have tried both the options and it did not work. I am trying to do maven release from the command prompt instead of performing a release from Jenkins and here I am getting a different error as below. Also, we are using https for communicating with SVN. The http port is blocked and we have to use https  in our configuration. In this case, how can we import/use the client certificate in Maven for doing the release. Any idea that you can throw for me?

[INFO] --- maven-release-plugin:2.4.2:prepare (default-cli) @ SimpleWeb ---
[INFO] Change the default 'svn' provider implementation to 'javasvn'.
[INFO] Verifying that there are no local modifications...
[INFO]   ignoring changes on: **\release.properties, **\pom.xml.next, **\pom.xml
.releaseBackup, **\pom.xml.backup, **\pom.xml.branch, **\pom.xml.tag
[INFO] SVN status directory: D:\Vijay\New_Framework\trunk\SimpleWeb
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.298s
[INFO] Finished at: Mon Mar 10 17:18:18 IST 2014
[INFO] Final Memory: 10M/26M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4
.2:prepare (default-cli) on project SimpleWeb: Unable to check for local modific
ations
[ERROR] Provider message:
[ERROR] SVN status failed.
[ERROR] Command output:
[ERROR] svn: 'D:\Vijay\New_Framework\trunk\SimpleWeb' is not a working copy

Thank You,
Vijay


For more options, visit https://groups.google.com/d/optout.

Baptiste Mathus

unread,
Mar 10, 2014, 8:00:52 AM3/10/14
to jenkins...@googlegroups.com
That's why I said it seems like a pure Maven issue.
What do you have in your <scm> tag? 

What also do you have under the <configuration> tag of your maven-release-plugin effective pom?

Some small guesses:
Which subversion version are you using? Maybe the version is too high compared to the javasvn provider you seem to be using (I think it's not the default one, but it might have changed?).

My 2 cents


For more options, visit https://groups.google.com/d/optout.



--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

D Vijay

unread,
Mar 10, 2014, 8:07:36 AM3/10/14
to jenkins...@googlegroups.com
Hi,

Below is my configuration in SCM tag:

<scm>
        <connection>scm:svn:https://ourdomain/svn/New_FW/trunk</connection>
        <developerConnection>scm:svn:https://ourdomain/svn/New_FW/trunk</developerConnection>
        <url>https://ourdomain/svn/New_FW/trunk</url>
    </scm>

SVN version details:
TortoiseSVN 1.8.2, Build 24708 - 64 Bit , 2013/08/27 19:20:39
Subversion 1.8.3, -release
apr 1.4.8
apr-util 1.5.2
serf 1.3.1
OpenSSL 1.0.1e 11 Feb 2013
zlib 1.2.8

My maven release plugin configuration:

<plugin>
                          <groupId>org.apache.maven.plugins</groupId>
                          <artifactId>maven-scm-plugin</artifactId>
                          <version>1.3</version>
                          <configuration>
                            <providerImplementations>
                              <svn>javasvn</svn>
                            </providerImplementations>
                            <username>${scm.username}</username>                           
                            <password>${scm.password}</password>
                            <connectionType>connection</connectionType>
                          </configuration>
                          <dependencies>
                            <dependency>
                              <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
                              <artifactId>maven-scm-provider-svnjava</artifactId>
                              <version>1.14</version>
                            </dependency>
                          </dependencies>
                    </plugin>           
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.4.2</version>
                        <dependencies>
                            <dependency>   
                            <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
                            <artifactId>maven-scm-provider-svnjava</artifactId>
                            <version>1.6</version>
                            </dependency>
                        </dependencies>
                        <configuration>
                            <providerImplementations>
                                <svn>javasvn</svn>
                            </providerImplementations>
                            <tagBase>https://ourdomain/svn/New_FW/tags</tagBase>
                            <mavenExecutorId>forked-path</mavenExecutorId>
                        </configuration>
                    </plugin>

The scm.username and scm.password are in Maven settings.xml file.

Thank You,
Vijay

Baptiste Mathus

unread,
Mar 10, 2014, 8:31:21 AM3/10/14
to jenkins...@googlegroups.com
Isn't weird you're using two different version (1.6 & 1.14) for maven-scm-provider-svnjava under maven-scm-plugin and maven-release-plugin?
Also, both versions are *very* old: even the 1.14 is from 2011, 1.6 is from 2009...

I would start by aligning my versions using a property and try to upgrade to a more recent version (latest possibly, but you may be stuck to using 1.6-?).

Also maybe have a look at this issue: https://code.google.com/a/apache-extras.org/p/maven-scm-provider-svnjava/issues/detail?id=10 which reminds me a bit of yours.

Cheers


Mangez un castor ! nbsp;!

D Vijay

unread,
Mar 10, 2014, 9:04:07 AM3/10/14
to jenkins...@googlegroups.com
Hi,

Thanks a lot. I have changed the version to 2.1.0. Now the message "is not a working copy" is gone. Now, I am getting authentication exception as below. Also, if you see my settings.xml configuration as below, I am giving the server name correctly.

<server>
                  <id>https://ourdomain</id>
                  <username>my username</username>
                  <password>my password</password>
    </server>


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4
.2:prepare (default-cli) on project SimpleWeb: Unable to check for local modific
ations
[ERROR] Provider message:
[ERROR] SVN status failed.
[ERROR] Command output:
[ERROR] svn: E170001: Authentication required for '<https://ourdomain:443>'

If you notice hear, in the scm configuration there is no port, but in the above error message port number 443 is shown. Where I am missing the configuration in this case?

Thank You,
Vijay

D Vijay

unread,
Mar 11, 2014, 6:53:43 AM3/11/14
to jenkins...@googlegroups.com
HI,

I am able to configure now and the release is working perfectly. I have to pass additional parameters from command line:  -Dsvnkit.http.methods=Basic,Digest,Negotiate,NTLM which resolved the authentication issue.

Thank You,
Vijay

Baptiste Mathus

unread,
Mar 11, 2014, 10:49:41 AM3/11/14
to jenkins...@googlegroups.com
Congrats!

Cheers

D Vijay

unread,
Mar 13, 2014, 5:40:06 AM3/13/14
to jenkins...@googlegroups.com

Hi,

Please help me understand on the below

  1. What is the release process that is practiced in general(standard practice)?
  2. Can we do a release from branch?
  3. How can we merge the code from branch to trunk, if we have to do a release only from branch(is there any plugin for this)?

Vijay

Reply all
Reply to author
Forward
0 new messages