使用gradle从Nexus获取oracle JDBC jar

使用gradle从Nexus获取oracle JDBC jar,gradle,nexus,Gradle,Nexus,我看到了这个问题,但似乎没有任何帮助。我会尽我最大的努力让答案更好,并希望给出一个解决方案 在我的build.gradle中的dependencies下,我有: compilefiles('oracle/ojdbc7-12.1.0.2.jar') 我现在所做的是试图从努克斯那里把它拉出来 我在本地gradle.properties添加了用户名和密码,但它提取了所有依赖项,无法从nexus获取所有依赖项,因此失败。我只想用gradle构建拉一个jar(jbdc) 错误如下: > Config

我看到了这个问题,但似乎没有任何帮助。我会尽我最大的努力让答案更好,并希望给出一个解决方案

在我的
build.gradle
中的
dependencies
下,我有:

compilefiles('oracle/ojdbc7-12.1.0.2.jar')

我现在所做的是试图从努克斯那里把它拉出来

我在本地
gradle.properties
添加了用户名和密码,但它提取了所有依赖项,无法从nexus获取所有依赖项,因此失败。我只想用gradle构建拉一个
jar
(jbdc)

错误如下:

> Configure project :api 
init.gradle/NexusRepositoryPlugin:    MavenRepo at https://repo.maven.apache.org/maven2/ removed.
init.gradle/NexusRepositoryPlugin:    __plugin_repository__Gradle Central Plugin Repository kept (not a Maven repository).
init.gradle/NexusRepositoryPlugin:    MavenRepo at https://repo.maven.apache.org/maven2/ removed.
init.gradle/NexusRepositoryPlugin:    BintrayJCenter at https://jcenter.bintray.com/ removed.

* What went wrong:
Could not resolve all dependencies for configuration ':api:detachedConfiguration1'.
> Could not resolve org.springframework.boot:spring-boot-dependencies:2.0.1.RELEASE.
  Required by:
      project :api
   > Could not resolve org.springframework.boot:spring-boot-dependencies:2.0.1.RELEASE.

建议

我对这个问题的理解表明,您正在将公共存储库声明替换为只包含JDBC jar的私有声明


您应该保留公共存储库声明,并添加私有声明。Gradle将在第一时间搜索JDBCJAR并检索它。

您使用的是哪些存储库?只有私人的吗?只有公共的吗?组合?显然,您的项目需要spring启动。为什么您希望Gradle只尝试获取JDBCJAR?此问题缺少有关项目设置的信息,无法提供正确答案。@LouisJacomet它是一个私有nexus repo,不具有所有依赖项。我只需要
jdbc
,仅此而已。