简体   繁体   中英

How do i update the maven local repository, i do not have the download rights

How do i update the maven local repository? if, i do not have the download rights. I have the latest jar files with me. how do i replace the jar files in m2 folder and update the pom file?

I have tried this : You can copy them in your local repository. For example, if you should add this dependency:

   <dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.9.4</version>
</dependency>

You should create folder in your maven local repository: //com//fasterxml//jackson//core//jackson-databind//2.9.4 and put your jar in this folder.

Now getting below error - failed to read artifact descriptor for org selenium selenium selenium -java:jar:3.13.0

You can copy them in your local repository. For example, if you should add this dependency:

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.9.4</version>
    </dependency>

You should create folder in your maven local repository: //com//fasterxml//jackson//core//jackson-databind//2.9.4 and put your jar in this folder.

You probably do not have the whole list of jars with all relevant parent poms, transitive dependencies etc. It is very hard to create a complete list manually. If any dependency of a dependency of a dependency is missing, your project won't compile.

First of all, I would advise you to try to get the "download rights" because using Maven with a bunch of manually deployed jars is very brittle and will take a huge amount of time to get right.

If you cannot get them, you either need to add all jars manually that Maven is missing (like the selenium jar mentioned in your question), or, if you are sure that certain artifacts are not necessary, you can exclude these dependencies in your pom.

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