Jgitflow:release-start hangs and never proceeds

773 views
Skip to first unread message

perks57

unread,
Jan 23, 2017, 10:26:23 AM1/23/17
to Maven JGit Flow Plugin
I am running into an issue where jgitflow hangs on the release-start while looking for the release version. I have tried various versions i.e m3, m4 and m5 of jgitflow and the results are the same. I also played with various configurations of jgitflow and still, it hangs in the same place. I am using this for the first time and not sure where I am going wrong. I will appreciate if you can point me out in the right direction.

I am running this off the develop branch. I have also tried default configuration but still the same.


Following is my current configuration for jgitflow in my pom

<plugin>
<groupId>external.atlassian.jgitflow</groupId>
<artifactId>jgitflow-maven-plugin</artifactId>
<version>1.0-m4</version>
<configuration>
<noDeploy>true</noDeploy>
<allowSnapshots>true</allowSnapshots>
<pullDevelop>true</pullDevelop>
<pullMaster>true</pullMaster>
<pushFeatures>true</pushFeatures>
<pushHotfixes>true</pushHotfixes>
<pushReleases>true</pushReleases>
</configuration>
</plugin>


Following is the console snapshot for the process.

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building url-md5hash-generator 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- jgitflow-maven-plugin:1.0-m4:release-start (default-cli) @ url-md5hash-generator ---
[WARNING] ..oo00 ---- WARNING ---- 00oo..
[WARNING] core.autocrlf is set to true but is NOT supported by JGit or JGitFlow!
[WARNING] 00oo.. you have been warned 00oo..
[INFO] (develop) Checking for SNAPSHOT version in projects...
What is the release version for "md5hash-generator"? (md5hash-generator) [1.0]: 

Thanks,

Luke Jackson

unread,
Jan 23, 2017, 6:12:34 PM1/23/17
to perks57, Maven JGit Flow Plugin
Have you tried triggering a thread dump and seeing what the stack trace is for the main thread? 

That should give a clue as to why the build is hanging.

Luke
--
You received this message because you are subscribed to the Google Groups "Maven JGit Flow Plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-jgitflow-u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

perks57

unread,
Jan 24, 2017, 1:33:26 PM1/24/17
to Maven JGit Flow Plugin, per...@gmail.com
Hi Luke,

Following the stack trace of the main thread from TD

"main" #1 prio=5 os_prio=0 tid=0x00000000030d0800 nid=0xc38 runnable [0x000000000304c000]
   java.lang.Thread.State: RUNNABLE
at jline.WindowsTerminal.readByte(Native Method)
at jline.WindowsTerminal.readCharacter(WindowsTerminal.java:233)
at jline.WindowsTerminal.readVirtualKey(WindowsTerminal.java:326)
at jline.ConsoleReader.readVirtualKey(ConsoleReader.java:1606)
at jline.ConsoleReader.readBinding(ConsoleReader.java:764)
at jline.ConsoleReader.readLine(ConsoleReader.java:511)
at jline.ConsoleReader.readLine(ConsoleReader.java:457)
at jline.ConsoleReader.readLine(ConsoleReader.java:283)
at com.atlassian.maven.plugins.jgitflow.ConsoleInputHandler.readLine(ConsoleInputHandler.java:94)
at com.atlassian.maven.plugins.jgitflow.PrettyPrompter.prompt(PrettyPrompter.java:147)
at com.atlassian.maven.plugins.jgitflow.PrettyPrompter.promptNotBlank(PrettyPrompter.java:82)
at com.atlassian.maven.plugins.jgitflow.provider.DefaultVersionProvider.getNextVersion(DefaultVersionProvider.java:308)
at com.atlassian.maven.plugins.jgitflow.provider.DefaultVersionProvider.getNextVersions(DefaultVersionProvider.java:235)
at com.atlassian.maven.plugins.jgitflow.provider.DefaultVersionProvider.getNextReleaseVersions(DefaultVersionProvider.java:152)
at com.atlassian.maven.plugins.jgitflow.provider.DefaultVersionProvider.getNextVersionsForType(DefaultVersionProvider.java:130)
at com.atlassian.maven.plugins.jgitflow.provider.DefaultBranchLabelProvider.getNextVersionLabel(DefaultBranchLabelProvider.java:52)
at com.atlassian.maven.plugins.jgitflow.manager.AbstractProductionBranchManager.getStartLabelAndRunPreflight(AbstractProductionBranchManager.java:81)
at com.atlassian.maven.plugins.jgitflow.manager.DefaultFlowReleaseManager.start(DefaultFlowReleaseManager.java:45)
at com.atlassian.maven.plugins.jgitflow.mojo.ReleaseStartMojo.execute(ReleaseStartMojo.java:94)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

perks57

unread,
Jan 24, 2017, 3:10:11 PM1/24/17
to Maven JGit Flow Plugin, per...@gmail.com
I believe the issue appears to be with JLINE API. Here is the bug that i found https://github.com/jline/jline2/issues/185. This is not only with intellij but also running into an issue with jenkins while using this plugin. Current workaround is to use command prompt instead of intellij terminal or jenkins.

Luke Jackson

unread,
Jan 24, 2017, 7:09:30 PM1/24/17
to perks57, Maven JGit Flow Plugin
Have you tried using --batch-mode to suppress the prompts?

Luke
--

perks57

unread,
Jan 25, 2017, 9:28:31 AM1/25/17
to Maven JGit Flow Plugin, per...@gmail.com
Hi Luke,

I tried using --batch-mode and ran into following issue

[ERROR] Failed to execute goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m4.3:release-start (default-cli) on project url-md5hash-generator: Execution default-cli of goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m4.3:release-start failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m4.3:release-start (default-cli) on project url-md5hash-generator: Execution default-cli of goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m4.3:release-start failed.
	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:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
	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:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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-m4.3:release-start failed.
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	... 19 more
Caused by: java.lang.NullPointerException
	at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:481)
	at org.eclipse.jgit.transport.TransportHttp.openPush(TransportHttp.java:396)
	at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:154)
	at org.eclipse.jgit.transport.Transport.push(Transport.java:1173)
	at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:156)
	at com.atlassian.jgitflow.core.command.AbstractBranchCreatingCommand.doPushNewBranchIfNeeded(AbstractBranchCreatingCommand.java:77)
	at com.atlassian.jgitflow.core.command.ReleaseStartCommand.call(ReleaseStartCommand.java:84)
	at com.atlassian.maven.plugins.jgitflow.manager.DefaultFlowReleaseManager.start(DefaultFlowReleaseManager.java:51)
	at com.atlassian.maven.plugins.jgitflow.mojo.ReleaseStartMojo.execute(ReleaseStartMojo.java:94)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
	... 20 more

perks57

unread,
Jan 25, 2017, 10:54:08 AM1/25/17
to Maven JGit Flow Plugin, per...@gmail.com
I also checked the ssh access keys, branch permission etc and it still has the same issue.

Prerak

Dan Armbrust

unread,
Jan 25, 2017, 11:42:30 AM1/25/17
to perks57, Maven JGit Flow Plugin
Just guessing, but it would seem like it is having issues getting auth to access the repo - and your previous stacks showed that it was trying to prompt for a username or a password... now with that feature suppressed, it is failing in another way related to not having auth.

Perhaps look again at how you have the keys set up... look into the docs for https://eclipse.org/jgit/, rather than jgitflow, as you are failing in jgit code.

Dan

--
You received this message because you are subscribed to the Google Groups "Maven JGit Flow Plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-jgitflow-users+unsub...@googlegroups.com.

perks57

unread,
Jan 26, 2017, 10:08:42 AM1/26/17
to Maven JGit Flow Plugin, per...@gmail.com
RESOLVED!!!!

OK. I did some investigation on my end and took the following steps.

1. Added --batch-mode to suppress the prompt.
2. Created a jenkins user with ssh-key auth. (make sure that this key has no passphrase)
3. Added the public sshkey to Stash repo.

The root of the problem is that jgit-flow internally uses ssh to clone repos. Since this was not setup on my end it causes a lot of problems. But finally I got it working.


Reply all
Reply to author
Forward
0 new messages