You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris Wall <cw...@bea.com> on 2005/08/06 00:35:21 UTC

Adding a local jar to a module's classpath?

Hey there.
 
Using Maven2, how do you add a local jar to a module's build classpath?
 
For instance, a module is dependent upon weblogic.jar.  In the module's
pom.xml, I added the following:
 
<dependency>
  <groupId>weblogic</groupId>
   <artifactId>weblogic</artifactId>
   <version>9.0</version>
   <scope>provided</scope>
</dependency>
 
And I've added weblogic.jar to the following structure:
 
C:\Documents and
Settings\Chris\.m2\repository\weblogic\weblogic\9.0\weblogic.jar
 
Unfortunately "m2 install" produces the following:
 
Downloading:
http://repo1.maven.org/maven2/weblogic/weblogic/9.0/weblogic-9.0.pom
[WARNING] Unable to get resource from repository
http://repo1.maven.org/maven2
[INFO] BUILD FAILURE
 
Appreciate your help.  Thanks.
 
-Chris

Re: Adding a local jar to a module's classpath?

Posted by Trygve Laugstøl <tr...@codehaus.org>.
On Fri, Aug 05, 2005 at 03:35:21PM -0700, Chris Wall wrote:
> Hey there.
>  
> Using Maven2, how do you add a local jar to a module's build classpath?
>  
> For instance, a module is dependent upon weblogic.jar.  In the module's
> pom.xml, I added the following:
>  
> <dependency>
>   <groupId>weblogic</groupId>
>    <artifactId>weblogic</artifactId>
>    <version>9.0</version>
>    <scope>provided</scope>
> </dependency>
>  
> And I've added weblogic.jar to the following structure:
>  
> C:\Documents and
> Settings\Chris\.m2\repository\weblogic\weblogic\9.0\weblogic.jar
>  
> Unfortunately "m2 install" produces the following:
>  
> Downloading:
> http://repo1.maven.org/maven2/weblogic/weblogic/9.0/weblogic-9.0.pom
> [WARNING] Unable to get resource from repository
> http://repo1.maven.org/maven2
> [INFO] BUILD FAILURE

You also need to create a POM to go along with the JAR file. This POM
should at least include any dependencies the JAR has.

--
Trygve