Top "Groovy" questions

Groovy is an object-oriented programming language for the Java platform.

Hibernate: Automatically creating/updating the db tables based on entity classes

I have the following entity class (in Groovy): import javax.persistence.Entity import javax.persistence.Id import javax.persistence.GeneratedValue …

java mysql hibernate jpa groovy
How do I get the output of a shell command executed using into a variable from Jenkinsfile (groovy)?

I have something like this on a Jenkinsfile (Groovy) and I want to record the stdout and the exit code …

groovy jenkins-pipeline
Converting a string to int in Groovy

I have a String that represents an integer value and would like to convert it to an int. Is there …

groovy
Groovy executing shell commands

Groovy adds the execute method to String to make executing shells fairly easy; println "ls".execute().text but if an …

groovy
Gradle does not find tools.jar

I am using javadoc doclets with gradle, so I need to use the package tools.jar, which is in the …

java gradle groovy build
How to read a file in Groovy into a string?

I need to read a file from the file system and load the entire contents into a string in a …

file groovy
How can I trigger another job from a jenkins pipeline (jenkinsfile) with GitHub Org Plugin?

How can I trigger build of another job from inside the Jenkinsfile? I assume that this job is another repository …

jenkins groovy jenkins-workflow jenkins-pipeline
Splitting String with delimiter

I am currently trying to split a string 1128-2 so that I can have two separate values. For example, value1: 1128 …

string groovy split
Groovy - How to compare the string?

how to compare the string which is passed as a parameter the following method is not working. String str = "saveMe" …

groovy
How to check if element in groovy array/hash/collection/list?

How do I figure out if an array contains an element? I thought there might be something like [1, 2, 3].includes(1) which …

arrays list groovy