myJar:
- com/package
-- MyClass.class
- whatever.groovy
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<configuration>
<!-- how to reference the script here? -->
<!-- file:///path/to/file was working, but now it´s available in a jar file -->
<scripts>
<script>classpath:whatever.groovy</script>
</scripts>
</configuration>
<dependencies>
<dependency>
<groupId>com.package</groupId>
<artifactId>myjar</artifactId>
...
</dependency>
</dependencies>
<configuration>
<!-- how to reference the script here? -->
<!-- file:///path/to/file was working, but now it´s available in a jar file -->
<scripts>
<script>jar:file:/${settings.localRepository}/com/package/0.1-SNAPSHOT/myjar-0.1-SNAPSHOT.jar!/whatever.groovy</script>
</scripts>
</configuration>
Hi Torsten,
First of all, I'm very sorry for the late reply. This got buried in my inbox and I'm just noticing it now.
One thing you could do, since all dependencies are available on the script's classpath would be to invoke the class that is automatically assigned by Groovy if you haven't explicitly added a main class in your script (with the same name as the script). So if you have a script called foo.groovy in a jar that's brought in as a dependency, it could be invoked like
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<configuration>
<scripts>
<script>whatever.main()</script>
</scripts>
</configuration>
<dependencies>
<dependency>
<groupId>com.package</groupId>
<artifactId>myjar</artifactId>
</dependency>
</dependencies>
</plugin>
I haven't had a chance to test it out, but it should work.
-Keegan
--
You received this message because you are subscribed to the Google Groups "GMavenPlus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gmavenplus+unsubscribe@googlegroups.com.
To post to this group, send email to gmave...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gmavenplus/95b8366e-af5a-4c09-8d0d-2008021b0ed9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.