JGit Flow 1.0-m5.1 hotfix released

3,007 views
Skip to first unread message

Jonathan Doklovic

unread,
May 18, 2015, 3:31:08 PM5/18/15
to maven-jgit...@googlegroups.com
Hi,

This is to notify you that we've released 1.0-m5.1 as a hotfix.
This corrects an issue where pushes would error if the remote set *any* messages in the push result.

Please use this version instead of 1.0-m5

Thanks,

- Jonathan

Rakesh Maskara

unread,
May 21, 2015, 11:51:17 AM5/21/15
to maven-jgit...@googlegroups.com
Jonathan,

I am getting the following error with the new 1.0-m5.1 which I was not getting with the 1.0-m4 version:
[ERROR] Failed to execute goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m5.1:feature-start (default-cli) on project editlib: Execution default-cli of goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m5.1:feature-start failed: String index out of range: -6 -> [Help 1]
thanks,
Rakesh

Jonathan Doklovic

unread,
May 21, 2015, 2:05:35 PM5/21/15
to maven-jgit...@googlegroups.com, rkma...@gmail.com
Can you please rerun using -X and send the full stack trace?

Rakesh Maskara

unread,
May 21, 2015, 5:54:29 PM5/21/15
to maven-jgit...@googlegroups.com, rkma...@gmail.com
yes, here is the output:
[ERROR] Failed to execute goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m5:release-start (default-cli) on project baserepo: Execution default-cli of goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m5:release-start failed: String index out of range: -6 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m5:release-start (default-cli) on project baserepo: Execution default-cli of goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m5:release-start failed: String index out of range: -6
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m5:release-start failed: String index out of range: -6
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:144)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	... 19 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -6
	at java.lang.String.substring(String.java:1875)
	at com.atlassian.jgitflow.core.util.GitHelper.localBranchExists(GitHelper.java:193)
	at com.atlassian.jgitflow.core.JGitFlowInitCommand.call(JGitFlowInitCommand.java:159)
	at com.atlassian.maven.plugins.jgitflow.provider.DefaultJGitFlowProvider.gitFlow(DefaultJGitFlowProvider.java:32)
	at com.atlassian.maven.plugins.jgitflow.manager.AbstractFlowReleaseManager.runPreflight(AbstractFlowReleaseManager.java:67)
	at com.atlassian.maven.plugins.jgitflow.manager.AbstractProductionBranchManager.getStartLabelAndRunPreflight(AbstractProductionBranchManager.java:50)
	at com.atlassian.maven.plugins.jgitflow.manager.DefaultFlowReleaseManager.start(DefaultFlowReleaseManager.java:45)
	at com.atlassian.maven.plugins.jgitflow.mojo.ReleaseStartMojo.execute(ReleaseStartMojo.java:113)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
	... 20 more
[ERROR] 
[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/PluginExecutionException
Build step 'Invoke top-level Maven targets' marked build as failure

Jonathan Doklovic

unread,
Jun 8, 2015, 6:20:40 PM6/8/15
to maven-jgit...@googlegroups.com, rkma...@gmail.com
That's very strange. Basically, it's saying that the branch name returned by git.branchList() does not contain "refs/heads" which hsould be impossible sinc that method only lists branches that begin with "refs/heads" by default.

Can you run: git show-ref

in that same dir and post the output?

Hartmut Benz

unread,
Jun 24, 2015, 6:06:21 AM6/24/15
to maven-jgit...@googlegroups.com, rkma...@gmail.com
I am getting the same exception.
Here is a show-ref output:


jenkins@3e4b48cd52f5:~/workspace/simulator release$ git show-ref

286de9da72effe6baf81500db528712e39bfd5a2 refs/remotes/origin/develop

ca178d8400e36a6a771142a83b447185201bfdf7 refs/remotes/origin/master

eb5406979e1d702f114a4dbc04e30c3810404299 refs/remotes/origin/release/0.0.9

50e91a3eefece0075abfe51b4e8b11f524f1e0e1 refs/tags/tag/0.0.2

4ae98cc6cd27bdf6749b2d4928aba004bc647fdc refs/tags/tag/0.0.3

895d3dd5c1535b0cd61111237ad6d080ec99ad5a refs/tags/tag/0.0.4

76e003c0e013f131151fc2d51da690c92b972591 refs/tags/tag/0.0.6

fe995359450ec9bdea9289f9e26c3c38967fa7f8 refs/tags/tag/0.0.7

f87e2a09d71a7ee00ee3840e5f5efc7e308668f0 refs/tags/tag/0.0.8

jenkins@3e4b48cd52f5:~/workspace/simulator release$ 

Hartmut Benz

unread,
Jun 24, 2015, 7:33:31 AM6/24/15
to maven-jgit...@googlegroups.com, rkma...@gmail.com
Here is a link to a merge request claiming to solve this issue:
https://bitbucket.org/atlassian/jgit-flow/pull-request/56/jenkins-building-git-project-fails-release

jgitflow works fine with in an interactive environment in my workspace, just when used in Jenkins it breaks in the described way.

I would really appreciate a fix for this soon so that our CI server can do releases, again.

Javier Monterrubio

unread,
Jun 24, 2015, 8:10:57 AM6/24/15
to maven-jgit...@googlegroups.com, rkma...@gmail.com
Same exception here, even with hotfix-start.

David Chwalisz

unread,
Jun 28, 2015, 8:41:23 PM6/28/15
to maven-jgit...@googlegroups.com, rkma...@gmail.com
I am the author of the PR and have been using the PR specified in our Jenkins environment successfully for several weeks now. I released it locally using a custom version number into our local Nexus.

As mentioned by others, works great when you manually clone the repo, but fails when the Jenkins Git plugin gets the repo. Per the doc in the PR, the Git repo ends up in a different state than a manual clone, and this is what causes the error.

Daniel W

unread,
Jul 28, 2015, 3:45:31 PM7/28/15
to Maven JGit Flow Plugin, rkma...@gmail.com, david.c...@gmail.com
Hey, 
we just had the same issue. In bamboo I checked "Force clean builds" on the source code checkout..Currently this looks like to fix the issue for us.

seetaramayya vadali

unread,
Jul 29, 2015, 12:00:31 PM7/29/15
to Maven JGit Flow Plugin, rkma...@gmail.com, david.c...@gmail.com, danw...@googlemail.com
Hi,

    I am getting same error. Is it bug or am i doing somthing wrong? 

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -6
	at java.lang.String.substring(String.java:1875)
	at com.atlassian.jgitflow.core.util.GitHelper.localBranchExists(GitHelper.java:193)
	at com.atlassian.jgitflow.core.JGitFlowInitCommand.call(JGitFlowInitCommand.java:159)
	at com.atlassian.maven.plugins.jgitflow.provider.DefaultJGitFlowProvider.gitFlow(DefaultJGitFlowProvider.java:32)
	at com.atlassian.maven.plugins.jgitflow.manager.AbstractFlowReleaseManager.runPreflight(AbstractFlowReleaseManager.java:67)
	at com.atlassian.maven.plugins.jgitflow.manager.AbstractProductionBranchManager.getStartLabelAndRunPreflight(AbstractProductionBranchManager.java:50)
	at com.atlassian.maven.plugins.jgitflow.manager.DefaultFlowReleaseManager.start(DefaultFlowReleaseManager.java:45)
	at com.atlassian.maven.plugins.jgitflow.mojo.ReleaseStartMojo.execute(ReleaseStartMojo.java:113)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)

Regards,
Seeta 

Michael Kearney

unread,
Oct 7, 2015, 10:22:03 AM10/7/15
to Maven JGit Flow Plugin, rkma...@gmail.com, david.c...@gmail.com, danw...@googlemail.com
I'm using 1.0-m5.1 and an seeing the same problem.

ppa...@gmail.com

unread,
Oct 15, 2015, 12:16:52 PM10/15/15
to Maven JGit Flow Plugin, rkma...@gmail.com, david.c...@gmail.com, danw...@googlemail.com
i had the same problem - the cause was a detached branch.

HTH,
Peter

Jostein Gogstad

unread,
Nov 9, 2015, 7:45:10 AM11/9/15
to Maven JGit Flow Plugin, rkma...@gmail.com, david.c...@gmail.com, danw...@googlemail.com


On Wednesday, October 7, 2015 at 4:22:03 PM UTC+2, Michael Kearney wrote:
I'm using 1.0-m5.1 and an seeing the same problem.

On Wednesday, July 29, 2015 at 10:00:31 AM UTC-6, seetaramayya vadali wrote:
Hi,

    I am getting same error. Is it bug or am i doing somthing wrong? 
 
It's a bug and it's tracked in https://ecosystem.atlassian.net/browse/MJF-249. Workaround is available in the JIRA, and it seems like some PRs addressing the issue has been merged. 

-- 
Jostein
Reply all
Reply to author
Forward
0 new messages