Run generateSources when publishing to maven

- Fixed some warnings as well
- Fixes #13