gradle - 使用 gradle 从 Nexus 获取 oracle JDBC jar

标签 gradle nexus

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

在我的 build.gradledependencies 下我有:
compile files('oracle/ojdbc7-12.1.0.2.jar')我手动将jar放在目录中。

我现在正在做的是试图将它从 nuxus 中拉出来。

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

错误在这里:

> 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.

建议?

最佳答案

我对这个问题的理解表明您正在将公共(public)存储库声明替换为仅包含该 JDBC jar 的私有(private)存储库声明。

相反,您应该保留公共(public)存储库声明并添加私有(private)存储库声明。然后 Gradle 将在第一次搜索 JDBC jar 并检索它。

关于gradle - 使用 gradle 从 Nexus 获取 oracle JDBC jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50852509/

相关文章:

maven - 具有Maven,Jenkins,Nexus的基础架构

maven - 如何使用 NEXUS 配置 GITLAB CI?

nexus - 从 Cloudbees 上的 Jenkins 将工件上传到 Nexus

elasticsearch - 获取org.gradle.api.tasks.TaskExecutionException:任务 ':bootRun'的执行失败。添加spring数据 Elasticsearch 能力后的异常

android - 是否可以在Android Studio项目中运行宏?

maven - 非官方迁移 Nexus 2 -> 3 可能用于 Maven Artifact 吗?

java - Jenkins 使用 Deploy to Maven Repository 将 Artifact 部署到 Nexus

java - 如何将类路径条目附加到 list 中?

cassandra - Gradle插件来执行CQL3脚本

Gradle:多项目构建