Well that's great and all, but no one mentioned Maven's jar override
feature, which is in the user docs. It sounds like that should be used
here.  Look for the section titled.. "Overriding Stated Dependencies"

-Anthony Vito



On Thu, 2003-08-14 at 18:54, Ben Walding wrote:
> Now Mike, once you've gathered together all the responses, your 
> challenge is to put it all into the wiki in a human digestible form!
> 
> For this, you will be rewarded with many riches (or perhaps just a 
> feeling of oneness with the Maven documentation).
> 
> Start this process at http://wiki.codehaus.org/maven/MailingListSupport
> 
> 
> Cheers,
> 
> Ben
> 
> Colin Sampaleanu wrote:
> 
> > You can do something like this in maven.xml:
> >  <!-- install the xmltypes jar to the local repo, since people using 
> > our main
> >       jar will also need that one -->
> >  <postGoal name="jar:install">
> >    <ant:property name="jardir__" 
> > value="${maven.repo.local}/${pom.artifactDirectory}/jars"/>
> >    <ant:mkdir dir="${jardir__}"/>      <ant:copy
> >      file="${basedir}/lib/core/xmltypes.jar"
> >      
> > tofile="${jardir__}/${pom.artifactId}-xmltypes-${pom.currentVersion}.jar"
> >      overwrite="true"
> >    />
> >  </postGoal>
> >
> > However, whether this is a good idea is another question. In this 
> > case, the jar in question is manually generated from stuff in this 
> > project, so it makes some sense. But if it is just another jar that is 
> > in the local lib dir which is really standalone, and it is not on 
> > ibiblio, then you are probably better off defining another remote repo 
> > which is actually local (alongside ibiblio), and put the jar there. 
> > E.g. in the project.properties:
> >
> > # override remote repo since we want to also point to a cvs based 
> > remote repo
> > # to get some jars not found at ibiblio
> > maven.repo.remote=\
> >    file:${basedir}/../../shared/repository,\
> >    http://www.ibiblio.com/maven
> >
> > Regards,
> > Colin
> >
> >
> > Michael Mills wrote:
> >
> >> After spending a lot of time looking at (what little) documentation
> >> there is and trying out various maven command lines I was wondering how
> >> (other than manually creating the dir in the maven.local.repository) you
> >> get any old jar that is required for a build into your local repository.
> >>
> >> If I have a jar: bob.jar that is currently in the 'lib' folder of my
> >> project, which is currently using ant to build with that path added to
> >> my project.classpath, how do I get bob.jar into my local repository so
> >> that I can add the following to my maven project.xml file and get it to
> >> compile:
> >>
> >>    <dependency>
> >>      <id>bob</id>
> >>      <artifactId>bob</artifactId>
> >>      <version>1.0</version>
> >>      <type>jar</type>
> >>    </dependency>
> >>
> >> I have tried to use the "maven jar:xxx" goals but they don't seem to
> >> work, also "maven repository:xxx" don't work (I have got a local
> >> webserver running and maven.repo.remote=http://localhost stored in
> >> build.properties in the user.profile directory).
> >>
> >> I would have thought that you could cd to the lib folder and execute a
> >> maven command to register bob in the local repository as version 1.0?
> >> This does not seem possible.
> >>
> >> In general I guess I am asking: what process is intended for files that
> >> A, are not open source (i.e. in the standard maven remote repo) or B, do
> >> not have the associated src files (and hence can not be built by a maven
> >> project where you can use "maven jar:install").
> >>
> >> -Mike
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>  
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to