Thanks John for your reply. Yes problem was with class path. It was picking mine earlier jar. Now problem is solved.

Thanks
Harish


On Apr 21, 2017 9:36 PM, "John Wagenleitner" <john.wagenleitner@gmail.com> wrote:
On Fri, Apr 21, 2017 at 3:17 AM, Harish Dewan <harish.dewan@gmail.com> wrote:
Hi All,
To solve a probable problem, I forked and clone a git repo (https://github.com/apache/groovy.git ) for groovy and then used this tutorial blog to import project in Intelj Idea ide (http://melix.github.io/blog/2014/06/contribute-groovy-ide.html)  

Then I made the required changes in a subproject.
Now I require final jar file to test if mine changes are correct or not.

so I used this command 'gradlew clean dist' in ide which did the build and generated jar in target/libs folder. 

But when I am trying to use that jar , it does not reflects mine changes. Any idea what am I doing wrong.? or what is the correct procedure for creating final jar so that I can test it,
 but still not clear how the final jar is created to test it ? 



The command you ran should have put your changes in subproject/groovy-(module)/target/libs/groovy-(module)-(version).jar and they also should be contained in ./target/libs/groovy-all-(version).jar (uber jar with core and all subprojects).  Maybe it's picking up a different version of groovy from the classpath?

For quickly (5min vs 15min) getting a distribution to test with I like to use the "installGroovy" gradle task which builds a full dist in the "./target/install" directory and from there I can run commands from the bin or add jars from the embeddable (uber jar) or the lib directories.