Hi, I'm using the gmaven plugin to execute a groovy script and whenever I run release:prepare the scripts lines get joined. I use version 2.4.1 of the release plugin, and the following snippet is affected:
<plugin> <groupId>org.codehaus.gmaven</groupId> <artifactId>gmaven-plugin</artifactId> <version>1.4</version> <executions> <execution> <id>kick-managed-nodes</id> <phase>install</phase> <goals> <goal>execute</goal> </goals> </execution> </executions> <configuration> <source><![CDATA[ import java.net.Socket def s = new Socket("localhost", 80); s.setSoTimeout(10000); s.withStreams { input, output -> output << "kick\r\n" output.flush() } ]]></source> </configuration> </plugin> After executing release:prepare, the pom.xml is rewritten and the script above get modified as: <source><![CDATA[ import java.net.Socket def s = new Socket("localhost", 80); s.setSoTimeout(10000); s.withStreams { input, output -> output << "kick\r\n" output.flush() } ]]></source> The above will break, as there is no separation between 'output << "kick\r\n"' and 'output.flush()'. This can be solved by adding semicolons at the end of the lines in the script however I think the release plugin should not reformat anything inside a CDATA block. There is an existing open issue regarding this: http://jira.codehaus.org/browse/MRELEASE-601unfortunatelly I was not able to add new comment to it. The problem as I understand is that the release plugin first removes all extra whitepaces as they would cause problem with JDOM, and this is the step that causes the CDATA section to be altered. The matching part is: output << "kick\r\n" output.flush() } ]]> I don't see an easy way to deal with excluding CDATA from the applied regexp replacement, maybe someone on the list does. Thanks, Andras