SonarQube and Xtend [message #1349503] |
Mon, 12 May 2014 04:15  |
Eclipse User |
|
|
|
Hi,
we have an xtext grammar for mathematical expressions.
During maven build SonarQube runs.
For the test plugin of our grammar it fails with
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.2:sonar (default-cli) on project com.sap.bw.parent: Can not execute SonarQube analysis: Unable to read and import the source file : '/Disk1/home/hudson/hudson/jobs/com.sap.bw.modeling.deploy/workspace/gitRepo/com.sap.bw.qd.formula.tests/xtend-gen/com/sap/bw/qd/formula/scoping/ScopeUnitTest.java' with the charset : 'UTF-8'. Duplicate source for resource: com.sap.bw.qd.formula.scoping.ScopeUnitTest -> [Help 1]
I checked the folder [code]/Disk1/home/hudson/hudson/jobs/com.sap.bw.modeling.deploy/workspace/gitRepo/com.sap.bw.qd.formula.tests/xtend-gen/com/sap/bw/qd/formula/scoping/[code] and there is only resource named "ScopeUnitTest".
But in the target folder [code][...]com.sap.bw.qd.formula.tests/target/classes/com/sap/bw/qd/formula/scoping/[code] there are two files with the name ScopeUnitTest.
-ScopeUnitTest.class
-ScopeUnitTest.xtend
In my local eclipse the xtend files are not moved to bin folder when building locally.
Here is the relevant part of the pom.xml of the test plugin:
<build>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<!-- in the target we use 2.4.3 but in ide 2.5.x, so we use 2.5.x here
as well since it works -->
<version>2.5.2</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<!-- <goal>xtend-install-debug-info</goal> -->
<goal>testCompile</goal>
<!-- <goal>xtend-test-install-debug-info</goal> -->
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>xtend-gen</outputDirectory>
<testOutputDirectory>xtend-gen</testOutputDirectory>
</configuration>
</plugin>
<!-- <plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.19.0</version>
<extensions>true</extensions>
</plugin> -->
</plugins>
</build>
How do I need to configure the maven plugin to prevent to copying of the xtend files to the target (binary) folder?
Thanks, Marcus
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06287 seconds