You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Filipe David Manana <fd...@ieee.org> on 2008/01/10 16:51:53 UTC

Maven2 build and package targets' classpath

Hi,

I want to add a JAR archive to the CLASSPATH for the targets build/package.
I don't want to include that JAR archive in my final WAR file. I read the
documentation, and for that purpose I added in my pom.xml the following to
the <build> element:

       <extensions>
          <extension>
                <groupId>oracle</groupId>
                <artifactId>oracle-jdbc</artifactId>
                <version>14</version>
          </extension>
        </extensions>

This artifact was successfully added by me doing:

mvn install:install-file
-Dfile=/opt/oracle/product/10g/jdbc/lib/ojdbc14.jar  -DgroupId=oracle
-DartifactId=oracle-jdbc  -Dversion=14  -Dpackaging=jar


Although when I run "mvn package" or "mvn compile" I get errors telling that
the packages/classes defined in that JAR archive were not found in the
classpath.

How can I achieve this?

Thank you.

-- 
Filipe David Manana,
fdmanana@ieee.org

Obvious facts are like secrets to those not trained to see them.