2010-04-28 3 views
1

Maven Scala: Je créé un projet en utilisant scala archétype:mvn scala: script -DscriptFile = scripts/PrintHello.scala -> Le dossier des scripts fait-il partie du projet?

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 

Maintenant, je veux exécuter un fichier de script en utilisant:

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

Toute idée où mettre mon dossier .Scala? à quoi les "scripts /" se réfèrent-ils exactement?

thx

Répondre

0

scripts/est un répertoire sur le même niveau que votre pom.xml. C'est ...

/myproject 
    pom.xml 
    /scripts 
    hello.scala 

donc du même répertoire que pom.xml, essayez ...

>mkdir scripts 
>echo 'println("hello")' >> scripts/hello.scala 
>mvn scala:script -DscriptFile=bob/hello.scala 
Questions connexes