Gradle equivalent to maven systemPath

岁酱吖の 提交于 2020-01-03 09:05:09

问题


I can't figure out what to put in gradle to satisfy this dependency:

  <dependency>
      <groupId>javax.jnlp</groupId>
      <artifactId>jnlp-api</artifactId>
      <version>8.0</version>
      <scope>system</scope>
      <systemPath>${java.home}/lib/javaws.jar</systemPath>
  </dependency>

回答1:


You can add a dependency on any file within the local filesystem, as:

dependencies {
    compile files("$System.env.JAVA_HOME" + '/lib/javaws.jar')
}

Read about it in the official userguide.



来源:https://stackoverflow.com/questions/37175660/gradle-equivalent-to-maven-systempath

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!