[ https://jira.codehaus.org/browse/MANT-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Trejkaz reopened MANT-74: ------------------------- While a configuration issue is *not* a bug, I am not convinced that this is a configuration issue in the first place. Who says that you can't have zero excludes? I couldn't find anything on the page for the plugin to indicate that it's prohibited and had to search forums to find hints that it might work as a workaround. But in any case, thinking about it *rationally*, there are two possible outcomes, depending on whether you think it's legal or not. Either: (a) It is legal to specify the excludes element without any children. In this case, it should proceed as if the element was absent. Or: (b) It is illegal to specify the excludes element without any children. In this situation, the error should say something like: "It is illegal to specify the excludes element without any children. You should remove the element." Irrespective of whether it is legal or not, throwing a ClassCastException (or any non-descriptive exception) back to the user is never acceptable. > ClassCastException running ant:ant on activemq project > ------------------------------------------------------ > > Key: MANT-74 > URL: https://jira.codehaus.org/browse/MANT-74 > Project: Maven Ant Plugin > Issue Type: Bug > Affects Versions: 2.3 > Reporter: Trejkaz > Assignee: Karl-Heinz Marbaise > Priority: Critical > Attachments: mvn.log > > > I tried to run mvn ant:ant to create Ant builds for ActiveMQ, and I get the > following error about half way through. I'm attaching a full log as well, in > case that is of use. > {noformat} > Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to > [Ljava.util.Map; > at > org.apache.maven.plugin.ant.AntBuildWriterUtil.getMavenPluginOptions(AntBuildWriterUtil.java:919) > at > org.apache.maven.plugin.ant.AntBuildWriterUtil.getMavenSurefirePluginOptions(AntBuildWriterUtil.java:717) > at > org.apache.maven.plugin.ant.AntBuildWriter.getTestExcludes(AntBuildWriter.java:995) > at > org.apache.maven.plugin.ant.AntBuildWriter.writeTestTargets(AntBuildWriter.java:885) > at > org.apache.maven.plugin.ant.AntBuildWriter.writeGeneratedBuildXml(AntBuildWriter.java:316) > at > org.apache.maven.plugin.ant.AntBuildWriter.writeBuildXmls(AntBuildWriter.java:122) > at org.apache.maven.plugin.ant.AntMojo.execute(AntMojo.java:134) > at > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) > ... 20 more > {noformat} -- This message was sent by Atlassian JIRA (v6.1.6#6162)