【问题标题】:How to add external jar files in gradle project inside the netbeans如何在netbeans内的gradle项目中添加外部jar文件
【发布时间】:2015-10-06 22:25:33
【问题描述】:

我创建了在 NetBeans 中运行的 Gradle Web 应用程序。现在我想在其中添加一些外部 jar 文件,那么如何从 NetBeans 添加 jar。

【问题讨论】:

    标签: netbeans jar gradle dependencies


    【解决方案1】:

    修改您的 Gradle 项目以添加您的依赖项并在 NetBeans 中刷新它以获取更改。有很多文档如何做到这一点。例如How to add local .jar file dependency to build.gradle file?

    【讨论】:

      【解决方案2】:

      如果您确实需要从本地目录中获取该 .jar,

      在您的模块 gradle 旁边添加(不是应用程序 gradle 文件):

      repositories {
         flatDir {
             dirs 'libs'
         }
      }
      
      
      dependencies {
         compile name: 'gson-2.2.4'
      }
      

      参考:check here

      【讨论】:

        猜你喜欢
        • 2013-07-15
        • 2023-03-08
        • 2012-07-22
        • 1970-01-01
        • 1970-01-01
        • 2011-01-23
        • 1970-01-01
        • 2020-10-26
        • 2011-01-04
        相关资源
        最近更新 更多