I am migrating a legacy Maven build with the GMaven plugin to GMavenPlus and running into the issue that I don't know how I can call external Groovy classes from a local source folder inside my Groovy script.
Here's my previous setup:
<execution>
<id>process-static-content</id>
<goals>
<goal>execute</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<scriptpath>
<element>${pom.basedir}/src/main/some-local-path</element>
</scriptpath>
<source>
// call class from scriptpath that needs access
// to Maven internals
new SomeClassFromTheAboveFolder(project, log).run();
</source>
</configuration>
</execution>
Changing the <source>
to <scripts><script>
is obvious, but as far as I can tell, a <script>
block can only either contain local groovy code or a file path to a script, but neither helps me implement the above usage pattern.
Can anybody provide insight?