[GRADLE-1729] Gradle blocks when run for for non-existing task Created: 06/Aug/11  Updated: 04/Jan/13  Resolved: 08/Aug/11

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-4
Fix Version/s: None

Type: Bug
Reporter: Evgeny Goldin Assignee: Unassigned
Resolution: Duplicate Votes: 0


 Description   

When I run "gradle aaaaaa" for non-existing task "aaaaaa" expecting Gradle to fail - it gets to "Loading.." phase and stays there.

#[23:28:08][~/Projects/teamcity-plugins]$ gr -version

------------------------------------------------------------
Gradle 1.0-milestone-4
------------------------------------------------------------

Gradle build time: Thursday, July 28, 2011 11:38:22 AM IDT
Groovy: 1.7.10
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.6.0_26 (Apple Inc. 20.1-b02-383)
OS: Mac OS X 10.7 x86_64

#[23:28:12][~/Projects/teamcity-plugins]$ gr -i aaaaaaaaa
Starting Build
Settings evaluated using settings file '/Users/evgenyg/Projects/teamcity-plugins/settings.gradle'.
Projects loaded. Root project using build file '/Users/evgenyg/Projects/teamcity-plugins/build.gradle'.
Included projects: [root project 'teamcity-plugins', project ':messenger-plugin']
Evaluating root project 'teamcity-plugins' using build file '/Users/evgenyg/Projects/teamcity-plugins/build.gradle'.
:: loading settings :: url = jar:file:/Users/evgenyg/app/java/gradle/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: #teamcity-plugins;unspecified
	confs: [classpath]
> Loading


 Comments   
Comment by Evgeny Goldin [ 07/Aug/11 ]

I think it's not related to non-existing task, I now experience the same behavior when running "clean" (cleaned up ".gradle" folder):

#[23:36:55][~/Projects/teamcity-plugins]$ gr -i clean
Starting Build
Settings evaluated using settings file '/Users/evgenyg/Projects/teamcity-plugins/settings.gradle'.
Projects loaded. Root project using build file '/Users/evgenyg/Projects/teamcity-plugins/build.gradle'.
Included projects: [root project 'teamcity-plugins', project ':messenger-plugin']
Evaluating root project 'teamcity-plugins' using build file '/Users/evgenyg/Projects/teamcity-plugins/build.gradle'.
Compiling build file '/Users/evgenyg/Projects/teamcity-plugins/build.gradle' using BuildScriptClasspathScriptTransformer.
:: loading settings :: url = jar:file:/Users/evgenyg/app/java/gradle/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: #teamcity-plugins;unspecified
	confs: [classpath]
> Loading

While I understand the very long pause is related to artifacts resolution, it really looks like Gradle is stuck on something. Some kind of progress indication could probably help here.

Comment by Evgeny Goldin [ 07/Aug/11 ]

Hmm, most probably related to
http://gradle.1045684.n5.nabble.com/problems-with-resolving-dependencies-after-upgrade-to-1-0-M4-td4643418.html

I now had:

#[23:36:55][~/Projects/teamcity-plugins]$ gr -i clean
Starting Build
Settings evaluated using settings file '/Users/evgenyg/Projects/teamcity-plugins/settings.gradle'.
Projects loaded. Root project using build file '/Users/evgenyg/Projects/teamcity-plugins/build.gradle'.
Included projects: [root project 'teamcity-plugins', project ':messenger-plugin']
Evaluating root project 'teamcity-plugins' using build file '/Users/evgenyg/Projects/teamcity-plugins/build.gradle'.
Compiling build file '/Users/evgenyg/Projects/teamcity-plugins/build.gradle' using BuildScriptClasspathScriptTransformer.
:: loading settings :: url = jar:file:/Users/evgenyg/app/java/gradle/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: #teamcity-plugins;unspecified
	confs: [classpath]
downloading http://evgeny-goldin.org/artifactory/repo/org/codehaus/groovy/groovy-all/1.8.0/groovy-all-1.8.0.pom ...
Download http://evgeny-goldin.org/artifactory/repo/org/codehaus/groovy/groovy-all/1.8.0/groovy-all-1.8.0.pom
	found org.codehaus.groovy#groovy-all;1.8.0 in http://evgeny-goldin.org/artifactory/repo/
downloading http://evgeny-goldin.org/artifactory/repo/junit/junit/4.8.2/junit-4.8.2.pom ...
	found junit#junit;4.8.2 in http://evgeny-goldin.org/artifactory/repo/
downloading http://evgeny-goldin.org/artifactory/repo/org/apache/ant/ant/1.8.2/ant-1.8.2.pom ...
Download http://evgeny-goldin.org/artifactory/repo/org/apache/ant/ant/1.8.2/ant-1.8.2.pom
downloading http://evgeny-goldin.org/artifactory/repo/org/apache/ant/ant-parent/1.8.2/ant-parent-1.8.2.pom ...
Download http://evgeny-goldin.org/artifactory/repo/org/apache/ant/ant-parent/1.8.2/ant-parent-1.8.2.pom
	found org.apache.ant#ant;1.8.2 in http://evgeny-goldin.org/artifactory/repo/
downloading http://evgeny-goldin.org/artifactory/repo/org/apache/ant/ant-launcher/1.8.2/ant-launcher-1.8.2.pom ...
Download http://evgeny-goldin.org/artifactory/repo/org/apache/ant/ant-launcher/1.8.2/ant-launcher-1.8.2.pom
	found org.apache.ant#ant-launcher;1.8.2 in http://evgeny-goldin.org/artifactory/repo/
downloading https://github.com/valkolovos/gradle_cobertura/raw/master/ivy/gradle_cobertura/gradle_cobertura/1.0-rc4/ivy.xml ...
Download https://github.com/valkolovos/gradle_cobertura/raw/master/ivy/gradle_cobertura/gradle_cobertura/1.0-rc4/ivy.xml
	found gradle_cobertura#gradle_cobertura;1.0-rc4 in cobertura
downloading http://evgeny-goldin.org/artifactory/repo/net/sourceforge/cobertura/cobertura/1.9.4.1/cobertura-1.9.4.1.pom ...
Download http://evgeny-goldin.org/artifactory/repo/net/sourceforge/cobertura/cobertura/1.9.4.1/cobertura-1.9.4.1.pom
	found net.sourceforge.cobertura#cobertura;1.9.4.1 in http://evgeny-goldin.org/artifactory/repo/
downloading http://evgeny-goldin.org/artifactory/repo/oro/oro/2.0.8/oro-2.0.8.pom ...
Download http://evgeny-goldin.org/artifactory/repo/oro/oro/2.0.8/oro-2.0.8.pom
	found oro#oro;2.0.8 in http://evgeny-goldin.org/artifactory/repo/
downloading http://evgeny-goldin.org/artifactory/repo/asm/asm/3.0/asm-3.0.pom ...
Download http://evgeny-goldin.org/artifactory/repo/asm/asm/3.0/asm-3.0.pom
downloading http://evgeny-goldin.org/artifactory/repo/asm/asm-parent/3.0/asm-parent-3.0.pom ...
Download http://evgeny-goldin.org/artifactory/repo/asm/asm-parent/3.0/asm-parent-3.0.pom
	found asm#asm;3.0 in http://evgeny-goldin.org/artifactory/repo/
downloading http://evgeny-goldin.org/artifactory/repo/asm/asm-tree/3.0/asm-tree-3.0.pom ...
Download http://evgeny-goldin.org/artifactory/repo/asm/asm-tree/3.0/asm-tree-3.0.pom
	found asm#asm-tree;3.0 in http://evgeny-goldin.org/artifactory/repo/
downloading http://evgeny-goldin.org/artifactory/repo/log4j/log4j/1.2.9/log4j-1.2.9.pom ...
Download http://evgeny-goldin.org/artifactory/repo/log4j/log4j/1.2.9/log4j-1.2.9.pom
	found log4j#log4j;1.2.9 in http://evgeny-goldin.org/artifactory/repo/
:: resolution report :: resolve 416572ms :: artifacts dl 0ms
	:: evicted modules:
	org.apache.ant#ant;1.7.0 by [org.apache.ant#ant;1.8.2] in [classpath]
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|     classpath    |   12  |   10  |   10  |   1   ||   0   |   0   |
	---------------------------------------------------------------------

:: problems summary ::
:::: WARNINGS
		module not found: com.goldin.plugins#gradle;0.1-RC3

	==== clientModule: tried

	==== internal-repository: tried

	==== http://evgeny-goldin.org/artifactory/repo/: tried

	  http://evgeny-goldin.org/artifactory/repo/com/goldin/plugins/gradle/0.1-RC3/gradle-0.1-RC3.pom

	==== cobertura: tried

	  https://github.com/valkolovos/gradle_cobertura/raw/master/ivy/com.goldin.plugins/gradle/0.1-RC3/ivy.xml

	  -- artifact com.goldin.plugins#gradle;0.1-RC3!gradle.jar:

	  https://github.com/valkolovos/gradle_cobertura/raw/master/ivy/com.goldin.plugins/gradle/0.1-RC3/gradle-0.1-RC3.jar

	Using the Wharf cache with non Wharf resources!

		::::::::::::::::::::::::::::::::::::::::::::::

		::          UNRESOLVED DEPENDENCIES         ::

		::::::::::::::::::::::::::::::::::::::::::::::

		:: com.goldin.plugins#gradle;0.1-RC3: not found

		::::::::::::::::::::::::::::::::::::::::::::::


:::: ERRORS
	impossible to acquire lock for com.goldin.plugins#gradle;0.1-RC3

	impossible to acquire lock for com.goldin.plugins#gradle;0.1-RC3

	impossible to acquire lock for com.goldin.plugins#gradle;0.1-RC3


:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':classpath':
    - unresolved dependency: com.goldin.plugins#gradle;0.1-RC3: not found


* Try:
Run with --debug option to get more log output.

* Exception is:
org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':classpath':
    - unresolved dependency: com.goldin.plugins#gradle;0.1-RC3: not found

	at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver$ResolvedConfigurationImpl.rethrowFailure(DefaultIvyDependencyResolver.java:100)
	at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$1.rethrowFailure(SelfResolvingDependencyResolver.java:78)
	at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingIvyService$ErrorHandlingResolvedConfiguration.rethrowFailure(ErrorHandlingIvyService.java:77)
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:473)
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:179)
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown Source)
	at org.gradle.api.internal.initialization.DefaultScriptHandler.updateClassPath(DefaultScriptHandler.java:36)
	at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:118)
	at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)
	at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:43)
	at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:478)
	at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:73)
	at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)
	at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)
	at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:38)
	at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:35)
	at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:454)
	at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:449)
	at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:138)
	at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:109)
	at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:77)
	at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
	at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
	at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:32)
	at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:21)
	at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:219)
	at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:203)
	at org.gradle.launcher.Main.execute(Main.java:55)
	at org.gradle.launcher.Main.main(Main.java:40)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:49)
	at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:31)
	at org.gradle.launcher.GradleMain.main(GradleMain.java:24)


BUILD FAILED

Total time: 6 mins 59.082 secs
#[23:44:01][~/Projects/teamcity-plugins]$ 
Comment by Szczepan Faber [ 08/Aug/11 ]

What about this hanging at 'Loading'? Does it still occur?

Comment by Evgeny Goldin [ 08/Aug/11 ]

No, once I removed the remaining .lck files, as Adam instructed in this thread.

Comment by Szczepan Faber [ 08/Aug/11 ]

Underlying reason is a duplicate of GRADLE-1723

Generated at Wed Jun 30 12:02:53 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.