1

I am using Apache Maven 3.3.9.

I have a jar file (util.jar) I have copied that under (/src/lib/) directory in my project. This jar file is built using Ant that has no jar version number specified in it. I checked MANIFEST.MF and it has the following information:

Manifest-Version: 1.0

Ant-Version: Apache Ant 1.9.7

Created-By: 1.8.0_05-b13 (Oracle Corporation)

Class-Path: ./guava/19.0/guava-19.0.jar ./log4j/1.2.17/log4j-1.2.17.ja r ./joda-time/2.9.4/joda-time-2.9.4.jar

I would like to include this jar file in my Spark project. How do I include that in my pom.xml?

        <dependency>
        <groupId>com.companyname</groupId>
        <artifactId>util</artifactId>
        <version>what to specify here</version>
       </dependency>

    <repository>
        <id>my-local-repo</id>
        <url>file://${basedir}/src/lib/</url>
    </repository>

How do I specify version number since that information is missing in my jar file. If I don't specify version number I get error, that version number is not specified. Is there a way to resolve this?

user3803714
  • 5,269
  • 10
  • 42
  • 61
  • If its a third party jar, it should be available in the public maven repository, whats the jar file name? – Shankar Nov 11 '16 at 02:25
  • also look into this http://stackoverflow.com/questions/1164043/maven-how-to-include-jars-which-are-not-available-in-reps-into-a-j2ee-project – Shankar Nov 11 '16 at 02:28
  • It is not available using Maven repo. Sorry, I will edit the question, it is a file available from some other department in our organization. – user3803714 Nov 11 '16 at 02:29

0 Answers0