Affects Version/s: 1.8
Fix Version/s: 3.0.0
Environment:seen in maven 3.3.3, maven 3.3.9
In AntRunMojo's copyProperties method, visible at either of these:
This loop does not check the type of objects in the Properties object it is looping:
Properties mavenProps = mavenProject.getProperties();
for ( Map.Entry<?, ?> entry : mavenProps.entrySet() )
Antrun 1.7 used an iterator and java.util.Properties' getters and setters (so the conversion was done for it).
The Properties object itself allows access to the backing map but strongly discourages using it. For type safety, if you loop the entryset you need to check types (or check null and call "toString" instead of casting). Maven does NOT enforce the type of objects put into that map, so
some plugins put non String objects in it. (In my use case, "org.eclipse.rcptt:rcptt-maven-plugin" stores a boolean in it.)
As a work around I antrun 1.7 in this usecase.