gradle Could not resolve: org.quickfixj:quickfixj-core

  Kiến thức lập trình

My build.gradle looks like this

plugins {
  id 'java'
  id 'eclipse'
}

def quickfixVersion = "2.1.1"

repositories {
    mavenCentral()
    maven {
        url "http://repo.marketcetera.org/maven"
    }
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    group = 'fix'
    description = 'fix api'

    implementation 'org.quickfixj:quickfixj-core:${quickfixVersion}'
    implementation 'org.quickfixj:quickfixj-msg-fix42:${quickfixVersion}'

    implementation 'org.apache.mina:mina-core:2.1.2'
    implementation 'org.slf4j:slf4j-api:1.6.3'
    implementation 'org.slf4j:slf4j-jdk14:1.6.3'

    implementation 'com.google.code.gson:gson:2.8.6'

    implementation 'com.squareup.okhttp:okhttp:2.7.5'
    implementation 'org.projectlombok:lombok:1.16.10'
    implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.3'

    testImplementation 'junit:junit:4.12'
}

test {
  useJUnitPlatform()
}

compileTestJava {
  // exclude 'fix/FixTest.java'
}

when I refresh the Gradle project it gets all dependencies except for QuickFixJ with error:

Could not resolve: org.quickfixj:quickfixj-core:${quickfixVersion}
Could not resolve: org.quickfixj:quickfixj-msg-fix42:${quickfixVersion}

8

The answer was to use

repositories { mavenCentral() }

and

compile group: 'org.quickfixj', name: 'quickfixj-core', version: '2.1.0'
compile group: 'org.quickfixj', name: 'quickfixj-messages-fix42', version: '2.1.0'

instead of the implementation command in build.gradle

LEAVE A COMMENT