[ http://jira.codehaus.org/browse/MPJAVA-38?page=all ] Lukas Theussl closed MPJAVA-38: -------------------------------
Resolution: Fixed Fix Version: 1.6 > sourceModifications handled incorrectly when more than one clause present > ------------------------------------------------------------------------- > > Key: MPJAVA-38 > URL: http://jira.codehaus.org/browse/MPJAVA-38 > Project: maven-java-plugin > Type: Bug > Versions: 1.5 > Reporter: Simon Kitching > Fix For: 1.6 > Attachments: sourceModifications.patch > > > The loop > <j:forEach var="sm" items="${pom.build.sourceModifications}"> > <ant:available property="classPresent" classname="${sm.className}"/> > is flawed. When the class is not present, the <available> action does NOT > reset $classPresent to a false value; instead, its previous value is left > unaltered (ie is the value from the previous time around the loop). > So a sourceModified clause with a classname that is present will cause all > following sourceModified clauses to be skipped, regardless of whether their > test class is present or not. > The following ant file demonstrates this nicely: > <project name="foo" default="def" basedir="."> > <target name="def"> > <echo>av: ${av}</echo> > <available property="av" classname="dafasfas"/> > <echo>av: ${av}</echo> > <available property="av" classname="java.lang.String"/> > <echo>av: ${av}</echo> > <available property="av" classname="no.such.class"/> > <echo>av: ${av}</echo> > </target> > </project> > perhaps simply inserting an assignment to reset the variable to false > immediately before the <ant:available> test will fix this? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]