Skip to content

Instantly share code, notes, and snippets.

@jmruc
jmruc / README.md
Created June 24, 2013 19:19
Generating pom.xml from gradle

To generate a pom.xml file just run gradle writeNewPom

If you want to generate it as pom.xml in the root of the project, replace writeTo("$buildDir/newpom.xml") with writeTo("pom.xml")

@jmruc
jmruc / build.gradle
Created September 18, 2012 07:09
Download and unpack dojo using gradle
def dojoVersion = '1.8.0'
//dir to keep dojo zip and version
def dojoTempDir = 'dojo'
//where to extract dojo, there would be dirs ['dojo', 'dojox', 'dijit', 'util'] in there
def appDir = "app"
def dojoDownloadUrl = "http://download.dojotoolkit.org/release-${dojoVersion}/dojo-release-${dojoVersion}-src.zip"
def dojoZip = "${dojoTempDir}/dojo.zip"
import java.net.*;
import java.util.*;
import java.util.Enumeration;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
class InetAddressTest
{
private static final String IPADDRESS_PATTERN =
"^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +