Hey Dave,
You could manually add it into the POM and the import it into your mave repo using the "mvn install:install-file" command
Cheers,
-V--On Mon, Mar 3, 2008 at 3:42 AM, David Pollak <feeder.of...@gmail.com> wrote:
Folks,
I've got a JAR file that I want to access and it's not in the maven repository. Where can I put the JAR in my project such that it's found during an Maven compile/install?
Thanks,
David
PS src/main/webapp/WEB-INF/lib didn't work
--
lift, the secure, simple, powerful web framework http://liftweb.net
Collaborative Task Management http://much4.us
_____________________________________
/ \
/lift/ committer (www.liftweb.net)
SGS member (Scala Group Sweden)
SEJUG member (Swedish Java User Group)
\_____________________________________/
You just have to remember to install-file it again if you wipe out ~/.m2.
There must be a better way, I would imagine.
Steve
I agree it is lot of more work (the first time), but there is some advantages :
* you could define the exact scope for the lib in your pom (compile, test, runtime, provided)
* if the lib has dependencies, you could create a custom pom for the lib with its dependencies without the need to pollute your project's pom.xml with its dependencies
* you could add information to the lib (name, url,...) => shown in the dependencies report of your project
Notes:
* both solutions (embedded repo and system scope) should only be used for application (or lib) that you don't plan to deploy to a repository, else when user will download your stuff from the repo
there will be missing dependencies. (=> ok for war, and for dependencies in provided/test scope)
* for the full list of option of "mvn install:install-file", see http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html#localRepositoryPath
/davidB
David Pollak wrote:
> Worked like a charm!
>
> Thanks!
>
> Brendan Grainger wrote:
>> Hi David,
>>
>> Does this help:
>>
>> * **<**dependency**>*
>> * **<**groupId**>**whatever.you.want.to.call.it**</**groupId**>*
>> *
>> **<**artifactId**>**whatever.you.want.to.call.it**</**artifactId**>*
>> * **<**version**>**1.0-SNAPSHOT**</**version**>*
>> * <scope>system</scope>*
>> * <!-- personally I normally just have a lib dir for this, but
>> you might want to make it*
>> * **${basedir}/s**rc/main/webapp/WEB-INF/lib -->*
>> * <systemPath>${basedir}/path/to/your/jar/jar_name.jar</systemPath>*
>> * **</**dependency**>*
>>
>> Regards
>> Brendan
>>
>>
>> On Mar 2, 2008, at 11:29 PM, Steve Jenson wrote:
>>
>>>
>>> I do this on my project currently with a jar. I have the other
>>> developer mvn install:install-file it as well. It's one command and,
>>> sadly, is the best I could come up with.
>>>
>>> You just have to remember to install-file it again if you wipe out ~/.m2.
>>>
>>> There must be a better way, I would imagine.
>>>
>>> Steve
>>>
>>> On Sun, Mar 2, 2008 at 8:03 PM, David Pollak
>>> <feeder.of...@gmail.com
>>> <mailto:feeder.of...@gmail.com>> wrote:
>>>>
>>>>
>>>>
>>>> On 3/2/08, Viktor Klang <viktor...@gmail.com
>>>> <mailto:viktor...@gmail.com>> wrote:
>>>>> Hey Dave,
>>>>>
>>>>> You could manually add it into the POM and the import it into your mave
>>>> repo using the "mvn install:install-file" command
>>>>
>>>> Except then it wouldn't build on anyone else's machine.
>>>>
>>>>> Cheers,
>>>>> -V
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Mar 3, 2008 at 3:42 AM, David Pollak
>>>> <feeder.of...@gmail.com
>>>> <mailto:feeder.of...@gmail.com>> wrote:
>>>>>
>>>>>> Folks,
>>>>>>
>>>>>> I've got a JAR file that I want to access and it's not in the maven
>>>> repository. Where can I put the JAR in my project such that it's found
>>>> during an Maven compile/install?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> David
>>>>>>
>>>>>> PS src/main/webapp/WEB-INF/lib didn't work
>>>>>>
>>>>>>
>>>>>> --
>>>>>> lift, the secure, simple, powerful web framework http://liftweb.net
>>>>>> Collaborative Task Management http://much4.us
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> _____________________________________
>>>>> / \
>>>>> /lift/ committer (www.liftweb.net <http://www.liftweb.net>)