2010-04-28 23 views
1

Maven的斯卡拉:我創建使用原型Scala的項目:mvn scala:script -DscriptFile = scripts/PrintHello.scala - >腳本文件夾是否是項目的一部分?

mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create \ 
    -DarchetypeGroupId=org.scala-tools.archetypes \ 
    -DarchetypeArtifactId=scala-archetype-simple \ 
    -DarchetypeVersion=1.1 \ 
    -DremoteRepositories=http://scala-tools.org/repo-releases \ 
    -DgroupId=your.proj.gid -DartifactId=your-proj-id 

現在,我想用運行腳本文件:

mvn scala:script as described here mvn scala:script \ 
    -DscriptFile=scripts/PrintHello.scala \ 
    http://scala-tools.org/mvnsites/maven-scala-plugin/usage_script.html 

任何想法,把我的.Scala文件? 「腳本/」究竟是指什麼?

thx

回答

0

腳本/是與pom.xml相同級別的目錄。這是...

/myproject 
    pom.xml 
    /scripts 
    hello.scala 

所以從同一個目錄中的pom.xml,嘗試...

>mkdir scripts 
>echo 'println("hello")' >> scripts/hello.scala 
>mvn scala:script -DscriptFile=bob/hello.scala 
相關問題