本文介绍了找不到javax.xml.xquery:xqj-api:1.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

已正确添加 Maven回购,并且是必需的吗?

The maven repo is added correctly, and is required?

如果是,添加xqj的语法是什么?

If so, what's the syntax to add xqj?

例外:

thufir@dur:~/NetBeansProjects/helloWorldBaseX$
thufir@dur:~/NetBeansProjects/helloWorldBaseX$ gradle clean run
> 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 javax.xml.xquery:xqj-api:1.0.
     Searched in the following locations:
       - https://jcenter.bintray.com/javax/xml/xquery/xqj-api/1.0/xqj-api-1.0.pom
       - https://jcenter.bintray.com/javax/xml/xquery/xqj-api/1.0/xqj-api-1.0.jar
       - https://repo.maven.apache.org/maven2/javax/xml/xquery/xqj-api/1.0/xqj-api-1.0.pom
       - https://repo.maven.apache.org/maven2/javax/xml/xquery/xqj-api/1.0/xqj-api-1.0.jar
     Required by:
         project :

* 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 2s
2 actionable tasks: 1 executed, 1 up-to-date
thufir@dur:~/NetBeansProjects/helloWorldBaseX$

构建文件:

/*
 * 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 guide available at https://docs.gradle.org/5.0/userguide/tutorial_java_projects.html
 */

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

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

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

dependencies {
    // This dependency is found on compile classpath of this component and consumers.
    implementation("com.google.guava:guava:26.0-jre")

// https://mvnrepository.com/artifact/org.basex/basex
compile (group= "org.basex", name = "basex" , version = "7.3.1")

compile (group = "javax.xml.xquery" , name = "xqj-api" , version = "1.0")



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

application {
    // Define the main class for the application
    mainClassName = "org.basex.examples.local.App"
}

val test by tasks.getting(Test::class) {
    // Use TestNG for unit tests
    useTestNG()
}

推荐答案

查看此处: https://mvnrepository.com/artifact/javax.xml.xquery/xqj-api/1.0

此模块既不在Maven Central也不在JCenter存储库上托管,但是可以在其他一些存储库中找到,例如: https://mvnrepository.com/repos/springio-plugins-release .

This module is not hosted on Maven central nor JCenter repositories, but it can be found in some other repositories like: https://mvnrepository.com/repos/springio-plugins-release.

如果要向此模块添加依赖项,只需声明一个可用的托管存储库,例如:

If you want to add dependency to this module, just declare one the available hosting repositories, for example:

在Groovy DSL中:

In Groovy DSL:

repositories {
    jcenter()
    mavenCentral()
    maven{
        url "http://repo.spring.io/plugins-release/"
    }
}

编辑(来自下面的评论)

科特林DSL

repositories {
    mavenCentral()
    jcenter()
    maven {
        setUrl("http://repo.spring.io/plugins-release/")
    }
}

这篇关于找不到javax.xml.xquery:xqj-api:1.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 17:31