-
Task
-
Resolution: Not A Defect
-
Blocker
-
None
I have developed groovy classes in IntelliJ IDE, I want to instantiate one of these classes in 'Pipeline script' of Pipeline plugin in Jenkins. I tried to follow the examples of 'Eval.me' and class.forName
Sample package com.mycomp.tmo /** * Created by */ public void callMe(){ println("Hello World !") } def e = "callMe" def cl = Class.forName("com.mycomp.tmo.Sample") println(Eval.me("${c1} (${e})"))
Tried Below as well:
String cls = 'D:\\Users\\b\\IdeaProjects\\Automation\\src\\com\\mycomp\\tmo\\DBConnectionManager' def map = ['person': ${cls}] map['person'].newInstance()
String cls = 'D:\\Users\\b\\IdeaProjects\\Automation\\src\\com\\mycomp\\tmo\\DBConnectionManager' def map = ['person': ${cls}] map['person'].newInstance()