eclipse-xtext / eclipse-xtext/xtext
testOutputDirectory is ignored during Maven build
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 831
- Forks
- 330
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 12
Description
I am working on a Xtext/Xcore/Xtend/Maven/Tycho project. My problem is that the Xtend test classes are generated into the wrong directory during the Maven build. When the Xtend compiler is triggered by the workspace builder, the test sources are generated into the correct directory. This leads to duplicate test sources.
My Maven setup:
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<configuration>
<writeTraceFiles>false</writeTraceFiles>
<outputDirectory>${project.basedir}/src/main/xtend-gen</outputDirectory>
<testOutputDirectory>${project.basedir}/src/test/xtend-gen</testOutputDirectory>
</configuration>
</execution>
</executions>
</plugin>
When run in Maven, the test sources are wrongly generated into src/main/xtend-gen; when run by the Eclipse builder, they are correctly generated into src/test/xtend-gen.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the xtend-maven-plugin compile and testCompile goals and trace how outputDirectory and testOutputDirectory are applied during a Maven build. Reproduce the configuration from the issue, then verify that test sources are generated under src/test/xtend-gen rather than src/main/xtend-gen, without duplicate sources.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100