Author: jukka
Date: Fri May 22 16:43:52 2009
New Revision: 777613

URL: http://svn.apache.org/viewvc?rev=777613&view=rev
Log:
TIKA-230: [PATCH] Parent pom

Moved more generic settings to the parent POM and brought some per-component 
dependency settings back to child POM level. The parent POM should only contain 
settings shared by all Tika components.

Leverage ${project.groupId} and ${project.version} when referencing other Tika 
components.

Use a ${poi.version} setting to keep all POI dependencies in sync.

Removed the simple commons-lang dependency from AutoDetectParserTest.

Modified:
    lucene/tika/trunk/pom.xml
    lucene/tika/trunk/tika-app/pom.xml
    lucene/tika/trunk/tika-core/pom.xml
    lucene/tika/trunk/tika-parent/pom.xml
    lucene/tika/trunk/tika-parsers/pom.xml
    
lucene/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/AutoDetectParserTest.java

Modified: lucene/tika/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/lucene/tika/trunk/pom.xml?rev=777613&r1=777612&r2=777613&view=diff
==============================================================================
--- lucene/tika/trunk/pom.xml (original)
+++ lucene/tika/trunk/pom.xml Fri May 22 16:43:52 2009
@@ -26,144 +26,19 @@
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
-    <groupId>org.apache</groupId>
-    <artifactId>apache</artifactId>
-    <version>4</version>
+    <groupId>org.apache.tika</groupId>
+    <artifactId>tika-parent</artifactId>
+    <version>0.4-SNAPSHOT</version>
+    <relativePath>tika-parent/pom.xml</relativePath>
   </parent>
 
-  <groupId>org.apache.tika</groupId>
   <artifactId>tika-reactor</artifactId>
-  <version>0.4-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Apache Tika reactor</name>
   <!-- Keep on a single line, see http://jira.codehaus.org/browse/MJAR-39 -->
   <description>Tika is a toolkit for detecting and extracting metadata and 
structured text content from various documents using existing parser 
libraries.</description>
 
-  <url>http://lucene.apache.org/tika/</url>
-
-  <issueManagement>
-    <system>JIRA</system>
-    <url>https://issues.apache.org/jira/browse/TIKA</url>
-  </issueManagement>
-
-  <mailingLists>
-    <mailingList>
-      <name>Development mailing list</name>
-      <subscribe>[email protected]</subscribe>
-      <unsubscribe>[email protected]</unsubscribe>
-      <post>[email protected]</post>
-      
<archive>http://mail-archives.apache.org/mod_mbox/lucene-tika-dev/</archive>
-      <otherArchives>
-        
<otherArchive>http://www.mail-archive.com/[email protected]/</otherArchive>
-        
<otherArchive>http://www.mail-archive.com/[email protected]/</otherArchive>
-        
<otherArchive>http://www.nabble.com/Apache-Tika---Development-f20913.html</otherArchive>
-        
<otherArchive>http://news.gmane.org/gmane.comp.apache.tika.devel</otherArchive>
-        <otherArchive>http://tika.markmail.org/</otherArchive>
-      </otherArchives>
-    </mailingList>
-    <mailingList>
-      <name>Commit mailing list</name>
-      <subscribe>[email protected]</subscribe>
-      <unsubscribe>[email protected]</unsubscribe>
-      <post>[email protected]</post>
-      
<archive>http://mail-archives.apache.org/mod_mbox/lucene-tika-commits/</archive>
-      <otherArchives>
-        
<otherArchive>http://www.mail-archive.com/[email protected]/</otherArchive>
-        
<otherArchive>http://www.mail-archive.com/[email protected]/</otherArchive>
-      </otherArchives>
-    </mailingList>
-    <mailingList>
-      <name>User mailing list</name>
-      <subscribe>[email protected]</subscribe>
-      <unsubscribe>[email protected]</unsubscribe>
-      <post>[email protected]</post>
-      
<archive>http://mail-archives.apache.org/mod_mbox/lucene-tika-user/</archive>
-      <otherArchives>
-        
<otherArchive>http://www.mail-archive.com/[email protected]/</otherArchive>
-      </otherArchives>
-    </mailingList>
-  </mailingLists>
-
-  <developers>
-    <developer>
-      <name>Rida Benjelloun</name>
-      <id>ridabenjelloun</id>
-      <email>[email protected]</email>     
-      <roles>
-        <role>committer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Keith Bennett</name>
-      <id>kbennett</id>
-      <roles>
-        <role>committer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Mark Harwood</name>
-      <id>mharwood</id>
-      <roles>
-        <role>committer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Chris A. Mattmann</name>
-      <id>mattmann</id>
-      <email>[email protected]</email>
-      <url>http://people.apache.org/~mattmann/</url>
-      <organization>NASA Jet Propulsion Laboratory</organization>
-      <organizationUrl>http://www.jpl.nasa.gov</organizationUrl>
-      <timezone>-8</timezone>
-      <properties/>
-      <roles>
-        <role>committer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Dave Meikle</name>
-      <id>dmeikle</id>
-      <roles>
-        <role>committer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Sami Siren</name>
-      <id>siren</id>
-      <roles>
-        <role>committer</role>
-      </roles>
-    </developer>
-    <developer>
-      <name>Jukka Zitting</name>
-      <id>jukka</id>
-      <roles>
-        <role>committer</role>
-      </roles>
-    </developer>
-  </developers>
-  <contributors>
-    <contributor>
-      <name>Doug Cutting</name>
-      <roles>
-        <role>mentor</role>
-      </roles>
-    </contributor>
-    <contributor>
-      <name>Bertrand Delacretaz</name>
-      <roles>
-        <role>mentor</role>
-      </roles>
-    </contributor>
-    <contributor>
-      <name>Niall Pemberton</name>
-      <roles>
-        <role>emeritus</role>
-      </roles>
-    </contributor>
-  </contributors>
-
   <scm>
     <connection>
       scm:svn:http://svn.apache.org/repos/asf/lucene/tika/trunk

Modified: lucene/tika/trunk/tika-app/pom.xml
URL: 
http://svn.apache.org/viewvc/lucene/tika/trunk/tika-app/pom.xml?rev=777613&r1=777612&r2=777613&view=diff
==============================================================================
--- lucene/tika/trunk/tika-app/pom.xml (original)
+++ lucene/tika/trunk/tika-app/pom.xml Fri May 22 16:43:52 2009
@@ -32,17 +32,14 @@
     <relativePath>../tika-parent/pom.xml</relativePath>
   </parent>
 
-  <groupId>org.apache.tika</groupId>
   <artifactId>tika-app</artifactId>
-  <version>0.4-SNAPSHOT</version>
-
   <name>Apache Tika application</name>
 
   <dependencies>
     <dependency>
-      <groupId>org.apache.tika</groupId>
+      <groupId>${project.groupId}</groupId>
       <artifactId>tika-parsers</artifactId>
-      <version>0.4-SNAPSHOT</version>
+      <version>${project.version}</version>
     </dependency>
   </dependencies>
 

Modified: lucene/tika/trunk/tika-core/pom.xml
URL: 
http://svn.apache.org/viewvc/lucene/tika/trunk/tika-core/pom.xml?rev=777613&r1=777612&r2=777613&view=diff
==============================================================================
--- lucene/tika/trunk/tika-core/pom.xml (original)
+++ lucene/tika/trunk/tika-core/pom.xml Fri May 22 16:43:52 2009
@@ -32,10 +32,7 @@
     <relativePath>../tika-parent/pom.xml</relativePath>
   </parent>
 
-  <groupId>org.apache.tika</groupId>
   <artifactId>tika-core</artifactId>
-  <version>0.4-SNAPSHOT</version>
-
   <name>Apache Tika core</name>
   <!-- Keep on a single line, see http://jira.codehaus.org/browse/MJAR-39 -->
   <description>Tika is a toolkit for detecting and extracting metadata and 
structured text content from various documents using existing parser 
libraries.</description>
@@ -44,25 +41,25 @@
     <dependency>
       <groupId>commons-lang</groupId>
       <artifactId>commons-lang</artifactId>
-      <optional/>
+      <version>2.1</version>
+      <optional>true</optional>
     </dependency>
     <dependency>
       <groupId>commons-logging</groupId>
       <artifactId>commons-logging</artifactId>
+      <version>1.0.4</version>
     </dependency>
     <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
+      <version>1.4</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <type>jar</type>
       <scope>test</scope>
     </dependency>
   </dependencies>
 
-  <build/>
-
 </project>
 

Modified: lucene/tika/trunk/tika-parent/pom.xml
URL: 
http://svn.apache.org/viewvc/lucene/tika/trunk/tika-parent/pom.xml?rev=777613&r1=777612&r2=777613&view=diff
==============================================================================
--- lucene/tika/trunk/tika-parent/pom.xml (original)
+++ lucene/tika/trunk/tika-parent/pom.xml Fri May 22 16:43:52 2009
@@ -36,84 +36,140 @@
   <version>0.4-SNAPSHOT</version>
   <packaging>pom</packaging>
 
-  <name>Apache Tika Parent pom</name>
+  <name>Apache Tika parent</name>
   <!-- Keep on a single line, see http://jira.codehaus.org/browse/MJAR-39 -->
   <description>Tika is a toolkit for detecting and extracting metadata and 
structured text content from various documents using existing parser 
libraries.</description>
 
+  <url>http://lucene.apache.org/tika/</url>
+
+  <issueManagement>
+    <system>JIRA</system>
+    <url>https://issues.apache.org/jira/browse/TIKA</url>
+  </issueManagement>
+
+  <mailingLists>
+    <mailingList>
+      <name>Development mailing list</name>
+      <subscribe>[email protected]</subscribe>
+      <unsubscribe>[email protected]</unsubscribe>
+      <post>[email protected]</post>
+      
<archive>http://mail-archives.apache.org/mod_mbox/lucene-tika-dev/</archive>
+      <otherArchives>
+        
<otherArchive>http://www.mail-archive.com/[email protected]/</otherArchive>
+        
<otherArchive>http://www.mail-archive.com/[email protected]/</otherArchive>
+        
<otherArchive>http://www.nabble.com/Apache-Tika---Development-f20913.html</otherArchive>
+        
<otherArchive>http://news.gmane.org/gmane.comp.apache.tika.devel</otherArchive>
+        <otherArchive>http://tika.markmail.org/</otherArchive>
+      </otherArchives>
+    </mailingList>
+    <mailingList>
+      <name>Commit mailing list</name>
+      <subscribe>[email protected]</subscribe>
+      <unsubscribe>[email protected]</unsubscribe>
+      <post>[email protected]</post>
+      
<archive>http://mail-archives.apache.org/mod_mbox/lucene-tika-commits/</archive>
+      <otherArchives>
+        
<otherArchive>http://www.mail-archive.com/[email protected]/</otherArchive>
+        
<otherArchive>http://www.mail-archive.com/[email protected]/</otherArchive>
+      </otherArchives>
+    </mailingList>
+    <mailingList>
+      <name>User mailing list</name>
+      <subscribe>[email protected]</subscribe>
+      <unsubscribe>[email protected]</unsubscribe>
+      <post>[email protected]</post>
+      
<archive>http://mail-archives.apache.org/mod_mbox/lucene-tika-user/</archive>
+      <otherArchives>
+        
<otherArchive>http://www.mail-archive.com/[email protected]/</otherArchive>
+      </otherArchives>
+    </mailingList>
+  </mailingLists>
+
+  <developers>
+    <developer>
+      <name>Rida Benjelloun</name>
+      <id>ridabenjelloun</id>
+      <email>[email protected]</email>     
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Keith Bennett</name>
+      <id>kbennett</id>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Mark Harwood</name>
+      <id>mharwood</id>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Chris A. Mattmann</name>
+      <id>mattmann</id>
+      <email>[email protected]</email>
+      <url>http://people.apache.org/~mattmann/</url>
+      <organization>NASA Jet Propulsion Laboratory</organization>
+      <organizationUrl>http://www.jpl.nasa.gov</organizationUrl>
+      <timezone>-8</timezone>
+      <properties/>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Dave Meikle</name>
+      <id>dmeikle</id>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Sami Siren</name>
+      <id>siren</id>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Jukka Zitting</name>
+      <id>jukka</id>
+      <roles>
+        <role>committer</role>
+      </roles>
+    </developer>
+  </developers>
+  <contributors>
+    <contributor>
+      <name>Doug Cutting</name>
+      <roles>
+        <role>mentor</role>
+      </roles>
+    </contributor>
+    <contributor>
+      <name>Bertrand Delacretaz</name>
+      <roles>
+        <role>mentor</role>
+      </roles>
+    </contributor>
+    <contributor>
+      <name>Niall Pemberton</name>
+      <roles>
+        <role>emeritus</role>
+      </roles>
+    </contributor>
+  </contributors>
+
   <dependencyManagement>
     <dependencies>
       <dependency>
-        <groupId>commons-lang</groupId>
-        <artifactId>commons-lang</artifactId>
-        <version>2.1</version>
-        <optional />
-      </dependency>
-      <dependency>
-        <groupId>commons-logging</groupId>
-        <artifactId>commons-logging</artifactId>
-        <version>1.0.4</version>
-      </dependency>
-      <dependency>
-        <groupId>commons-io</groupId>
-        <artifactId>commons-io</artifactId>
-        <version>1.4</version>
-      </dependency>
-      <dependency>
-        <groupId>pdfbox</groupId>
-        <artifactId>pdfbox</artifactId>
-        <version>0.7.3</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.poi</groupId>
-        <artifactId>poi</artifactId>
-        <version>3.5-beta5</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.poi</groupId>
-        <artifactId>poi-scratchpad</artifactId>
-        <version>3.5-beta5</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.poi</groupId>
-        <artifactId>poi-ooxml</artifactId>
-        <version>3.5-beta5</version>
-        <exclusions>
-          <exclusion>
-            <groupId>stax</groupId>
-            <artifactId>stax-api</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-stax-api_1.0_spec</artifactId>
-        <version>1.0</version>
-      </dependency>
-      <dependency>
-        <groupId>net.sourceforge.nekohtml</groupId>
-        <artifactId>nekohtml</artifactId>
-        <version>1.9.9</version>
-      </dependency>
-      <dependency>
-        <groupId>com.ibm.icu</groupId>
-        <artifactId>icu4j</artifactId>
-        <version>3.8</version>
-      </dependency>
-      <dependency>
-        <groupId>asm</groupId>
-        <artifactId>asm</artifactId>
-        <version>3.1</version>
-      </dependency>
-      <dependency>
-        <groupId>log4j</groupId>
-        <artifactId>log4j</artifactId>
-        <version>1.2.14</version>
-      </dependency>
-      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>3.8.1</version>
-        <type>jar</type>
         <scope>test</scope>
       </dependency>
     </dependencies>

Modified: lucene/tika/trunk/tika-parsers/pom.xml
URL: 
http://svn.apache.org/viewvc/lucene/tika/trunk/tika-parsers/pom.xml?rev=777613&r1=777612&r2=777613&view=diff
==============================================================================
--- lucene/tika/trunk/tika-parsers/pom.xml (original)
+++ lucene/tika/trunk/tika-parsers/pom.xml Fri May 22 16:43:52 2009
@@ -32,58 +32,73 @@
     <relativePath>../tika-parent/pom.xml</relativePath>
   </parent>
 
-  <groupId>org.apache.tika</groupId>
   <artifactId>tika-parsers</artifactId>
-  <version>0.4-SNAPSHOT</version>
-
   <name>Apache Tika parsers</name>
 
+  <properties>
+    <poi.version>3.5-beta5</poi.version>
+  </properties>
+
   <dependencies>
     <dependency>
-      <groupId>org.apache.tika</groupId>
+      <groupId>${project.groupId}</groupId>
       <artifactId>tika-core</artifactId>
-      <version>0.4-SNAPSHOT</version>
+      <version>${project.version}</version>
     </dependency>
     <dependency>
       <groupId>pdfbox</groupId>
       <artifactId>pdfbox</artifactId>
+      <version>0.7.3</version>
     </dependency>
     <dependency>
       <groupId>org.apache.poi</groupId>
       <artifactId>poi</artifactId>
+      <version>${poi.version}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.poi</groupId>
       <artifactId>poi-scratchpad</artifactId>
+      <version>${poi.version}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.poi</groupId>
       <artifactId>poi-ooxml</artifactId>
+      <version>${poi.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>stax</groupId>
+          <artifactId>stax-api</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+      <version>1.0</version>
     </dependency>
     <dependency>
       <groupId>net.sourceforge.nekohtml</groupId>
       <artifactId>nekohtml</artifactId>
+      <version>1.9.9</version>
     </dependency>
     <dependency>
       <groupId>com.ibm.icu</groupId>
       <artifactId>icu4j</artifactId>
+      <version>3.8</version>
     </dependency>
     <dependency>
       <groupId>asm</groupId>
       <artifactId>asm</artifactId>
+      <version>3.1</version>
     </dependency>
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
+      <version>1.2.14</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <type>jar</type>
       <scope>test</scope>
     </dependency>
   </dependencies>

Modified: 
lucene/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/AutoDetectParserTest.java
URL: 
http://svn.apache.org/viewvc/lucene/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/AutoDetectParserTest.java?rev=777613&r1=777612&r2=777613&view=diff
==============================================================================
--- 
lucene/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/AutoDetectParserTest.java
 (original)
+++ 
lucene/tika/trunk/tika-parsers/src/test/java/org/apache/tika/parser/AutoDetectParserTest.java
 Fri May 22 16:43:52 2009
@@ -19,13 +19,10 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.commons.lang.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang.builder.ToStringStyle;
 import org.apache.tika.exception.TikaException;
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.sax.BodyContentHandler;
 import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
 
 import junit.framework.TestCase;
 
@@ -120,7 +117,7 @@
 //        assertAutoDetect(resource, null, type, null,          content);
 //        assertAutoDetect(resource, null, type, wrongMimeType, content);
 
-        final String badResource = "a.xyz";
+//        final String badResource = "a.xyz";
 //        assertAutoDetect(resource, badResource, type, type,          
content);
 //        assertAutoDetect(resource, badResource, type, null,          
content);
 //        assertAutoDetect(resource, badResource, type, wrongMimeType, 
content);
@@ -217,20 +214,22 @@
         /**
          * Produces a string like the following:
          *
-         * org.apache.tika.parser.autodetectparsertest$testpar...@8fff06[
-         *   resourceRealName=/test-documents/testEXCEL.xls
-         *   resourceStatedName=<null>
-         *   realType=application/vnd.ms-excel
-         *   statedType=<null>
-         *   expectedContentFragment=Sample Excel Worksheet
-         * ]
-         *
-         * @return
+         * <pre>
+         * Test parameters:
+         *   resourceRealName        = /test-documents/testEXCEL.xls
+         *   resourceStatedName      = null
+         *   realType                = application/vnd.ms-excel
+         *   statedType              = null
+         *   expectedContentFragment = Sample Excel Worksheet
+         * </pre>
          */
-
         public String toString() {
-            return ReflectionToStringBuilder.toString(
-                    this, ToStringStyle.MULTI_LINE_STYLE);
+            return "Test parameters:\n"
+                + "  resourceRealName        = " + resourceRealName + "\n"
+                + "  resourceStatedName      = " + resourceStatedName + "\n"
+                + "  realType                = " + realType + "\n"
+                + "  statedType              = " + statedType + "\n"
+                + "  expectedContentFragment = " + realType + "\n";
         }
     }
 }


Reply via email to