Use generated-test-sources for xtend 47/50547/2
authorStephen Kitt <skitt@redhat.com>
Tue, 17 Jan 2017 13:45:28 +0000 (14:45 +0100)
committerRobert Varga <nite@hq.sk>
Mon, 23 Jan 2017 14:01:10 +0000 (14:01 +0000)
IntelliJ expects test sources in generated-test-sources (which also
matches other programs' expectations, e.g. annotation processors).
Building test sources in generates-sources causes issues because the
classpaths don't match up. This patch moves generated xtend sources to
generates-sources/xtend for main code and generated-test-sources/xtend
for test code.

Change-Id: I8bc657c7cc06b0c7d2b8deeb7a970fe504a7d144
Signed-off-by: Stephen Kitt <skitt@redhat.com>
odlparent/pom.xml

index 0e298ba84c4b0ce249d938d00dc44caaf74cd56a..cb4f9c215ccdeeaa346ba23e61e5071fbde1bc01 100644 (file)
     <sonar.jacoco.reportPath>${project.build.directory}/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
     <sonar.jacoco.itReportPath>${project.build.directory}/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
     <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
-    <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen/**,**/yang-gen-config/**,**/yang-gen-sal/**,**/yang-gen-code/**,**/pax/**</sonar.exclusions>
+    <sonar.exclusions>**/gen/**,**/generated-sources/**,**/generated-test-sources/**,**/yang-gen/**,**/yang-gen-config/**,**/yang-gen-sal/**,**/yang-gen-code/**,**/pax/**</sonar.exclusions>
 
     <pmd.cpd.fail>false</pmd.cpd.fail>
   </properties>
                               PMD config too.
                    -->
                   <excludeRoot>${project.build.directory}/generated-sources</excludeRoot>
+                  <excludeRoot>${project.build.directory}/generated-test-sources</excludeRoot>
                 </excludeRoots>
                 <linkXRef>false</linkXRef>
               </configuration>
                 <goal>testCompile</goal>
               </goals>
               <configuration>
-                <outputDirectory>${project.build.directory}/generated-sources/xtend/main</outputDirectory>
-                <testOutputDirectory>${project.build.directory}/generated-sources/xtend/test</testOutputDirectory>
+                <outputDirectory>${project.build.directory}/generated-sources/xtend</outputDirectory>
+                <testOutputDirectory>${project.build.directory}/generated-test-sources/xtend</testOutputDirectory>
               </configuration>
             </execution>
           </executions>
             <excludes>
               <exclude>**/gen/**</exclude>
               <exclude>**/generated-sources/**</exclude>
+              <exclude>**/generated-test-sources/**</exclude>
               <exclude>**/yang-gen/**</exclude>
               <exclude>**/yang-gen-config/**</exclude>
               <exclude>**/yang-gen-sal/**</exclude>