Message Boards

Liferay Developer Studio shows gradle tasks greyed out and disabled

Michael Green, modified 4 Years ago.

Liferay Developer Studio shows gradle tasks greyed out and disabled

New Member Posts: 21 Join Date: 3/5/20 Recent Posts
Liferay Developer Studio Version: 3.8.0.202002250521-ga1
Liferay 7.3.1 ga 2

As I was working through the guestbook tutorial. The gradle tasks became disabled and greyed out. This happened just after "moving" the guestbook-web project module into the guestbook folder group.  It also duplicated the gradle project. No amount of restart or F5 or ctrl-F5 would make it come back.The gradle build still worked from the command line. 
Answer:  use the gradle tasks "cleanEclipse" and "eclipse" to reset the eclipse project files.
./gradlew cleanEclipse eclipse

Images of the eclipse windows when there is a problem.



thumbnail
Gregory Amerson, modified 3 Years ago.

RE: Liferay Developer Studio shows gradle tasks greyed out and disabled

Liferay Legend Posts: 1123 Join Date: 2/16/10 Recent Posts
hey Michael, with Liferay IDE you should never need to run `cleanEcipse or eclipse` tasks from the command line.  YOu should use the built-in gradle integration in the IDE the whole time.  You should remove all .project/.classpath/.lsettings files that are generated in your workspace and then reimport in the IDE and let it re synchronize the eclipse settings dynamically (and automatically).  Let us know if you run into any problems.
Michael Green, modified 3 Years ago.

RE: Liferay Developer Studio shows gradle tasks greyed out and disabled

New Member Posts: 21 Join Date: 3/5/20 Recent Posts
Version: 3.8.1.202004240132-ga2
blade version 3.9.2.202004101340
Liferay Portal: 7.3.2 ga3

So I have just updated to the new Liferay IDE, liferay Portal, and blade. Again I am just running through the guestbook tutorial. At this same point where it talks about moving the newly created "guestbook-web" project into the guestbook directory with the service builder, eclipse really does not like this. In fact in wont let you do it through the interface. I had to do the move via the command line outside of eclipse and restart eclipse, as suggested in the guide. But once this has been done no refresh (F5) or gradle refresh (Ctrl-F5), eclipse restart , gets it the guestbook-web folder to work correctly.
Although it is a little different in that the gradle is not grayed out any more. It just does not pick up the new  folder. 
I am happy to do the clear out of the .project/.classpath/.lsettings files and not use the "cleanEclipse/eclipse' tasks and just do an import. But this is not good if you new to this. The guestbook tute just does not work at this point and it kind of dumps you in a hard place with the eclipse project. 
Guestbook tutorial: https://help.liferay.com/hc/en-us/articles/360032887652-Creating-the-Web-Project
thumbnail
Li Lily, modified 3 Years ago.

RE: Liferay Developer Studio shows gradle tasks greyed out and disabled

New Member Posts: 6 Join Date: 8/30/17 Recent Posts
hey Michael, according to guestbook tutorial and your operation steps, I have arranged a set of steps without errors, hoping to help you:
steps:
1.create gradle workspace
2.create service builder project in gradle workspace
3.create guestbook-web project in gradle workspace
(guestbook-web project creation steps can be created entirely from the guestbook tutorial)
4.guestbook-web project is accessed through the file directory, and only src,bnd.bnd and build.gradle are retained, and all other items are deleted
5.move the guestbook-web project under the service builder directory
6.back in eclipse, right-click gradle workspace and execute gradle > refresh gradle project
​​​​​​​When I go through the steps above,gradle tasks does not disable and display grays.
If you have any questions, please contact us again, thx.
Michael Green, modified 3 Years ago.

RE: Liferay Developer Studio shows gradle tasks greyed out and disabled

New Member Posts: 21 Join Date: 3/5/20 Recent Posts
Thanks for the steps Li and the follow up Gregory.
The newer Eclipse IDE is working better with the "move" outside method mentioned in step 5 and then the refresh in 6.
Just as a suggestion maybe the guide should be changed to say to change the "Use default location" edit box. This is much easier than the move afterwards.
Ansuman Mohanty, modified 2 Years ago.

RE: Liferay Developer Studio shows gradle tasks greyed out and disabled

New Member Posts: 2 Join Date: 12/24/21 Recent Posts

 I was hitting the same issue and the suggested solution in the post helped.

Answer:  use the gradle tasks "cleanEclipse" and "eclipse" to reset the eclipse project files.

./gradlew cleanEclipse eclipse