Return to Snippet

Revision: 63500
at May 13, 2013 01:39 by laurenceosx


Initial Code
#!/usr/bin/env groovy

// file: install_camel-jgroups_2.11-SNAPSHOT.groovy
//  url: http://faroe228.googlecode.com/svn/trunk/SvnAndMvnInstallFor_camel-jgroups_2.11-SNAPSHOT/InstallScript/install_camel-jgroups_2.11-SNAPSHOT.groovy

    /*
    
// Sample gradle snippet for using installed camel-jgroups:2.11-SNAPSHOT

repositories {
    maven { url 'http://repo.grails.org/grails/repo' } // I have found this to be more reliable for spring/hibernate jars than maven central
    maven { url 'http://repository.jboss.org/nexus/content/groups/public-jboss' } // good to have
    maven { url 'http://repo.fusesource.com/nexus/content/groups/public' } // for activemq-all:5.8.0'
    
    mavenCentral()
    mavenLocal() // !!! because we installed camel-jgroups:2.11-SNAPSHOT to m2local
}
    
dependencies {
    compile 'org.apache-extras.camel-extra:camel-jgroups:2.11-SNAPSHOT' // !!!
}
    
    */

ant = new AntBuilder()

def osWin = System.properties.'os.name'.toLowerCase().contains('windows')
String osShell           = osWin ? 'cmd' : 'sh' ; // for ant.exec executable
String osShellFirstArg   = osWin ? '/c'  : ''   ; // for ant.exec arg value
String osShellLinePrefix = osWin ? osShellFirstArg + ' ' : '' ; // for ant.exec arg line

String theSrc  = "http://faroe228.googlecode.com/svn/trunk/SvnAndMvnInstallFor_camel-jgroups_2.11-SNAPSHOT.zip"
String theDest = theSrc.split('/').last() //          e.g. SvnAndMvnInstallFor_camel-jgroups_2.11-SNAPSHOT.zip

String explodedZipFolderName = theDest[0 ..< theDest.lastIndexOf('.')]

ant.delete( dir: explodedZipFolderName )

ant.get(src: theSrc, dest: theDest, skipexisting: 'true')
ant.unzip( src: theDest, dest: '.' )

ant.exec( executable: osShell, dir: explodedZipFolderName ) {
    arg( line: osShellLinePrefix + "gradlew"  )
}

Initial URL
http://faroe228.googlecode.com/svn/trunk/SvnAndMvnInstallFor_camel-jgroups_2.11-SNAPSHOT/InstallScript/install_camel-jgroups_2.11-SNAPSHOT.groovy

Initial Description
// file: install_camel-jgroups_2.11-SNAPSHOT.groovy
//  url: http://faroe228.googlecode.com/svn/trunk/SvnAndMvnInstallFor_camel-jgroups_2.11-SNAPSHOT/InstallScript/install_camel-jgroups_2.11-SNAPSHOT.groovy

Initial Title
install_camel-jgroups_2.11-SNAPSHOT

Initial Tags
groovy

Initial Language
Groovy