Run script in execution doesn't work
See original GitHub issueI just read in the Maven Handbook (http://www.sonatype.com/books/mcookbook/reference/sect-scala-script-inline.html) that it’s possible to run a scala script inside the Maven Scala Plugin. I tried the example in the book, which doesn’t work. Altering the script to a hello world also doesn’t work. Tried different versions of Scala (Scala 2.7.0, Scala 2.7.3, Scala 2.8.RC2) and different versions of the Maven Scala Plugin. But i always get the following error to run any script inside the MSP: java.lang.NoClassDefFoundError: scala/ScalaObject
Steps to reproduce: create scala maven project from archetype 1.2, add the following execution to the executions-tag of the maven scala plugin:
<execution>
<id>prepare-package</id>
<phase>prepare-package</phase>
<goals>
<goal>script</goal>
</goals>
<configuration>
<scalaVersion>${scala.version}</scalaVersion>
<keepGeneratedScript>true</keepGeneratedScript>
<script>
<![CDATA[
println("hello from scala script")
]]>
</script>
</configuration>
</execution>
Then, run “mvn prepare-package” from command line.
Issue Analytics
- State:
- Created 13 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
javascript - Why didn't the script execute?
The big problem with this is that this open the door to code injection (in ... Always make sure you ONLY execute static...
Read more >Why won't my script execute?
The problem is due to the missing env variables. That's why it works from terminal. If I supply the full path for everything...
Read more >Troubleshooting | Apps Script
To authorize the script, open the Script Editor and run any function. The authorization prompt appears so you can authorize the script ...
Read more >Function doesn't execute in script
Function doesn't execute in script ... However, on the command line, when I type "./ShellScript.sh help", nothing happens. I've been trying to ...
Read more >Bash-script as linux-service won't run, but executed from ...
The problem is that, when the script runs as a service, it does not run as "you": it does not have your environment....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For the record, we use the script goal extensively and it works. Can this issue be closed?
Hi,
I introduce a bug in the last version. I wrapped every script external and inline like if it was part of the build. But in the original goals, inline script are part of the build and external are for test, run,…
It’s clearer when I read the comments on the includeScopes configuration :
There is a workaround, I change your pom.xml and I’d SUCCESS : for externalV3_1_6 add
output :
for inlineV3_1_6 : replace
by
output :