какой репозиторий имеет eXist и как он добавляется в classpath с помощью gradle? - PullRequest
0 голосов
/ 30 января 2020

Нужно импортировать базу данных eXist, а также дополнительные зависимости.

Какие репозитории работают лучше для этих требований?

трассировка стека для сборки:

thufir@dur:~/NetBeansProjects/twitterBaseX$ 
thufir@dur:~/NetBeansProjects/twitterBaseX$ gradle clean build 
> Task :compileJava FAILED                                                        

FAILURE: Build failed with an exception.                                          

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find org.exist-db.thirdparty.com.thaiopensource:jing:20151127.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/exist-db/thirdparty/com/thaiopensource/jing/20151127/jing-20151127.pom
       - https://repo.maven.apache.org/maven2/org/exist-db/thirdparty/com/thaiopensource/jing/20151127/jing-20151127.jar
       - https://mvnrepository.com/org/exist-db/thirdparty/com/thaiopensource/jing/20151127/jing-20151127.pom
       - https://mvnrepository.com/org/exist-db/thirdparty/com/thaiopensource/jing/20151127/jing-20151127.jar
       - https://jcenter.bintray.com/org/exist-db/thirdparty/com/thaiopensource/jing/20151127/jing-20151127.pom
       - https://jcenter.bintray.com/org/exist-db/thirdparty/com/thaiopensource/jing/20151127/jing-20151127.jar
     Required by:
         project : > org.exist-db:exist-core:5.2.0
   > Could not find org.exist-db.thirdparty.javax.xml.xquery:xqjapi:1.0-fr.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/exist-db/thirdparty/javax/xml/xquery/xqjapi/1.0-fr/xqjapi-1.0-fr.pom
       - https://repo.maven.apache.org/maven2/org/exist-db/thirdparty/javax/xml/xquery/xqjapi/1.0-fr/xqjapi-1.0-fr.jar
       - https://mvnrepository.com/org/exist-db/thirdparty/javax/xml/xquery/xqjapi/1.0-fr/xqjapi-1.0-fr.pom
       - https://mvnrepository.com/org/exist-db/thirdparty/javax/xml/xquery/xqjapi/1.0-fr/xqjapi-1.0-fr.jar
       - https://jcenter.bintray.com/org/exist-db/thirdparty/javax/xml/xquery/xqjapi/1.0-fr/xqjapi-1.0-fr.pom
       - https://jcenter.bintray.com/org/exist-db/thirdparty/javax/xml/xquery/xqjapi/1.0-fr/xqjapi-1.0-fr.jar
     Required by:
         project : > org.exist-db:exist-core:5.2.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
2 actionable tasks: 2 executed
thufir@dur:~/NetBeansProjects/twitterBaseX$                                       

это только импорт для exist-db, который, кажется, вызывает проблемы:

/*
 * This file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java project to get you started.
 * For more details take a look at the Java Quickstart chapter in the Gradle
 * User Manual available at https://docs.gradle.org/5.4.1/userguide/tutorial_java_projects.html
 */

plugins {
    // Apply the java plugin to add support for Java
    id 'java'

    // Apply the application plugin to add support for building an application
    id 'application'
}

repositories {
    // Use jcenter for resolving your dependencies.
    // You can declare any Maven/Ivy/file repository here.

    mavenCentral()
    //
    //maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    maven { url "https://mvnrepository.com/" }
    jcenter()
}

dependencies {
    // This dependency is found on compile classpath of this component and consumers.
    implementation 'com.google.guava:guava:27.0.1-jre'

    // Use TestNG framework, also requires calling test.useTestNG() below
    testImplementation 'org.testng:testng:6.14.3'

    compile group: 'org.twitter4j', name: 'twitter4j-core', version: '4.0.1'
    compile group: 'org.basex', name: 'basex', version: '9.2.4'
    compile group: 'net.sf.xmldb-org', name: 'xmldb-api', version: '1.7.0'
    // https://mvnrepository.com/artifact/org.exist-db/exist-core
    compile group: 'org.exist-db', name: 'exist-core', version: '5.2.0'



}

// Define the main class for the application
mainClassName = 'twitterBaseX.App'

test {
    // Use TestNG for unit tests
    useTestNG()
}

, поскольку комментирует, что группа компиляции позволяет чистую сборку. Предположительно, это вопрос правильного добавления репо?

1 Ответ

3 голосов
/ 30 января 2020

Для eXist-db 5.xx вам нужны два репозитория:

  1. Maven Central для самих артефактов eXist-db.
  2. Репозиторий eXist-db (http://repo.evolvedbinary.com/repository/exist-db/) для некоторых сторонних артефактов, которые нельзя опубликовать в Maven Central, поскольку они не соответствуют требованиям для Maven Central.
...