maxmind / MaxMind-DB-Reader-java

Java reader for the MaxMind DB format
https://maxmind.github.io/MaxMind-DB-Reader-java/
Apache License 2.0
114 stars 43 forks source link

Missing SNAPSHOT-Dependency com.fasterxml:oss-parent:pom:28 #25

Closed andre-kornetzky closed 7 years ago

andre-kornetzky commented 7 years ago

I get follow Error Message, when i try to build my project:

Failed to execute goal on project xxx:: Could not resolve dependencies for project xxx: Failed to collect dependencies at com.maxmind.geoip2:geoip2:jar:2.8.0 -> com.maxmind.db:maxmind-db:jar:1.2.1 -> com.fasterxml.jackson.core:jackson-databind:jar:2.9.0-SNAPSHOT: Failed to read artifact descriptor for com.fasterxml.jackson.core:jackson-databind:jar:2.9.0-SNAPSHOT: Failure to find com.fasterxml:oss-parent:pom:28 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

The reason is, that the parent of

    <project>
        <groupId>com.maxmind.db</groupId>
        <artifactId>maxmind-db</artifactId>
        <version>1.2.1</version>
    </project>

is

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

which defines the repo

    <repository>
        <id>sonatype-nexus-snapshots</id>
        <name>Sonatype Nexus Snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>

and so i need a version from jackson, that is official (maven central) not supported yet.

joschi commented 7 years ago

Same problem here.

The problem is that maven will interpret the open version range for jackson-databind very liberally and tries to pull in the 2.9.0-SNAPSHOT version.

Related issue in Maven: https://issues.apache.org/jira/browse/MNG-3092

OutOfBrain commented 7 years ago

Temporary workaround is to exclude the jackson dependency (and provide a different one instead):

        <dependency>
            <groupId>com.maxmind.geoip2</groupId>
            <artifactId>geoip2</artifactId>
            <version>2.8.0</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
oschwald commented 7 years ago

Thanks. I am going to do a release without the version range. I wonder what happened last night that caused this to suddenly become an issue as it has been this way for about a year due to the hard minimum version requirements.

oschwald commented 7 years ago

maxmind-db 1.2.2 and geoip2 2.8.1 have been released, which should fix this issue.

joschi commented 7 years ago

@oschwald Thanks a lot!