Last active
August 29, 2015 14:15
-
-
Save regis-leray/f704f987cad0264a98c7 to your computer and use it in GitHub Desktop.
GMaven -
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.codehaus.groovy.maven</groupId> | |
<artifactId>gmaven-plugin</artifactId> | |
<executions> | |
<execution> | |
<phase>generate-sources</phase> | |
<goals> | |
<goal>execute</goal> | |
</goals> | |
<configuration> | |
<source> | |
public void replace(srcExp,replaceText){ | |
def currentDir = new File(project.basedir,"src/main/java"); | |
def fileText; | |
//Replace the contents of the list below with the | |
//extensions to search for | |
def exts = ["WebMethodResult.java"] | |
currentDir.eachFileRecurse({file -> | |
for (ext in exts){ | |
if (file.name.endsWith(ext)) { | |
fileText = file.text; | |
fileText = fileText.replaceAll(srcExp, replaceText) | |
file.write(fileText); | |
} | |
} | |
}) | |
} | |
replace("public class WebMethodResult \\{","public class WebMethodResult implements IWebMethodResult \\{"); | |
</source> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment