This file contains 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
@GrabResolver(name='glassfish', root='http://maven.glassfish.org/content/groups/public/') | |
@GrabResolver(name="github", root="http://kellyrob99.github.com/Jenkins-api-tour/repository") | |
@Grab('org.kar:hudson-api:0.2-SNAPSHOT') | |
@GrabExclude('org.codehaus.groovy:groovy') | |
import org.kar.hudson.api.cli.HudsonCliApi | |
String rootUrl = 'http://localhost:8080' | |
HudsonCliApi cliApi = new HudsonCliApi() | |
def listPlugins = 'Hudson.instance.pluginManager.plugins.each { \ |
This file contains 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
import org.apache.maven.shared.dependency.analyzer.ClassAnalyzer | |
import org.apache.maven.shared.dependency.analyzer.DefaultClassAnalyzer | |
import org.apache.maven.shared.dependency.analyzer.DependencyAnalyzer | |
import org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalysis | |
import org.apache.maven.shared.dependency.analyzer.asm.ASMDependencyAnalyzer | |
import org.gradle.api.Project | |
import org.gradle.api.artifacts.ConfigurationContainer | |
import org.gradle.api.artifacts.ResolvedArtifact | |
import org.gradle.api.artifacts.ResolvedDependency |
This file contains 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
def findPluginsWithUpdates = ''' | |
Hudson.instance.pluginManager.plugins.inject([]) { List toUpdate, plugin -> | |
if(plugin.hasUpdate()) | |
{ | |
toUpdate << plugin.shortName | |
} | |
toUpdate | |
}.inspect() | |
''' | |
OutputStream updateablePlugins = new ByteArrayOutputStream() |
This file contains 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
import org.sonatype.nexus.repository.storage.Asset | |
import org.sonatype.nexus.repository.storage.Query | |
import org.sonatype.nexus.repository.storage.StorageFacet | |
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
def request = new JsonSlurper().parseText(args) | |
assert request.repoName: 'repoName parameter is required' | |
assert request.startDate: 'startDate parameter is required, format: yyyy-mm-dd' |
This file contains 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
@Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.7.2') | |
import groovyx.net.http.HTTPBuilder | |
import org.apache.http.HttpRequest | |
import org.apache.http.HttpRequestInterceptor | |
import org.apache.http.protocol.HttpContext | |
import static groovy.io.FileType.FILES | |
import static groovyx.net.http.ContentType.BINARY | |
import static groovyx.net.http.ContentType.TEXT | |
import static groovyx.net.http.Method.PUT |
This file contains 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
@GrabResolver(name='glassfish', root='http://maven.glassfish.org/content/groups/public/') | |
@GrabResolver(name='jenkins', root='http://maven.jenkins-ci.org/content/repositories/releases') | |
@GrabResolver(name="github", root="http://kellyrob99.github.com/Jenkins-api-tour/repository") | |
@Grab('org.kar:hudson-api:0.2-SNAPSHOT') | |
@GrabExclude('org.codehaus.groovy:groovy') | |
import static java.net.HttpURLConnection.* | |
import org.kar.hudson.api.* | |
import org.kar.hudson.api.cli.HudsonCliApi | |
String rootUrl = 'http://localhost:8080' |
This file contains 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
@Grab(group = 'net.sf.opencsv', module = 'opencsv', version = '2.3') | |
import au.com.bytecode.opencsv.CSVReader | |
import au.com.bytecode.opencsv.CSVParser | |
import au.com.bytecode.opencsv.CSVWriter | |
def TEST_FILE_NAME = 'test.csv' | |
def TEST_OUTPUT_FILE_NAME = 'testOut.csv' | |
List<String[]> rows = new CSVReader(new FileReader(new File(TEST_FILE_NAME)), CSVParser.DEFAULT_SEPARATOR, CSVParser.DEFAULT_ESCAPE_CHARACTER, CSVParser.DEFAULT_QUOTE_CHARACTER, 1).readAll() | |
def rowsOver100 = rows.findAll {it[1].toInteger() > 100} |
This file contains 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
@Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.5.2') | |
import groovy.json.JsonBuilder | |
import groovyx.net.http.HTTPBuilder | |
import static groovyx.net.http.ContentType.JSON | |
final rootUser = args[0] | |
final String RATE_LIMIT_HEADER = 'X-RateLimit-Remaining' | |
final String rootUrl = 'https://api.github.com' | |
final Closure<Boolean> hasWatchers = {it.watchers > 1} | |
final Closure findReposForUser = { HTTPBuilder http, username -> |
This file contains 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
apply plugin: 'groovy' | |
apply plugin: 'idea' | |
apply plugin: 'maven' | |
apply plugin: 'eclipse' | |
apply plugin: 'project-report' | |
version = '1.0-SNAPSHOT' | |
group = '' | |
versions = [ |
This file contains 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
defaults write ~/.MacOSX/environment.plist M2_HOME `brew --prefix maven`/libexec | |
defaults write ~/.MacOSX/environment.plist M2 `brew --prefix maven`/libexec/bin |
NewerOlder