Announcement Announcement Module
Collapse
No announcement yet.
How to build a gradle web project via Spring Source Tool? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to build a gradle web project via Spring Source Tool?

    I imported a gradle project to STS and now there is not the option run to a server. If I create a Dynamic Web Project I can get this option but this is not the case with the sample from Pro Spring MVC With Web Flow which I have imported and I am sure that the sample is working because I builded by command line succesfully via gradle but I can`t via STS. Is there some marven depency I should install?

  • #2
    Is the gradle.build includes :

    Code:
    eclipse {
    	wtp {
    		facet {
    		  facet name: 'jst.web', version: '2.5'
    		  facet name: 'java', version: '1.6'
    		  facet name: 'wst.jsdt.web', version: '1.0'
    		}
    	}
    }

    Comment


    • #3
      The comment by NicoTexas above may be helpful. For this to work you also need to apply the eclipse-wtp gradle plugin.

      'eclipse-wtp' is a gradle plugin. To add the plugin to your buildscript you
      need to add something like this

      Code:
         apply plugin: 'eclipse-wtp'
      There isn't a lot of documentation available for the 'eclipse-wtp' plugin.
      But this is the documentation I found about the plugin:

      http://www.gradle.org/docs/current/d...clipseWtp.html

      Hope that helps,

      Kris

      Comment


      • #4
        Yes, I could have been more specific
        Documentation isn't very helpful in Demetrio case as you have to figure out the facet names by yourself.

        Anyway, basically the eclipse-wtp plugin will write in the eclipse settings files.
        The facet part is set in
        org.eclipse.wst.common.project.facet.core.xml

        once you have updated the gradle.build file you will need to run eclipse task (can be run from the "Gradle tasks" view in STS).

        and voila...

        Comment

        Working...
        X