Hi, Petri.
четверг, 13 декабря 2012 г., 4:30:35 UTC+7 пользователь Petri Kivikangas написал:
I've now spent hours trying to access libraries inside a task definition. I have a simple task where I want to do some file operations using Apache Commons IO. I don't want to create any plugins, only one simple (in my opinion) task. I have project definition and dependencies in build.sbt, and task definition in project/build.scala. However, my build.scala is currently a mess, because I don't have any clue about the correct approach.
So, in build.scala I want to access several classes under "org.apache.commons". How do I make this happen?
Also, I want to find the absolute path to project's root directory and 'target' directory, because I need these in the file operations. I'm sure sbt has these paths somewhere, but how do I get them as simple strings or File objects?