From a926d50986636903bb0dc5a108cf30ed158f9cdc Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Thu, 27 Feb 2014 14:03:27 +0000 Subject: [PATCH] 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 --- sonar/examples/pom.xml | 41 ++++++++++++- sonar/excelant/pom.xml | 77 +++++++++++++++++++++--- sonar/main/pom.xml | 77 +++++++++++++++++++++--- sonar/ooxml-schema-encryption/pom.xml | 2 - sonar/ooxml-schema/pom.xml | 2 - sonar/ooxml/pom.xml | 84 ++++++++++++++++++++++----- sonar/pom.xml | 2 +- sonar/scratchpad/pom.xml | 77 +++++++++++++++++++++--- 8 files changed, 320 insertions(+), 42 deletions(-) diff --git a/sonar/examples/pom.xml b/sonar/examples/pom.xml index be0cd111a..5064a51af 100644 --- a/sonar/examples/pom.xml +++ b/sonar/examples/pom.xml @@ -12,9 +12,46 @@ jar Apache POI Examples package - + - ../../src/examples/src + + + + maven-resources-plugin + 2.6 + + + copy-sources + + generate-sources + + copy-resources + + + ${basedir}/src/main/java + + + ../../src/examples/src + + + + + + + + + maven-clean-plugin + 2.5 + + + + src + false + + + + + diff --git a/sonar/excelant/pom.xml b/sonar/excelant/pom.xml index 478a9364b..8cc86ec07 100644 --- a/sonar/excelant/pom.xml +++ b/sonar/excelant/pom.xml @@ -14,13 +14,76 @@ Apache POI ExcelAnt package - ../../src/excelant/java - ../../src/excelant/testcases - - - ../../src/excelant/resources - - + + + + maven-resources-plugin + 2.6 + + + copy-sources + + generate-sources + + copy-resources + + + ${basedir}/src/main/java + + + ../../src/excelant/java + + + + + + copy-resources + + generate-resources + + copy-resources + + + ${basedir}/src/main/resources + + + ../../src/excelant/resources + + + + + + copy-tests + + generate-test-sources + + copy-resources + + + ${basedir}/src/test/java + + + ../../src/excelant/testcases + + + + + + + + + maven-clean-plugin + 2.5 + + + + src + false + + + + + diff --git a/sonar/main/pom.xml b/sonar/main/pom.xml index 81e87aa16..6527e75b0 100644 --- a/sonar/main/pom.xml +++ b/sonar/main/pom.xml @@ -14,15 +14,76 @@ Apache POI Main package - ../../src/java - ../../src/testcases - - - ../../src/resources/main - - - + + + maven-resources-plugin + 2.6 + + + copy-sources + + generate-sources + + copy-resources + + + ${basedir}/src/main/java + + + ../../src/java + + + + + + copy-resources + + generate-resources + + copy-resources + + + ${basedir}/src/main/resources + + + ../../src/resources/main + + + + + + copy-tests + + generate-test-sources + + copy-resources + + + ${basedir}/src/test/java + + + ../../src/testcases + + + + + + + + + maven-clean-plugin + 2.5 + + + + src + false + + + + + org.apache.maven.plugins diff --git a/sonar/ooxml-schema-encryption/pom.xml b/sonar/ooxml-schema-encryption/pom.xml index 9fd237027..aa723d0d6 100644 --- a/sonar/ooxml-schema-encryption/pom.xml +++ b/sonar/ooxml-schema-encryption/pom.xml @@ -14,8 +14,6 @@ Apach POI - Openxmlformats Encryption Schema package - target/generated-sources/xmlbeans - org.codehaus.mojo diff --git a/sonar/ooxml-schema/pom.xml b/sonar/ooxml-schema/pom.xml index 92e0111c8..92426b486 100644 --- a/sonar/ooxml-schema/pom.xml +++ b/sonar/ooxml-schema/pom.xml @@ -14,8 +14,6 @@ Apach POI - Openxmlformats Schema package - target/generated-sources/xmlbeans - diff --git a/sonar/ooxml/pom.xml b/sonar/ooxml/pom.xml index 0ece9d623..bc1feabb4 100644 --- a/sonar/ooxml/pom.xml +++ b/sonar/ooxml/pom.xml @@ -12,15 +12,78 @@ jar Apache POI OOXML package - + - ../../src/ooxml/java - ../../src/ooxml/testcases - - - ../../src/resources/ooxml - - + + + + maven-resources-plugin + 2.6 + + + copy-sources + + generate-sources + + copy-resources + + + ${basedir}/src/main/java + + + ../../src/ooxml/java + + + + + + copy-resources + + generate-resources + + copy-resources + + + ${basedir}/src/main/resources + + + ../../src/resources/ooxml + + + + + + copy-tests + + generate-test-sources + + copy-resources + + + ${basedir}/src/test/java + + + ../../src/ooxml/testcases + + + + + + + + + maven-clean-plugin + 2.5 + + + + src + false + + + + + @@ -46,11 +109,6 @@ test-jar test - - ${project.groupId} - poi-scratchpad - ${project.version} - org.apache.xmlbeans diff --git a/sonar/pom.xml b/sonar/pom.xml index 2232fe5e0..8d54d14d1 100644 --- a/sonar/pom.xml +++ b/sonar/pom.xml @@ -9,7 +9,7 @@ pom 3.11-SNAPSHOT - Apache POI Parent Project + Apache POI - the Java API for Microsoft Documents Maven build of Apache POI for Sonar checks http://poi.apache.org/ diff --git a/sonar/scratchpad/pom.xml b/sonar/scratchpad/pom.xml index 3824eeaac..24e8045d7 100644 --- a/sonar/scratchpad/pom.xml +++ b/sonar/scratchpad/pom.xml @@ -14,13 +14,76 @@ Apache POI Scratchpad package - ../../src/scratchpad/src - ../../src/scratchpad/testcases - - - ../../src/resources/scratchpad - - + + + + maven-resources-plugin + 2.6 + + + copy-sources + + generate-sources + + copy-resources + + + ${basedir}/src/main/java + + + ../../src/scratchpad/src + + + + + + copy-resources + + generate-resources + + copy-resources + + + ${basedir}/src/main/resources + + + ../../src/resources/scratchpad + + + + + + copy-tests + + generate-test-sources + + copy-resources + + + ${basedir}/src/test/java + + + ../../src/scratchpad/testcases + + + + + + + + + maven-clean-plugin + 2.5 + + + + src + false + + + + +