문제

Library depends on library, which missing in maven central (error 404 missing library). I tired to download the same library from an external source and placed into local Maven Repository, but it's not working. How can I solve this problem?

The following artifacts could not be resolved: javax.media:jai-core:jar:1.1.3, com.sun.media:jai-codec
:jar:1.1.3: Failure to find javax.media:jai-core:jar:1.1.3 in http://repo.maven.
apache.org/maven2 was cached in the local repository, resolution will not be rea
ttempted until the update interval of central has elapsed or updates are forced

If I adds these libraries in pom of my project(just for testing local repo), it's ok (from local repo). Problem, that another library depends on them. My pom.xml:

        <dependency>
            <groupId>de.intarsys.opensource</groupId> //lib in maven central
            <artifactId>jPodRenderer</artifactId>     //depends on libs below
            <version>5.5.1</version>
        </dependency>
        <dependency>
            <groupId>javax.media</groupId>      //in local repo
            <artifactId>jai_core</artifactId>
            <version>1.1.3</version>
        </dependency>
        <dependency>
            <groupId>com.sun.media</groupId>    //in local repo
            <artifactId>jai_codec</artifactId>
            <version>1.1.3</version>
        </dependency>
도움이 되었습니까?

해결책 4

Make sure that the version of jar file you download has the same version with the file in pom.xml. Make sure that you put the jar file in the correct directory.

다른 팁

Can you just try it out. I'm not sure I understood your question.

Pom.xml

<dependency>
 <groupId>com.sun.media</groupId>    //in local repo
 <artifactId>jai_codec</artifactId>
 <version>1.1.3</version>
</dependency>
<dependency>
 <groupId>javax.media</groupId>
 <artifactId>jai_core</artifactId>
 <version>1.1.3</version>
</dependency>
<dependency>
 <groupId>de.intarsys.opensource</groupId>
 <artifactId>iscwt</artifactId>
 <version>5.5</version>
</dependency>

The fastest solution is to add a Maven repository in your project source code. See here for an example on how to add a library to a custom maven repository :

http://david-codes.blogspot.com/2014/03/maven-add-custom-repository-in-your.html

There's a difference in the name: maven was searching for jar-core, but you refer to jai_core The first one is available on https://repository.jboss.org/maven2, the second one on maven central https://repo1.maven.org/maven2

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top