You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Andreas Schaefer <as...@SeeBeyond.com> on 2004/08/09 20:05:20 UTC

Adding dependencies places in a project-local directory

Hi Geeks
 
I just want to discuss this before adding it as an enhancement to the
project.
 
Problem:
Adding project level archives that I want to distribute with the project
and which are not available in the remote repository like JOTM, JAXB etc
through the POM dependencies.
 
Proposed Solution:
Adding a flag telling Maven to load the archive from a given URL:
 
<dependencies>
            <dependency>
                        <groupId>test</groupId>
                        <artifactId>mytest</artifactId>
                        <version>1.2</version>
                        <localCache>file:./lib</localCache>
            </dependency>
</dependencies>
 
Maven would then try to load 'mytest-1.0.jar' from './lib/test/jars/'
directory.
 
So far I had to add this archives manually by using 'maven:addPath' but
I think that declaring it in the POM would make it clearer to the user
and would avoid to hassle for the user to place it manually into the
local repository.
 
What do you think?
 
-Andy

Re: Adding dependencies places in a project-local directory

Posted by Trygve Laugstøl <tr...@ifi.uio.no>.
You can have a remote repository of type "file://" which could point to a
shared filesystem. Another option is use the maven-proxy:

  http://maven-proxy.codehaus.org/

--
Trygve

On Mon, Aug 09, 2004 at 11:05:20AM -0700, Andreas Schaefer wrote:
> Hi Geeks
>  
> I just want to discuss this before adding it as an enhancement to the
> project.
>  
> Problem:
> Adding project level archives that I want to distribute with the project
> and which are not available in the remote repository like JOTM, JAXB etc
> through the POM dependencies.
>  
> Proposed Solution:
> Adding a flag telling Maven to load the archive from a given URL:
>  
> <dependencies>
>             <dependency>
>                         <groupId>test</groupId>
>                         <artifactId>mytest</artifactId>
>                         <version>1.2</version>
>                         <localCache>file:./lib</localCache>
>             </dependency>
> </dependencies>
>  
> Maven would then try to load 'mytest-1.0.jar' from './lib/test/jars/'
> directory.
>  
> So far I had to add this archives manually by using 'maven:addPath' but
> I think that declaring it in the POM would make it clearer to the user
> and would avoid to hassle for the user to place it manually into the
> local repository.
>  
> What do you think?
>  
> -Andy

RE: Adding dependencies places in a project-local directory

Posted by Carlos Sanchez <ap...@carlos.cousas.net>.
Hi,

Don't you use the jar override mechanism?
http://maven.apache.org/reference/user-guide.html#Overriding_Stated_Dependen
cies

Regards

Carlos Sanchez
A Coruña, Spain

Oness Project
http://oness.sourceforge.net
 

> -----Original Message-----
> From: Andreas Schaefer [mailto:aschaefer@SeeBeyond.com] 
> Sent: Monday, August 09, 2004 8:05 PM
> To: dev@maven.apache.org
> Subject: Adding dependencies places in a project-local directory
> 
> Hi Geeks
>  
> I just want to discuss this before adding it as an 
> enhancement to the project.
>  
> Problem:
> Adding project level archives that I want to distribute with 
> the project and which are not available in the remote 
> repository like JOTM, JAXB etc through the POM dependencies.
>  
> Proposed Solution:
> Adding a flag telling Maven to load the archive from a given URL:
>  
> <dependencies>
>             <dependency>
>                         <groupId>test</groupId>
>                         <artifactId>mytest</artifactId>
>                         <version>1.2</version>
>                         <localCache>file:./lib</localCache>
>             </dependency>
> </dependencies>
>  
> Maven would then try to load 'mytest-1.0.jar' from './lib/test/jars/'
> directory.
>  
> So far I had to add this archives manually by using 
> 'maven:addPath' but I think that declaring it in the POM 
> would make it clearer to the user and would avoid to hassle 
> for the user to place it manually into the local repository.
>  
> What do you think?
>  
> -Andy
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org