The "args" parameter as defined in:
http://scala-tools.org/mvnsites/maven-scala-plugin/script-mojo.html  is
meant to be used in the <configuration> section of your maven-scala-plugin
defintion section in your pom.   Maven has some sugar to allow environment
variables to replace these configuraiton variables, using something like
-Dmaven.scala-plugin.args=...   I'll have to look this up, but for now
please use the pom file or Jean-Luc's suggestion.

-Josh

On Tue, Mar 3, 2009 at 1:24 PM, Jean-Luc <[email protected]> wrote:

> the -Dargs parameter is labelled as "compiler additionnals arguments" in
> http://scala-tools.org/mvnsites/maven-scala-plugin/script-mojo.html
>
> Moreover, from the source code :
> step 1 : a scala class is generated in ./target/.scalaScriptGen ; it looks
> like this :
> class embeddedScript_1  {
>     // your script content here
>    Thread.sleep(10000)
> }
>
> step 2 : it is executed here :
> http://scala-tools.org/mvnsites/maven-scala-plugin/xref/org/scala_tools/maven/ScalaScriptMojo.html#172
> step 3 : the temp files are removed
>
> The only way I see to get some external parameter is using something like
> System.getProperty("args") in "yourscript.scala" with a
> -DscriptFile="yourscript.scala"
>
>
> Jean-Luc
>
>
> 2009/3/3 Meredith Gregory <[email protected]>
>
>> Scalads, lasses and Lifted,
>>
>> i clearly don't understand the mvn scala:script widget. This just works
>>
>> > scala -classpath $MYSCRIPTCLASSPATH scripts/GenerateFiles.scala
>> "/Users/lgm/work/src/projex/bobj/dspace/src/main/java/com/sap/dspace/model/constellation/"
>>
>> (where MYSCRIPTCLASSPATH was set with and export to the value generated by
>> a mvn compile with appropriate verbosity on). But this doesn't
>>
>> > mvn scala:script -DscriptFile=scripts/GenerateFiles.scala
>> -Dargs="src/main/java/com/sap/dspace/model/constellation/"
>>
>> The latter complains -- as in the message below -- that 'args' is not
>> defined.
>>
>> Best wishes,
>>
>> --greg
>> - Mostrar texto citado -
>>
>>
> --
> Jean-Luc Canela
> [email protected]
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to