aboutsummaryrefslogtreecommitdiffstats
path: root/sonar/main
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2014-02-27 14:03:27 +0000
committerDominik Stadler <centic@apache.org>2014-02-27 14:03:27 +0000
commit10d05f61b241a58a0a206043ddefaf86417ff1d0 (patch)
treec579ec7bb546dab46d05f2409e4e9fb25deda68d /sonar/main
parent4f2f46c2208331168749ff966596a188c6947241 (diff)
downloadpoi-10d05f61b241a58a0a206043ddefaf86417ff1d0.tar.gz
poi-10d05f61b241a58a0a206043ddefaf86417ff1d0.zip
Try to improve Maven files for Sonar: Copy in (test)sources instead of linking to sources outside the sonar-directory which confuses Sonar, remove source-dir setting for ooxml-schema and ooxml-schema-encryption as both have generate sources and not actual ones, scratchpad is not needed for ooxml
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1572580 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sonar/main')
-rw-r--r--sonar/main/pom.xml77
1 files changed, 69 insertions, 8 deletions
diff --git a/sonar/main/pom.xml b/sonar/main/pom.xml
index 81e87aa168..6527e75b01 100644
--- a/sonar/main/pom.xml
+++ b/sonar/main/pom.xml
@@ -14,15 +14,76 @@
<name>Apache POI Main package</name>
<build>
- <sourceDirectory>../../src/java</sourceDirectory>
- <testSourceDirectory>../../src/testcases</testSourceDirectory>
- <resources>
- <resource>
- <directory>../../src/resources/main</directory>
- </resource>
- </resources>
-
<plugins>
+ <!-- copy sources, resources and tests in place as otherwise Sonar does not pick them up correctly! -->
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-sources</id>
+ <!-- here the phase you need -->
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/src/main/java</outputDirectory>
+ <resources>
+ <resource>
+ <directory>../../src/java</directory>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-resources</id>
+ <!-- here the phase you need -->
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/src/main/resources</outputDirectory>
+ <resources>
+ <resource>
+ <directory>../../src/resources/main</directory>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-tests</id>
+ <!-- here the phase you need -->
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/src/test/java</outputDirectory>
+ <resources>
+ <resource>
+ <directory>../../src/testcases</directory>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- clean copied sources afterwards -->
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>src</directory>
+ <followSymlinks>false</followSymlinks>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+
<!-- provide the test-jar for other modules -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>