2

Each time when I'm trying to build the Spring application I got an error:

im@im:~/projects/nsn_maintenance_be/maintenance$ mvn clean install
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building maintenance 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for javax.xml.crypto:xmldsig:jar:1.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.770 s
[INFO] Finished at: 2019-05-22T19:09:32+03:00
[INFO] Final Memory: 11M/211M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project maintenance: Could not resolve dependencies for project com.ia:maintenance:war:1.0-SNAPSHOT: Failure to find javax.xml.crypto:xmldsig:jar:1.0 in http://maven.springframework.org/release was cached in the local repository, resolution will not be reattempted until the update interval of spring-maven-release has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

the pom.xml file (repositories part):

<repositories>
    <repository>
        <id>spring-maven-release</id>
        <name>Spring Maven Release Repository</name>
        <url>http://maven.springframework.org/release</url>
    </repository>
    <repository>
        <id>spring-maven-milestone</id>
        <name>Spring Maven Milestone Repository</name>
        <url>http://maven.springframework.org/milestone</url>
    </repository>
    <repository>
        <id>spring-roo-repository</id>
        <name>Spring Roo Repository</name>
        <url>http://spring-roo-repository.springsource.org/release</url>
    </repository>
</repositories> 

I did some research and fond this lib https://mvnrepository.com/artifact/javax.xml/xmldsig/1.0 instead of javax.xml.crypto:xmldsig:jar:1.0, but I can't cut javax.xml.crypto:xmldsig:jar:1.0 from the repository. The dependencies part in my pom.xml doesn't contain javax.xml.crypto lib.

I guess that the problem is here (in this repository) http://spring-roo-repository.springsource.org/release because it returns:

<Error>
    <Code>NoSuchKey</Code>
    <Message>The specified key does not exist.</Message>
    <Key>release</Key>
    <RequestId>C7A040F5A0227562</RequestId>
    <HostId>uPDsneugMkZ3DgdU5THuUsWdaC/wEkyfgXAUPntzxdcsprT1C6M2eNgK0jo5cr2KLdNAW7uU=
    </HostId>
</Error>

How can I built the application?

Max Gabderakhmanov
  • 912
  • 1
  • 18
  • 36
  • 1
    Try running `mvn dependency:tree` to find out which library is sucking it in – Steve C May 23 '19 at 07:59
  • There is the overview page at mvnrepository but if you select [_Files ... jar_ → 404 Not Found](http://central.maven.org/maven2/javax/xml/xmldsig/1.0/xmldsig-1.0.jar). If you select [_View All_](http://central.maven.org/maven2/javax/xml/xmldsig/1.0/) there are just the POM an its hashes. – Gerold Broser May 23 '19 at 11:12
  • 1
    This is one of those ancient jars that required a licence agreement to be agreed. It became a part of the JDK in Java 6. It disappeared again (with JAX-WS, etc) in the post Java 9 modularisation. Find which of your dependencies is pulling it in and use `... to eliminate it. Please note that [mvnrepository](https://mvnrepository.com) is not an authoritative source. Always use [The Central Repository](https://search.maven.org) for this. – Steve C May 23 '19 at 23:45

0 Answers0