hsynkrtl opened a new issue, #72:
URL: https://github.com/apache/maven-scripting-plugin/issues/72

   ### Affected version
   
   3.1.0
   
   ### Bug description
   
   Hi,
   
   i try to use the scripting-plugin. I use the latest version of the plugin.
   
   `
   <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-scripting-plugin</artifactId>
       <version>3.1.0</version>
   </plugin>
   `
   
   Also the latest version of the groovy-jsr223.
   `
   <plugin>
       <artifactId>maven-scripting-plugin</artifactId>
       <executions>
           <execution>
               <id>pre-clean:scripting:eval</id>
               <goals>
                   <goal>eval</goal>
               </goals>
               <phase>pre-clean</phase>
           </execution>
       </executions>
       <configuration>
           <engineName>groovy</engineName>
           <scriptFile>${basedir}/file.groovy</scriptFile>
           <script>
               <![CDATA[
   println "SCRIPT"
               ]]>
           </script>
       </configuration>
       <dependencies>
           <dependency>
               <groupId>org.apache.groovy</groupId>
               <artifactId>groovy-jsr223</artifactId>
               <version>5.0.5</version>
           </dependency>
       </dependencies>
   </plugin>
   `
   **But while my example script is executable on the commandline with groovy. 
It fails with the plugin.**
   
   `
   @Grapes([@Grab(group = 'org.apache.maven.shared', module = 'maven-invoker', 
version = '3.3.0'),
           @Grab(group = 'org.slf4j', module = 'slf4j-simple', version = 
'2.0.17'),
           @Grab(group = 'org.apache.maven', module = 'maven-core', version = 
'3.9.15'),
           @Grab(group = 'org.apache.maven', module = 'maven-model', version = 
'3.9.15'),
           @Grab(group = 'org.apache.maven', module = 'maven-plugin-api', 
version = '3.9.15'),
           @Grab(group = 'org.apache.maven', module = 'maven-artifact', version 
= '3.9.15')])
   
   import org.apache.maven.model.Plugin
   import org.apache.maven.model.io.xpp3.MavenXpp3Reader
   import org.apache.maven.plugin.MojoExecution
   import org.apache.maven.plugin.descriptor.PluginDescriptor
   import org.apache.maven.project.MavenProject
   import org.apache.maven.shared.invoker.DefaultInvocationRequest
   import org.apache.maven.shared.invoker.DefaultInvoker
   import org.apache.maven.shared.invoker.InvocationRequest
   
   println "SCRIPT FILE"
   
   return
   `
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to