Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368946

Summary: [xtend] Xtend output folder is not relative to project root
Product: [Modeling] TMF Reporter: Karsten Thoms <karsten.thoms>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: oliver, sven.efftinge
Version: 2.2.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Karsten Thoms CLA 2012-01-18 07:08:54 EST
When the source folder that contains Xtend classes is itself not located in the project root (like in Maven style project layout), the default "xtend-gen" folder is placed next to the source folder. I would expect that the default location of the would be relative to the project root.

To reproduce:
  - Create a Plugin project
  - Replace the source folder /src by a source folder /src/main/java
  - Create an Xtend class

=> The Xtend class will be compiled to src/main/xtend-gen instead of /xtend-gen
Comment 1 Sven Efftinge CLA 2012-01-18 07:25:13 EST
That's intended behavior, which allows to have multiple afferent tend target folders per project.
In Maven for instance you'd have a target folder for test and one for main.
Comment 2 Oliver Libutzki CLA 2014-03-05 03:54:31 EST
I encountered the same behaviour and wonder if it's conform to the standard maven folder structure.

By default generated sources are located in ${project.build.directory}/generated-sources/${plugin-prefix}

Those source files are not distinguished between main and test.

I refer to this post by John Casey:
http://mail-archives.apache.org/mod_mbox/maven-users/200512.mbox/%3C43A0689F.7020708@yahoo.com%3E
Comment 3 Sven Efftinge CLA 2014-03-05 07:57:20 EST
Bug #402957 is the preferred solution.
Comment 4 Eclipse Webmaster CLA 2017-10-31 10:46:43 EDT
Requested via bug 522520.

-M.
Comment 5 Eclipse Webmaster CLA 2017-10-31 10:57:57 EDT
Requested via bug 522520.

-M.