Use more injected properties

This is a follow-up PR for #460.

I also found out we already have `targetDirectory` and `sourceDirectory` injected. I'll added two commits which use these fields instead of always fetching from the `project`.

In addition, we use `project.getBuild().getOutputDirectory()` and `project.getBuild().getResourceDirectory()`. @mosabua if you think, we could use fields for these, too.