[GRADLE-2945] Adding exclusions in generated pom