See 
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html.
You most likely need to declare a <scope/> of System along with the
<systemPath/> path to the jar (
${project.basedir}/src/main/webapp/WEB-INF/lib/somejar.jar).

From the above documentation:

Dependencies with the scope system are always available and are not
looked up in repository. They are usually used to tell Maven about
dependencies which are provided by the JDK or the VM. Thus, system
dependencies are especially useful for resolving dependencies on
artifacts which are now provided by the JDK, but where available as
separate downloads earlier. Typical example are the JDBC standard
extensions or the Java Authentication and Authorization Service
(JAAS).

A simple example would be:

<project>
 ...
 <dependencies>
   <dependency>
     <groupId>javax.sql</groupId>
     <artifactId>jdbc-stdext</artifactId>
     <version>2.0</version>
     <scope>system</scope>
     <systemPath>${java.home}/lib/rt.jar</systemPath>
   </dependency>
 </dependencies>
 ...
</project>

If your artifact is provided by the JDK's tools.jar the system path
would be defined as follows:

<project>
 ...
 <dependencies>
   <dependency>
     <groupId>sun.jdk</groupId>
     <artifactId>tools</artifactId>
     <version>1.5.0</version>
     <scope>system</scope>
     <systemPath>${java.home}/../lib/tools.jar</systemPath>
   </dependency>
 </dependencies>
 ...
</project>

On 11/27/06, Daniel Serodio (lists) <[EMAIL PROTECTED]> wrote:
> Hi,
> I try to use Maven2 on an existing J2ee eclipse project. The
> WEB-INF/lib  directory containing the project's libs. how can i
> reference them from within Pom.xml whithout using the
> "<dependency>..my lib </dependency>" for each one of them ( I've got
> around 30 libs !! )
> Hope someone can help me .

If you don't want to specify your dependencies, then Maven is not for you.
Automatic dependency management is one of Maven's biggest features, why
don't
you want to use it?

HTH,
Daniel Serodio


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to