首页 文章

Eclipse Luna Gradle Plugin添加了未引用的依赖项

提问于
浏览
0

我正在使用Eclipse Luna和Eclipse Luna的Gradle插件(使用Pivotal的Gradle IDE Pack 3.6.x) . 我用Gradle支持创建了一个简单的Java项目 . 在我的build.gradle下面

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'artifactory'

buildscript {
  repositories {
    maven { url 'http://dl.bintray.com/jfrog/jfrog-jars' }
    mavenCentral()
  }

  dependencies {
    classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.2.4')
  }
}

version = '1.0'

repositories {
  maven { url 'http://maven.restlet.com' }
  mavenCentral()
}

dependencies {
  compile group: 'com.cloudit4', name: 'cit4-util-lib', version: '1.0'
  compile group: 'org.restlet.gae', name: 'org.restlet', version: '2.3.2'
  compile group: 'org.restlet.gae', name: 'org.restlet.ext.servlet', version: '2.3.2'
}

// Artifactory...
artifactory {
  contextUrl = 'http://192.168.245.1:8081/artifactory'   //The base Artifactory URL if not overridden by the publisher/resolver
  publish {
    contextUrl = 'http://192.168.245.1:8081/artifactory'   //The base Artifactory URL for the publisher
    //A closure defining publishing information
    repository {
        repoKey = 'libs-release-local'   //The Artifactory repository key to publish to
        username = 'admin'          //The publisher user name
        password = 'mypass'       //The publisher password
    }
  }
  resolve {
    contextUrl = 'http://192.168.245.1:8081/artifactory'   //The base Artifactory URL for the resolver
    repository {
        repoKey = 'repo'  //The Artifactory (preferably virtual) repository key to resolve from
    }
  }
}

正如您可能注意到的那样,我正在使用Artifactory来托管我自己的工件(本地库,cit4-util-lib) . 通常我使用的是使用Google App Engine库的项目,很多时候我使用grang的appengine插件将其包含在Gradle中 . 但正如您所看到的,这次并非如此 . 所有依赖项都不依赖于Google App Engine库 . 但是当我执行Gradle依赖项刷新时,我的依赖项中包含一个Google App Engine库 . 有人看到过这种行为吗? gradle在哪里寻找要包含在项目中的库?它只是在build.gradle文件中显式设置的依赖项还是更多?预先感谢您的任何帮助 .

问候

马尔科

1 回答

相关问题