Tagged: gradle eclipse
- This topic has 4 replies, 2 voices, and was last updated 4 years, 8 months ago by raydawg2000.
-
AuthorPosts
-
raydawg2000ParticipantI have a gradle project with the Dyanmic Web facet configured. If I go to Property -> Deployment Assembly and make any configuration changes then are reset and lost everytime I do a Gradle -> Refresh Gradle Project.
An example is that I added a line such as:
Source: /web
Deploy Path: /This gets removed everytime I do a Gradle refresh.
Now I also had resources that I was mapping that I was able to keep by configuring a resources section on my gradle.build file
sourceSets { main { java { srcDirs = ["src"] } resources { srcDirs = ["etc"] exclude "mappings/" exclude "mailTemplates/" exclude "sql/" } } }
Before I added this my /etc folder mapping was also getting wiped out, but now it’s not. So there must be some mapping in Gradle that I can set to matchup other resources from the Deployment Assembly but I cannot figure out what that is. help please
support-swapnaModeratorHi,
I tried to replicate the issue at my end with a simple Gradle project. I did see an error when trying to Refresh the Gradle project and an update to the latest Gradle plugin resolved it. With successful refresh of Gradle project, I do not see the reported issue and the changes to Deployment Assembly persists.
Do you see any errors logged in the Error Log view during the ‘Refresh Gradle Project’? You can update the Gradle plugin to the latest 3.1.4 (MyEclipse ships with 3.1.2) and check if the issue persists. Go to Help > Install from Site and use this update site to update the plugin :
http://download.eclipse.org/buildship/updates/latest
For Gradle specific issues, I suggest you cross post to Gradle or general development related forums like stackoverflow.com for better help from the dev community.
Hope this helps. Please let us know how you get on with it.
–Swapna
Genuitec Support
raydawg2000ParticipantThanks for your help, I got the issue resolved. There is a gradle plugin called “eclipse-wtp” that can be used to configure the specifics of the deployment assembly. So for my example I added this to my gradle build file
eclipse { wtp { component { resource sourcePath: "web", deployPath: "/" } } }
support-swapnaModeratorHi,
Glad that you figured it out. Thank you for getting back to us with the resolution details.
Did you also upgrade the plugin version?–Swapna
Genuitec Support
raydawg2000ParticipantHi, Yes I also did the plugin upgrade as well. thanks.
-
AuthorPosts