'Can I add external jar present in lib>jars folder using Gradle wrapper?
I was successful in running TestNG(7.5) using Gradle but when I use Gradle wrapper then its giving error because it could not detect external Jars when using gradlew test
##TestNG run using Gradle##
build.gradle
apply plugin: 'java'
version = '1.0'
repositories {
}
dependencies {
runtimeOnly fileTree('lib/jars') { include '*.jar' }
}
test {
useTestNG(){
suites 'testngXML/testng.xml'
}
}
###gradle-wrapper.properties###
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
##Running testng with gradle wrapper##
###gradle-wrapper.properties###
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=file\:///C:/Users/xxx/.gradle/wrapper/dists/gradle-4.8.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|