Greg, I¹m no maven expert, but the real maven and scala guru¹s hang out here:
http://groups.google.com/group/maven-and-scala HTH Cheers, Tim On 03/03/2009 16:46, "Meredith Gregory" <[email protected]> wrote: > 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/co >> nstellation/" > > (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 > > On Tue, Mar 3, 2009 at 8:02 AM, Meredith Gregory <[email protected]> > wrote: >> 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/mo >> del/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/sma >> ck-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/s >> mack/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/sm >> ackx-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/s >> mack/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-c >> ompiler-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/j >> sr311-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-co >> re/1.0.2/jersey-core-1.0.2.jar:/Users/lgm/.m2/repository/javax/activation/act >> ivation/1.1/activation-1.1.jar:/Users/lgm/.m2/repository/commons-logging/comm >> ons-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/l >> gm/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:/User >> s/lgm/.m2/repository/commons-cli/commons-cli/1.1/commons-cli-1.1.jar:/Users/l >> gm/.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.j >> ar:/Users/lgm/.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar:/Use >> rs/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:/Use >> rs/lgm/.m2/repository/net/liftweb/lift-widgets/1.0/lift-widgets-1.0.jar:/User >> s/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:/Us >> ers/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.j >> ar:/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-loc >> al.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-connecto >> r-java-local.jar:/Users/lgm/.m2/repository/hibernate/hibernate3/local/hiberna >> te3-local.jar:/Users/lgm/.m2/repository/commons-collections/commons-collectio >> ns/3.2.1/commons-collections-3.2.1.jar:/Users/lgm/.m2/repository/org/hibernat >> e/hibernate-annotations/3.3.1.GA/hibernate-annotations-3.3.1.GA.jar:/Users/lg >> m/.m2/repository/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.jar:/User >> s/lgm/.m2/repository/geronimo-spec/geronimo-spec-ejb/2.1-rc4/geronimo-spec-ej >> b-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-ap >> is/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-comm >> ons-annotations/3.0.0.ga/hibernate-commons-annotations-3.0.0.ga.jar:/Users/lg >> m/.m2/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar:/Use >> rs/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/ig >> niterealtime/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-co >> llections/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/reposit >> ory/asm/asm/1.5.3/asm-1.5.3.jar:/Users/lgm/.m2/repository/org/scala-lang/scal >> a-compiler/2.7.3/scala-compiler-2.7.3.jar:/Users/lgm/.m2/repository/javax/mai >> l/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:/U >> sers/lgm/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/lgm/.m2/repo >> sitory/asm/asm/3.1/asm-3.1.jar:/Users/lgm/.m2/repository/cglib/cglib/2.1_3/cg >> lib-2.1_3.jar:/Users/lgm/.m2/repository/net/liftweb/lift-amqp/1.0/lift-amqp-1 >> .0.jar >> <http://3.3.2.GA/hibernate-entitymanager-3.3.2.GA.jar:/Users/lgm/.m2/reposito >> ry/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/commo >> ns-io/commons-io/1.2/commons-io-1.2.jar:/Users/lgm/.m2/repository/com/sun/jer >> sey/jersey-core/1.0.2/jersey-core-1.0.2.jar:/Users/lgm/.m2/repository/javax/a >> ctivation/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/repos >> itory/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:/U >> sers/lgm/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-htt >> pclient-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/ejb >> 3-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/rabbit >> mq-client-1.3.0.jar:/Users/lgm/.m2/repository/net/sf/ehcache/ehcache/1.2.3/eh >> cache-1.2.3.jar:/Users/lgm/.m2/repository/net/liftweb/lift-mapper/1.0/lift-ma >> pper-1.0.jar:/Users/lgm/.m2/repository/hibernate/hibernate-tools/local/hibern >> ate-tools-local.jar:/Users/lgm/.m2/repository/javax/xml/bind/jsr173_api/1.0/j >> sr173_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/m >> ysql-connector-java-local.jar:/Users/lgm/.m2/repository/hibernate/hibernate3/ >> local/hibernate3-local.jar:/Users/lgm/.m2/repos> -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$ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
