I know using Groovy, Jenkins Pipeline Shared library can be developed.
I want to know if there is any way the same Jenkins pipeline shared library can be developed using Java or any other technology?
I know using Groovy, Jenkins Pipeline Shared library can be developed.
I want to know if there is any way the same Jenkins pipeline shared library can be developed using Java or any other technology?
You build groovy shared library and import your Java library by using Grab. See example how to import yaml library:
@Grab(group = 'org.yaml', module='snakeyaml', version = "1.18")
import org.yaml.snakeyaml.Yaml
Be sure that library jar file in Jenkins classpath. Works for me with Jenkins 2.150.1