Hi Keith,

Simply put, it's because you were accidentally looking in the wrong 
pom.xml :)  There's many of them sprinkled through the DSpace codebase, 
and they all inherit many of their settings from one main pom.xml.

So, you noticed that the 'dspace-api/pom.xml' file included a dependency 
for "poi".   But, if you look closely, that dependency doesn't list a 
<version>.  This is because, for DSpace, we manage all the versions of 
dependencies in one parent pom.xml (which is loaded via the <parent> tag 
within the dspace-aip/pom.xml).

Now, take a look at the [dspace-src]/pom.xml. This is the main Parent 
pom.xml for dspace (with an artifactid of 'dspace-parent')

http://scm.dspace.org/svn/repo/dspace/trunk/pom.xml

This is the pom.xml which actually lists the versions of every 
dependency used by the various APIs of DSpace.  If you search in this 
pom.xml, you'll find this entry:

<dependency>
     <groupId>poi</groupId>
     <artifactId>poi</artifactId>
     <version>2.5.1-final-20040804</version>
</dependency>

That's where the 2.5.1 version is sneaking in.  If you make your 
necessary changes to this pom.xml, everything should act as you expect 
it to. So, just undo your changes in 'dspace-src/dspace-api/pom.xml', 
and instead make those changes to 'dspace-src/pom.xml'

I hope that helps!

- Tim

On 10/5/2010 2:36 PM, Keith Gilbertson wrote:
> Hi,
>
> I've been experimenting with a Media Filter for text extraction from 
> PowerPoint files.  It's based on the Apache POI libraries, as was suggested 
> by others in a previous thread.
>
> It uses the poi, poi-scratchpad, and poi-ooxml artifacts, in version 3.6, the 
> latest release version from Apache.  I haven't done much with Maven, and am 
> not sure how to tell it which libraries I need.
>
> This bit was already in the dspace-api/pom.xml file:
>         <dependency>
> -<groupId>poi</groupId>
> -<artifactId>poi</artifactId>
> -</dependency>
>
>
> I removed it, because I wanted the latest version of the libraries.  Then, I 
> added these dependencies to the bottom of the file:
>
> +<dependency>
> +<groupId>org.apache.poi</groupId>
> +<artifactId>poi</artifactId>
> +<version>3.6</version>
> +</dependency>
> +<dependency>
> +<groupId>org.apache.poi</groupId>
> +<artifactId>poi-scratchpad</artifactId>
> +<version>3.6</version>
> +</dependency>
> +<dependency>
> +<groupId>org.apache.poi</groupId>
> +<artifactId>poi-ooxml</artifactId>
> +<version>3.6</version>
> +</dependency>
>
> Somehow Maven magically found the correct versions of the dependencies, and 
> everything built fine.  When I deployed DSpace and looked in the lib 
> directory, there were two versions of the main poi library there:
>
> poi-2.5.1-final-20040804.jar
> poi-3.6.jar
> poi-ooxml-3.6.jar
> poi-ooxml-schemas-3.6.jar
> poi-scratchpad-3.6.jar
>
> I couldn't figure out why the poi-2.5.1 version was still there, or find 
> anything that actually used it.  So, in the interest of doing some quick 
> testing, I just deleted it.
>
> Can someone give a hand on how to do this properly?  I'm trying to tell the 
> build process to find and use only version 3.6 of poi.
>
> Thank you!
> --keith
>
>
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2&  L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to