← Back to team overview

dhis2-devs team mailing list archive

Re: JAR File and External Dependency in POM

 

Hi Lars,

Thanks for replying sooner mail.

You can see the example as below:

This is the dependency in Excel Reporting module:

*<dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>3.5-FINAL</version>
</dependency>*


Yup, maybe you have been seen this dependency before. If we use maven to
build this so after downloaded the package as
*poi-ooxml**-3.5-FINAL**.jar*Maven will automatically download another
package is that
*ooxml-schemas-1.0.jar *with over *14MB

*Because* poi-ooxml-3.5-FINAL* has got a pom file with structure like this:

*  <dependencies>
    <dependency>
       <groupId>org.apache.poi</groupId>
       <artifactId>poi</artifactId>
       <version>3.5-FINAL</version>
    </dependency>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>ooxml-schemas</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>dom4j</groupId>
        <artifactId></artifactId>
        <version>1.6.1</version>
    </dependency>
  </dependencies>
*

You can see the highlight dependency as above.

Thanks !

On Mon, Dec 21, 2009 at 5:45 PM, Lars Helge Øverland <larshelge@xxxxxxxxx>wrote:

>
>
> On Mon, Dec 21, 2009 at 11:36 AM, Hieu Dang Duy <
> hieu.hispvietnam@xxxxxxxxx> wrote:
>
>> 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 !
>>
>
> Hi Hieu,
>
> you can either
>
> - use a system dependency and include the jar directly in the source code:
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#System_Dependencies
>
> - if you need it in a web module you can put it under /WEB-INF/lib
>
> - we can create a mvn project out of it and upload it to the dhis2 maven2
> repository.
>
>
> BUT we really try to avoid using JAR dependencies which are not in the
> Maven repository. What JAR file are we talking about here?
>
> Lars
>



-- 
Hieu.HISPVietnam
Good Health !

Follow ups

References