简体   繁体   中英

Why doesn't the dependency contain a jar in the maven public repository https://mvnrepository.com?

I a maven rookie and am wondering how to get a binary jar file if it is not already in the repo. Specifically i'm in need of: jackson-dataformats-text-2.13.0.jar. Do I need to build it myself? I'm used to creating a project and marking a library as a dependency and seeing the jar downloaded into my .m2 cache but all i see in my cache is:

jchan@jchan-Z170N:~/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformats-text/2.13.0$ ls
jackson-dataformats-text-2.13.0.jar.lastUpdated  jackson-dataformats-text-2.13.0.pom.sha1
jackson-dataformats-text-2.13.0.pom              _remote.repositories

Can someone advise how I am to get a built version of the jar from maven central?

We are still maintaining our ant build and I need the jar file for this. (i know i know, ancient stuff but team is not ready to port just yet).

parent pom don't contain jar file

This is the reason why no bundle link is present on the official public maven repository https://mvnrepository.com

The maven dependency is not a jar, is a parent. So the extension is: .pom which is just a plain pom.xml

Parent dependencies don't contain compiled class like .jar.

行家

In your specific case, there are another dependencies who contains jars:

advice

Check what classes do you need on your ant project and search if exist a jar (with the classes you need) on https://mvnrepository.com

Another option is to get all the dependencies from pom : https://repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformats-text/2.9.0/jackson-dataformats-text-2.9.0.pom and download them into your ant project. In theory is the same of add the parent pom in a maven project

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM