Posted By


laurenceosx on 05/13/13

Tagged


Statistics


Viewed 929 times
Favorited by 0 user(s)

install_camel-jgroups_2.11-SNAPSHOT


/ Published in: Groovy
Save to your folder(s)

// 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


Copy this code and paste it in your HTML
  1. #!/usr/bin/env groovy
  2.  
  3. // file: install_camel-jgroups_2.11-SNAPSHOT.groovy
  4. // url: http://faroe228.googlecode.com/svn/trunk/SvnAndMvnInstallFor_camel-jgroups_2.11-SNAPSHOT/InstallScript/install_camel-jgroups_2.11-SNAPSHOT.groovy
  5.  
  6. /*
  7.  
  8. // Sample gradle snippet for using installed camel-jgroups:2.11-SNAPSHOT
  9.  
  10. repositories {
  11.   maven { url 'http://repo.grails.org/grails/repo' } // I have found this to be more reliable for spring/hibernate jars than maven central
  12.   maven { url 'http://repository.jboss.org/nexus/content/groups/public-jboss' } // good to have
  13.   maven { url 'http://repo.fusesource.com/nexus/content/groups/public' } // for activemq-all:5.8.0'
  14.  
  15.   mavenCentral()
  16.   mavenLocal() // !!! because we installed camel-jgroups:2.11-SNAPSHOT to m2local
  17. }
  18.  
  19. dependencies {
  20.   compile 'org.apache-extras.camel-extra:camel-jgroups:2.11-SNAPSHOT' // !!!
  21. }
  22.  
  23.   */
  24.  
  25. ant = new AntBuilder()
  26.  
  27. def osWin = System.properties.'os.name'.toLowerCase().contains('windows')
  28. String osShell = osWin ? 'cmd' : 'sh' ; // for ant.exec executable
  29. String osShellFirstArg = osWin ? '/c' : '' ; // for ant.exec arg value
  30. String osShellLinePrefix = osWin ? osShellFirstArg + ' ' : '' ; // for ant.exec arg line
  31.  
  32. String theSrc = "http://faroe228.googlecode.com/svn/trunk/SvnAndMvnInstallFor_camel-jgroups_2.11-SNAPSHOT.zip"
  33. String theDest = theSrc.split('/').last() // e.g. SvnAndMvnInstallFor_camel-jgroups_2.11-SNAPSHOT.zip
  34.  
  35. String explodedZipFolderName = theDest[0 ..< theDest.lastIndexOf('.')]
  36.  
  37. ant.delete( dir: explodedZipFolderName )
  38.  
  39. ant.get(src: theSrc, dest: theDest, skipexisting: 'true')
  40. ant.unzip( src: theDest, dest: '.' )
  41.  
  42. ant.exec( executable: osShell, dir: explodedZipFolderName ) {
  43. arg( line: osShellLinePrefix + "gradlew" )
  44. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.