Question

I have a multi-project gradle project, with the following child projects:

  • schema
  • client

Schema basically only contains XSD & WSDL which will be compiled (using ant XJC) & used by 'client'.

Gradle can actually compile this project without any problem in command line. But when I try to import the project into my IDE (i'm using Intellij 13), those JAXB generated classes are not recognized, and hence I cant do any work on the 'client' project.

I have the project on github: https://github.com/alexwibowo/opentext-vrd-client

'client' already specifies this dependency:

compile project(":schema")

But I guess the IDE will only recognize source that is really on the schema project (i.e. schema/src/main/java), and not generated sources.

I'm coming from the Maven world, where with the (similar) setup above, as long as 'schema' JAR is in my local maven repo, then the IDE will recognize it. Any thoughts/recommendation?

Thanks in advance!

Regards,

Alex

Was it helpful?

Solution

IDEA plugin has documentation at http://www.gradle.org/docs/current/userguide/idea_plugin.html You can modify idea.module.sourceDirs and add the generated source directories there. See an example in http://www.gradle.org/docs/current/dsl/org.gradle.plugins.ide.idea.model.IdeaModule.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top