← Back to team overview

dhis2-devs team mailing list archive

Re: JAR File and External Dependency in POM

 

The suggestions by both Lars and Saptarshi might help ... but why you wanted
to do it through jar?

You said you only have few classes, so my suggestion would be - to put then
in either support-system or options. In fact we could suggest a better
location if you could tell us what these classes are doing?

Thank you,
Abyot.

On Mon, Dec 21, 2009 at 11:55 AM, Saptarshi Purkayastha <sunbiz@xxxxxxxxx>wrote:

> There are a few ways to do it, although I would avoid putting more
> libraries into trunk without a lot of contemplation
>
> Anyways, the steps follow (using the normal Java pattern of things, don't
> know if DHIS2 follows a different style) :
> 1.) Place the lib jar into: <project>/src/main/webapp/WEB-INF/lib/mylib.jar
> 2.) add the dependency (mylib.jar) into pom.xml as follows:
> <dependency>
>       <groupId>mylib</groupId>
>       <artifactId>mylib</artifactId>
>       <version>0.1.0</version>
>       <scope>system</scope>
>
>  <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/mylib-0.1.0.jar</systemPath>
> </dependency>
>
> Hope that helps
>
> ---
> Regards,
> Saptarshi PURKAYASTHA
> Director R & D, HISP India
> Health Information Systems Programme
>
> My Tech Blog:  http://sunnytalkstech.blogspot.com
> You Live by CHOICE, Not by CHANCE
>
>
> 2009/12/21 Hieu Dang Duy <hieu.hispvietnam@xxxxxxxxx>
>
>> Dear all,
>>
>> I've got one jar file how can I embed this into DHIS2 resource with using
>> dependency in pom.xml ?
>> Anyway, If I have got a few of classes. So how can I make an external
>> dependency in pom.xml file ?
>>
>> Can someone show me that way in step by step ?
>>
>> Thank you all so much !
>>
>> --
>> Hieu.HISPVietnam
>> Good Health !
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
> More help   : https://help.launchpad.net/ListHelp
>
>

References