Benim build.gradle dosya kurulum var ve projem şimdiye kadar iyi çalışıyor. Sorun şimdi ./gradlew koşmak çalıştırdığınızda, bu hata ile başarısız olan:./gradlew run BUILD FAILED
What went wrong: Execution failed for task ':run'. Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished with non-zero exit value 1
./gradlew build BUILD SUCCESSFULLY, Any clue as to why, Have also tried to check previous thread but all to no avail.Below is my gradle.build file:
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'
mainClassName = 'src.main.java.Functional.TestRun'
repositories {
mavenCentral()
}
sourceSets {
selenium
}
jar {
baseName = 'gs-gradle'
version = '0.1.0'
manifest {
attributes 'Main-Class': 'main.java.Functional.TestRun'
}
}
compileJava {
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
dependencies {
seleniumCompile 'junit:junit:4.11'
seleniumCompile 'org.seleniumhq.selenium:selenium-java:2.45.0'
seleniumCompile 'org.seleniumhq.selenium:selenium-server:2.45.0'
compile fileTree(dir: 'libraries', include: '*.jar')
}
task jettyDaemon(type: org.gradle.api.plugins.jetty.JettyRun) {
daemon = true
}
task selenium(type: Test, dependsOn: jettyDaemon) {
testClassesDir = sourceSets.selenium.output.classesDir
classpath = sourceSets.selenium.runtimeClasspath
}
eclipse {
classpath {
plusConfigurations += configurations.seleniumCompile
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
ERROR:
[email protected]:~/workspace/mainsite_automation$ ./gradlew run
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:run
Error: Could not find or load main class src.main.java.Functional.TestRun
:run FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished
with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --
debug option to get more log output.
BUILD FAILED
Total time: 2.185 secs
Anahtar şu şudur: "Ana sınıf src.main.java.Functional.TestRun bulunamadı veya yüklenemedi". Sınıf yolunda bir sorun mu var? Test dersleri kayıp mı? – diidu