I've not seen any "-Dargs" description at http://scala-tools.org/mvnsites/maven-scala-plugin/usage_script.html
May be you can use "-DscriptFile" param to set your String variable ? mvn scala:script -DscriptFile="script.scala" ------------------->>>> script.scala begin<<<<------------------------------ val text = "thetesttext" println(text) ------------------->>>> script.scala end<<<<------------------------------ Jean-Luc 2009/3/3 Meredith Gregory <[email protected]> > Scalads, lasses and Lifted, > > i think i must not understand something about the mvn scala:script. i > thought that args was how you accessed cmdline args. However, see the trace > below. > > Best wishes, > > --greg > > bash-3.2$ mvn scala:script > -Dscript="com.sap.dspace.othello.theIago.generateRESTfulResources(args(0))" > -Dargs=/Users/lgm/work/src/projex/bobj/dspace/src/main/java/com/sap/dspace/model/constellation/ > [INFO] Scanning for projects... > [INFO] Searching repository for plugin with prefix: 'scala'. > [INFO] > ------------------------------------------------------------------------ > [INFO] Building dspace > [INFO] task-segment: [scala:script] > [INFO] > ------------------------------------------------------------------------ > Downloading: > http://scala-tools.org/repo-releases/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom > Downloading: > http://download.java.net/maven/2/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom > Downloading: > file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom > Downloading: > http://repo1.maven.org/maven2/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom > Downloading: > http://scala-tools.org/repo-releases/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom > Downloading: > http://download.java.net/maven/2/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom > Downloading: > file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom > Downloading: > http://repo1.maven.org/maven2/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom > [INFO] [scala:script] > [INFO] suggestion: remove the scalaVersion from pom.xml > [INFO] Checking for multiple versions of scala > [INFO] cmd: > /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java > -classpath > /Users/lgm/.m2/repository/org/scala-lang/scala-library/2.7.3/scala-library-2.7.3.jar:/Users/lgm/.m2/repository/org/scala-lang/scala-compiler/2.7.3/scala-compiler-2.7.3.jar > -Xbootclasspath/a:/Users/lgm/.m2/repository/org/scala-lang/scala-library/2.7.3/scala-library-2.7.3.jar > -Xdebug -Xnoagent -Djava.compiler=NONE > -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 > scala.tools.nsc.Main -classpath > /Users/lgm/.m2/repository/com/sun/jersey/jersey-server/1.0.2/jersey-server-1.0.2.jar:/Users/lgm/.m2/repository/org/hibernate/hibernate-entitymanager/ > 3.3.2.GA/hibernate-entitymanager-3.3.2.GA.jar:/Users/lgm/.m2/repository/javassist/javassist/3.4.GA/javassist-3.4.GA.jar:/Users/lgm/.m2/repository/javax/ws/rs/jsr311-api/1.0/jsr311-api-1.0.jar:/Users/lgm/.m2/repository/commons-io/commons-io/1.2/commons-io-1.2.jar:/Users/lgm/.m2/repository/com/sun/jersey/jersey-core/1.0.2/jersey-core-1.0.2.jar:/Users/lgm/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/Users/lgm/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar:/Users/lgm/.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar:/Users/lgm/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:/Users/lgm/.m2/repository/commons-cli/commons-cli/1.1/commons-cli-1.1.jar:/Users/lgm/.m2/repository/net/liftweb/lift-xmpp/1.0/lift-xmpp-1.0.jar:/Users/lgm/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar:/Users/lgm/.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar:/Users/lgm/.m2/repository/net/liftweb/lift-record/1.0/lift-record-1.0.jar:/Users/lgm/.m2/repository/commons-codec/commons-codec/1.2/commons-codec-1.2.jar:/Users/lgm/.m2/repository/net/liftweb/lift-widgets/1.0/lift-widgets-1.0.jar:/Users/lgm/.m2/repository/org/hibernate/ejb3-persistence/1.0.1.GA/ejb3-persistence-1.0.1.GA.jar:/Users/lgm/.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar:/Users/lgm/.m2/repository/com/rabbitmq/rabbitmq-client/1.3.0/rabbitmq-client-1.3.0.jar:/Users/lgm/.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar:/Users/lgm/.m2/repository/net/liftweb/lift-mapper/1.0/lift-mapper-1.0.jar:/Users/lgm/.m2/repository/hibernate/hibernate-tools/local/hibernate-tools-local.jar:/Users/lgm/.m2/repository/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0.jar:/Users/lgm/.m2/repository/net/liftweb/lift-textile/1.0/lift-textile-1.0.jar:/Users/lgm/.m2/repository/mysql/mysql-connector-java/local/mysql-connector-java-local.jar:/Users/lgm/.m2/repository/hibernate/hibernate3/local/hibernate3-local.jar:/Users/lgm/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/Users/lgm/.m2/repository/org/hibernate/hibernate-annotations/3.3.1.GA/hibernate-annotations-3.3.1.GA.jar:/Users/lgm/.m2/repository/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.jar:/Users/lgm/.m2/repository/geronimo-spec/geronimo-spec-ejb/2.1-rc4/geronimo-spec-ejb-2.1-rc4.jar:/Users/lgm/.m2/repository/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar:/Users/lgm/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:/Users/lgm/.m2/repository/net/liftweb/lift-util/1.0/lift-util-1.0.jar:/Users/lgm/.m2/repository/org/hibernate/hibernate-commons-annotations/3.0.0.ga/hibernate-commons-annotations-3.0.0.ga.jar:/Users/lgm/.m2/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar:/Users/lgm/.m2/repository/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar:/Users/lgm/.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar:/Users/lgm/.m2/repository/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.jar:/Users/lgm/.m2/repository/net/liftweb/lift-facebook/1.0/lift-facebook-1.0.jar:/Users/lgm/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.0.2/jaxb-xjc-2.0.2.jar:/Users/lgm/.m2/repository/net/liftweb/lift-core/1.0/lift-core-1.0.jar:/Users/lgm/.m2/repository/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0.jar:/Users/lgm/.m2/repository/commons-collections/commons-collections/2.1/commons-collections-2.1.jar:/Users/lgm/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar:/Users/lgm/.m2/repository/org/scala-lang/scala-library/2.7.3/scala-library-2.7.3.jar:/Users/lgm/.m2/repository/asm/asm/1.5.3/asm-1.5.3.jar:/Users/lgm/.m2/repository/org/scala-lang/scala-compiler/2.7.3/scala-compiler-2.7.3.jar:/Users/lgm/.m2/repository/javax/mail/mail/1.4/mail-1.4.jar:/Users/lgm/.m2/repository/net/liftweb/lift-webkit/1.0/lift-webkit-1.0.jar:/Users/lgm/work/src/projex/bobj/dspace/target/classes/:/Users/lgm/.m2/repository/net/liftweb/lift-machine/1.0/lift-machine-1.0.jar:/Users/lgm/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/lgm/.m2/repository/asm/asm/3.1/asm-3.1.jar:/Users/lgm/.m2/repository/cglib/cglib/2.1_3/cglib-2.1_3.jar:/Users/lgm/.m2/repository/net/liftweb/lift-amqp/1.0/lift-amqp-1.0.jar-d > /Users/lgm/work/src/projex/bobj/dspace/target/.scalaScriptGen -sourcepath > /Users/lgm/work/src/projex/bobj/dspace/target/.scalaScriptGen > /Users/lgm/work/src/projex/bobj/dspace/target/.scalaScriptGen/embeddedScript_1.scala > [INFO] Listening for transport dt_socket at address: 5005 > [WARNING] > /Users/lgm/work/src/projex/bobj/dspace/target/.scalaScriptGen/embeddedScript_1.scala:2: > error: not found: value args > [WARNING] > com.sap.dspace.othello.theIago.generateRESTfulResources(args(0)) > [WARNING] ^ > [WARNING] one error found > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] command line returned non-zero value:1 > [INFO] > ------------------------------------------------------------------------ > [INFO] For more information, run Maven with the -e switch > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 7 seconds > [INFO] Finished at: Tue Mar 03 07:58:58 PST 2009 > [INFO] Final Memory: 11M/21M > [INFO] > ------------------------------------------------------------------------ > bash-3.2$ > > -- > L.G. Meredith > Managing Partner > Biosimilarity LLC > 806 55th St NE > Seattle, WA 98105 > > +1 206.650.3740 > > http://biosimilarity.blogspot.com > > > > -- 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 -~----------~----~----~----~------~----~------~--~---
