[GRADLE-830] Non-existent task not handled properly Created: 19/Feb/10  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Russel Winder Assignee: Unassigned
Resolution: Won't Fix Votes: 0


 Description   

If I use gradlew (0.9-20100121145940+1100) then I get a reasonable error message on an incorrect task:

|> gradlew testInteg

FAILURE: Could not determine which tasks to execute.

* What went wrong:
Task 'testInteg' not found in root project 'gradle'.

* Try:
Run with -t to get a list of available tasks.

BUILD FAILED

Total time: 8.386 secs

However using Trunk as at 2010-02-19 12:00+00:00, I get the rather less useful:

|> gradle testInteg

FAILURE: Build aborted because of an internal error.

* What went wrong:
Build aborted because of an unexpected internal error. Please file an issue at: www.gradle.org.

* Try:
Run with -d option to get additional debug info.

* Exception is:
java.lang.NullPointerException: null
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:127)
	at org.gradle.groovy.scripts.DefaultScript.init(DefaultScript.groovy:46)
	at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.use(DefaultScriptPluginFactory.java:109)
	at org.gradle.configuration.DefaultInitScriptProcessor.process(DefaultInitScriptProcessor.java:37)
	at org.gradle.initialization.InitScriptHandler.executeScripts(InitScriptHandler.java:40)
	at org.gradle.GradleLauncher.doBuildStages(GradleLauncher.java:170)
	at org.gradle.GradleLauncher.doBuild(GradleLauncher.java:133)
	at org.gradle.GradleLauncher.run(GradleLauncher.java:103)
	at org.gradle.launcher.Main.execute(Main.java:93)
	at org.gradle.launcher.Main.main(Main.java:42)
	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:616)
	at org.gradle.launcher.GradleMain.main(GradleMain.java:54)

BUILD FAILED

Total time: 1.112 secs


 Comments   
Comment by Hans Dockter [ 02/Mar/10 ]

Hi Russel,

do you still get this behavior?

I can't reproduce it.

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

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