Hi Kevan,

Am 16.03.2011 17:08, schrieb Kevan Miller:
Is there a way to get around having to add commons-fileupload and commons-io to 
 WebContent/WEB-INF/lib/ at all? I tried adding a dependency to the deployment 
plan

<dep:dependencies>
  <dep:dependency>
    <dep:groupId>commons-fileupload</dep:groupId>
    <dep:artifactId>commons-fileupload</dep:artifactId>
    <dep:version>1.1.1</dep:version>
    <dep:type>jar</dep:type>
  </dep:dependency>
  <dep:dependency>
    <dep:groupId>commons-io</dep:groupId>
    <dep:artifactId>commons-io</dep:artifactId>
    <dep:version>1.2</dep:version>
    <dep:type>jar</dep:type>
  </dep:dependency>
</dep:dependencies>

to use the jars that are already on the server (without any jars in 
WebContent/WEB-INF/lib/) but that resulted in the same 
java.lang.ClassNotFoundException

Should that approach work, or should the WAR or EAR always be self-contained 
regarding its dependencies?

You have both hidden-classes and the commons dependencies in your deployment 
plan? I would expect this to work.
you are right - it works. It never occurred to me to actually try setting the dependency and also hiding the packages (the way I read the docs, the <hidden-classes> are for solving issues between different versions of the same library - and since I specifically wanted to use the library provided by geronimo, it didn't occur to me to try).

Thank you very much, this helps me a lot to keep the EAR/WAR small and not have to include jars that I know are already installed on the server.

Martin

--
G & H Softwareentwicklung GmbH    Tel.: {+49|0} 7451 - 53 706 0
Robert-Bosch-Str. 23              Sitz der Gesellschaft: Horb a.N.
D-72160 Horb a.N.                 Amtsgericht Stuttgart HRB 440599
Geschäftsführer:                  Dirk Gfrörer, Martin Hejl

Reply via email to