Bug 422462 - Automatically add Java source folders to Maven execution
Summary: Automatically add Java source folders to Maven execution
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.5.0   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 422459
  Show dependency tree
 
Reported: 2013-11-25 05:47 EST by Stefan Oehme CLA
Modified: 2013-11-30 08:25 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Oehme CLA 2013-11-25 05:47:39 EST
For Java based languages, the xtext-maven-plugin should automatically add the generated sources to the Java compile sources using:

mavenProject.addCompileSourceRoot(...)

Otherwise, people have to use the build-helper plugin to add the source folders, which just adds boilerplate (see Sven's example on Github).

The xtend-compiler-plugin already does this correctly.
Comment 1 Sven Efftinge CLA 2013-11-25 09:36:48 EST
We cannot reliable tell which of the possibly many output folders should be added as a source folder. So to support this we'd need some indication on a per outputConfiguration level.
Comment 2 Stefan Oehme CLA 2013-11-25 16:00:41 EST
(In reply to Sven Efftinge from comment #1)
>we'd need some indication on a per outputConfiguration level.

That's what I was thinking as well. I would add two boolean flags

- generatesJava (added to the source roots)
- generatesResources (added to the resources)