maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swenson, Eric" <Eric.Swen...@am.sony.com>
Subject RE: local repository relative to top-level pom
Date Fri, 27 Oct 2006 20:28:46 GMT
Hi Wayne,

It is indeed possible to do this.  I just wanted to avoid having to do
anything but "unzip and run maven".  

In fact, the whole way maven deals with dependencies that are NOT in
public repositories and must be installed into a local repository
(install:install-file) to enable a maven build is pretty clunky.  Within
a single organization, of course, one can provide a settings.xml file in
the maven distribution that points to a network-based repository that
contains the "bootstrap" files, but as soon as you hope to distribute
the source code outside of the local area network, there really isn't a
good solution (that I've found).  

What I was hoping was that the "bootstrap" repository could be delivered
with the source tree and a single relative path used at the top-level
pom would define this repository.  I may have no choice but to do what
you suggest -- have each child module's pom redefine the repository
using a relative path based on its own ${basedir}.  It just seemed ugly
to have to define the repository in each pom.

Thanks for your suggestions. -- Eric

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Friday, October 27, 2006 11:00 AM
To: Maven Users List
Subject: Re: local repository relative to top-level pom

Is it not possible to tell your users to edit the pom.xml (or provide
a profile.xml) such that the file:// reference is absolute rather than
relative? This seems to be the simplest way to do it.

Or provide a relative path in each pom perhaps, unsure if this would
work ie child/pom.xml <url>${basedir}/../repository</url>.

Wayne

On 10/27/06, Swenson, Eric <Eric.Swenson@am.sony.com> wrote:
> I'd like to store some bootstrap artifacts (like third party jars) in
> maven2 repository layout structure and deliver this repository with my
> project's sources.  I'd like the top-level project pom to define this
> repository such that all lower-level projects will attempt to retrieve
> resources from this repository.  But I want to refer to the repository
> with a relative path so that everything will work whether the
project's
> source tree is placed. So, for example, I'd like this kind of layout:
>
>
>
>            pom.xml
>
>            repository/
>
>            module1/
>
>            module2/
>
>
>
> And I'd like module1 and module2 to find bootstrap artifacts in the
> "repository" subdirectory of the top-level project.  If I define, in
the
> parent project's pom, something like:
>
>
>
>  <repositories>
>
>    <repository>
>
>      <id>bootstrap</id>
>
>      <name> Bootstrap Repoitory</name>
>
>      <url>file://localhost/${basedir}/repository</url>
>
>    </repository>
>
>  </repositories>
>
>
>
> Things won't work because ${basedir} is evaluated in the context of a
> child module's pom, and will refer to the directory where that child
> module's pom is located.  How can I define the file: URL such that it
> will be valid in all sub-modules?
>
>
>
> -- Eric
>
>
>

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



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


Mime
View raw message