How to use different version of BSF?

Add BSF as dependency to plugin section in pom.xml:

...
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>script-maven-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>
    <configuration>
        <language>groovy</language>
        <script>
          System.out.println("Hello from Groovy");
       </script>
        <engine>org.codehaus.groovy.bsf.GroovyEngine</engine>
        <passProjectAsProperty>true</passProjectAsProperty>
   </configuration>
    <dependencies>
        <dependency>
            <groupId>bsf</groupId>
            <artifactId>bsf</artifactId>
            <version>2.3.0</version>
       </dependency>
        <dependency>
            <groupId>groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>1.0-jsr-04</version>
       </dependency>
   </dependencies>
</plugin>
...
        

[top]