It works! :)
Thank you.

On 1/10/08, Simon Kitching <[EMAIL PROTECTED]> wrote:
>
> ---- Filipe David Manana <[EMAIL PROTECTED]> schrieb:
> > 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?
>
> I believe the "extensions" attribute is intended to make "dynamically
> discoverable" libraries available to maven plugins.
>
> In your case, probably what you want is
>   <scope>provided</scope>
> which tells maven that the jar is needed for compilation and for tests,
> but that the environment the artifact will finally be deployed into already
> provides a copy of this so it should not be in the final bundle.
>
> Or maybe scope "optional" is what you are looking for. Again, optional
> jars are not in the final bundle although they are present in the classpath
> for compile and test phases.
>
> Regards,
> Simon
>
>


-- 
Filipe David Manana,
[EMAIL PROTECTED]

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

Reply via email to