Ported from Gradle to Maven