Max Philipp Wriedt commented on TORQUE-361:

I am currently developing a gradle plugin for torque generation. The gradle 
version is 8.0.1

I am using the code from „Running the generator“ converted to Kotlin.

When printing the classpath from systemproperties I only get the 
gradle-launcher.jar. When printing the classpath from contextClassLoader() I 
get the full and correct classpath.

I tried setting the classloader as u described. In my case the GroovyShell 
wasn‘t using it and stayed on the wrong systemproperty class.path.
The TorqueGenerator itself used the UnitDescriptor.classLoader (tested with 
removing the templates, which couldn‘t be found after removing from 

> Groovy can't resolve import from ddl scripts
> --------------------------------------------
>                 Key: TORQUE-361
>                 URL: https://issues.apache.org/jira/browse/TORQUE-361
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 5.0, 5.1
>            Reporter: Max Philipp Wriedt
>            Priority: Major
>              Labels: groovy
> The GroovyShell invoked at GroovyScriptOutlet.java:42 doesn't get a 
> classpath, if i try to start it from a gradle instance. (the generator is 
> invoked inside a kotlin.class)
> {code:java}
> Error executing template torque.sql.ddl.database
> org.apache.torque.generator.GeneratorException: Error executing template 
> torque.sql.ddl.database
> Caused by: org.apache.torque.generator.GeneratorException: Error executing 
> groovy script torque.sql.ddl.database
> Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: 
> startup failed:
> Script1.groovy: 17: unable to resolve class 
> org.apache.torque.generator.template.groovy.TorqueGenGroovy
>  @ line 17, column 1.
>    import org.apache.torque.generator.template.groovy.TorqueGenGroovy
>    ^{code}

This message was sent by Atlassian Jira

To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org
For additional commands, e-mail: torque-dev-h...@db.apache.org

Reply via email to