I would need the "web" and "gwt" facets. In my test project they look like
this:

    <facet type="web" name="Web">
      <configuration>
        <descriptors>
          <deploymentDescriptor name="web.xml"
url="file://$MODULE_DIR$/web/WEB-INF/web.xml" />
        </descriptors>
        <webroots>
          <root url="file://$MODULE_DIR$/web" relative="/" />
        </webroots>
      </configuration>
    </facet>
    <facet type="gwt" name="GWT">
      <configuration>
        <setting name="compilerMaxHeapSize" value="512" />
        <setting name="gwtScriptOutputStyle" value="DETAILED" />
        <setting name="gwtSdkUrl"
value="file://$MODULE_DIR$/../../gwt-2.5.1" />
        <setting name="webFacet" value="Web" />
      </configuration>
    </facet>

Additionally there's a little bit more configuration needed to make the
project work in the IDE. E.g. the "exploded-war" artifact has to be
configured to also include the output of the "gwt" facet:

  <artifact type="exploded-war" name="web:war exploded">
    <output-path>$PROJECT_DIR$/out/artifacts/web_war_exploded</output-path>
    <root id="root">
      <element id="javaee-facet-resources" facet="gwt-test/web/Web" />
      <element id="directory" name="WEB-INF">
        <element id="directory" name="classes">
          <element id="module-output" name="gwt-test" />
        </element>
        <element id="directory" name="lib">
          <element id="file-copy"
path="$PROJECT_DIR$/../../gwt-2.5.1/gwt-servlet.jar" />
        </element>
      </element>
      <element id="gwt-compiler-output" facet="gwt-test/gwt/GWT" />
    </root>
  </artifact>

So It's not as easy as adding an additional facet.


2014/1/8 Adam Murdoch <adam.murd...@gradleware.com>

>
> On 7 Jan 2014, at 10:26 pm, Steffen Schäfer <
> steffen.scha...@googlemail.com> wrote:
>
> Hello,
>
> by now, Gradle only generates basic project/module configurations for
> IntelliJ IDEA when using “gradle idea”. This is enough for simple projects
> but not for e.g. war projects (GRADLE-1441). For such projects, you need
> extended configuration including facets and artifacts (and possibly even
> more).
>
> I know that if I import a project as Gradle project, IntelliJ IDEA will
> generate the necessary configurations based on the Gradle tooling API
> (including the beforementioned facet and artifact). This is very good
> support as long as you only use built-in functionality (e.g. “war” plugin).
>
> In my case I’m writing a GWT plugin (which isn’t known by IntelliJ IDEA)
> where I would have to configure an additional facet and manipulate the
> exploded-war artefact.
>
>
> Which facet(s) to you need to configure for your plugin?
>
>
> --
> Adam Murdoch
> Gradle Co-founder
> http://www.gradle.org
> VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
> http://www.gradleware.com
>
>
>
>

Reply via email to