Fix classpath
This commit is contained in:
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@@ -3,14 +3,19 @@ pipeline {
|
||||
stages {
|
||||
stage('Compile'){
|
||||
steps {
|
||||
|
||||
sh "mkdir -p bin"
|
||||
sh "/tool/jdk1.6.0_45/bin/javac -target 1.5 -cp /tool/junit4/\* -d bin \$(find ./src/* | grep .java)"
|
||||
sh '''
|
||||
CP=$(find /tool/junit4 -name "*.jar" | tr \'\\n\' \':\')
|
||||
/tool/jdk1.6.0_45/bin/javac -target 1.5 -cp $CP -d bin \$(find ./src/* | grep .java)
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Test'){
|
||||
steps {
|
||||
sh '''
|
||||
find bin/test -name "*.class" | sed \'s/bin\\///\' | sed \'s/\\.class//\' | tr \'/\' \'.\' | xargs -I {} java -cp ./bin:/tool/junit4/\\\\* org.junit.runner.JUnitCore {}
|
||||
CP=$(find /tool/junit4 -name "*.jar" | tr \'\\n\' \':\')
|
||||
find bin/test -name "*.class" | sed \'s/bin\\///\' | sed \'s/\\.class//\' | tr \'/\' \'.\' | xargs -I {} java -cp ./bin:$CP org.junit.runner.JUnitCore {}
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user