As far as my knowledge of sbt goes,
sounds like to execute a task like describe above, one has to run it in a Process object apply method. val = Process("""), where val would be defined as a taskKey.
To solve the dependency i intent to put that class in resourceGenerators in compile. My intent here is that this files are generated before the compile process.
I have wrote the following test code in my sbt:
lazy val jjParse = taskKey[Stream[String]]("compile JJ file with JavaCC ")
jjParse := Process("java -classpath ./lib/javacc.jar javacc ./src/main/java/ACLParser.jj").lines
I'll have to use javacc as an unmanaged Jar. This will not be the exact le location of ACLParser.jj. this is just a hook for now.
1 - My first interrogation here is, how can I actually control where the file will be outputted. As of now, the file are generated in ".". ?
(My task actually return a string coming from JavaCC that specifies what happens.I have not access to the files written from that tasks. ) Can be annoying to verify that the process actually worked.
Is the approach flawed, is there other way to do that ?