0

I've written these tasks:

task createQAWar(type: War, dependsOn: classes) {
    ...
}

task createDevelopmentWar(type: War, dependsOn: classes) {
    ...
}

task createProductionWar(type: War, dependsOn: classes) {
    ...
}

task createDists(dependsOn: [createQAWar, createDevelopmentWar, createProductionWar])

I've imported project using BuildShip eclipse plugin. As you can see, they are not listed on available tasks:

enter image description here

Why do these tasks are not detected?

I'm trying to solve another problem related with that. In order to perform any of above tasks, I'm performing them from console. However:

PS D:\projects\living\platform\commty> gradle createQAWar Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/3.0/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=4g; support was removed in 8.0
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Jordi
  • 20,868
  • 39
  • 149
  • 333

1 Answers1

2

Provide group and description properties for your tasks.

task createQAWar(type: War, dependsOn: classes) {
    group = 'myGroup'
    description = 'my description'
    ...
}

After changing your build.gradle you must 1.) gradle-refresh the project and 2.) refresh the TasksView

Frank Neblung
  • 3,047
  • 17
  • 34
  • This is still working in 4/2020. My problem was needing to have BOTH group and description. Gradle refresh your project, then ALSO refresh your taskview and you should see it. – Shane Sepac Apr 30 '20 at 03:28