2010-04-28 21 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 
相关问题