This is where the "fragile" comes in..

In a multi-module build, ${basedir} is the dir of the current build.   
Thus, if you have a jar that is needed by all the submodules, you'd have 
to move it into all the subdirs.   OR define a propery in each module 
that gives it's relative location:
<topdir>../..</topdir>
....
 <url>file://${basedir}/${topdir}/mvn-repo</url>

The next issue is if you do a deploy to maven repo to make your stuff 
available to other maven projects, they'll start trying to find things 
in file://${basedir}/${topdir}/mvn-repo, which, in their project, 
doesn't exist.   Thus, it won't find your dependent jars.

Dan




On Thursday 04 October 2007, Rupert Smith wrote:
> Or to use the jar without uploading...
>
> Put it in a local directory that you check in under svn. In your
> pom.xmlcreate a repository that references it. For example:
>
>     <repositories>
>         <repository>
>             <id>local.repo</id>
>             <name>Local Repository</name>
>             <url>file://${basedir}/mvn-repo</url>
>         </repository>
>     </repositories>
>
> The trick is to use file: in the URL.
>
> Rupert
>
> On 04/10/2007, Rupert Smith <[EMAIL PROTECTED]> wrote:
> > On 03/10/2007, Robert Greig <[EMAIL PROTECTED]> wrote:
> > > On 03/10/2007, Daniel Kulp <[EMAIL PROTECTED]> wrote:
> > > > One of the main points of using maven was to get artifacts into
> > > > the repositories in a way that other USERS can use them with
> > > > their maven builds.
> > >
> > > Other MAVEN USERS presumably.
> > >
> > > > Since you haven't done a release, the artifacts aren't there.
> > > > Once you do the release (providing it's done properly) and
> > > > actually start getting users that want to integrate Qpid into
> > > > their builds,
> > >
> > > this
> > >
> > > > starts becoming increasingly important.
> > >
> > > Are you saying there is no way to use a jar in a maven build that
> > > isn't available on a maven repo? If so that sounds like a pretty
> > > damning indictment of maven.
> > >
> > > RG
> >
> > Its pretty easy really. Create a pom.xml listing the dependencies of
> > the jar, then package it up with you upload request:
> >
> > http://maven.apache.org/guides/mini/guide-central-repository-upload.
> >html
> >
> > Rupert



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to