← Back to team overview

dhis2-devs team mailing list archive

Re: JAR File and External Dependency in POM

 

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
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References