-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with Script Execution #53
Comments
It looks like maybe you're using a class called |
I also have an issue when I am trying to import and external class. I described the problem here: http://stackoverflow.com/questions/36471417/ Is there anything that I missed , or is there a way to setup a classpath for loading the classes outside the main script ? |
I'm not sure you're both talking about the same issue. Are you both talking about importing a class from another Groovy script? A class from your project? Or a class from a dependency? If you're talking about importing from another Groovy script, how did you include the dependent script in the scrip that needs it? With something like |
@keeganwitt , correct and thank you. I implemented the GroovyClassLoader()... and managed to split my single groovy script into separate classes. |
@keeganwitt in general I have a folder with several groovy classes on a server. Those classes are used inside a small groovy script, which I implemented via the script tag. I already tried your solution, but it just post pones the problem. Since the different classes are using each other. |
@Fallout86 Are those classes compiled sources in your GMavenPlus project? |
@keeganwitt In this project yes, but in general they are stored on a server and used during the deploy phase. Here is the code snippet with gmaven: `
` I hope this helps a bit more to understand my problem |
groovy-maven-plugin is not GMavenPlus, it's GMaven. Also, it looks like you're not compiling these sources, just executing them. If that's the case, then the method I described to dawez should work for you also. |
I think we can close this thread since we have #54 to track the remaining idea. Feel free to reopen if you disagree. |
@keeganwitt
Hi,
I'm trying to to run a script inside the script tag, which in general works, but inside the script I try to invoke a method of a different Groovy Class. I get the following error:
Error occurred while calling a method on a Groovy class from classpath. InvocationTargetException: No such property: Eclipse for class: Script1
With the old Gmaven Plugin I could just use the scriptpath Tag to load all the Groovy Classes of one folder. Is there any equivalent for your plugin?
The text was updated successfully, but these errors were encountered: