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
#!/bin/bash | |
echo "Import the public key used by the package management system...." | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo 'Create a list file for MongoDB...' | |
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list | |
echo 'Reload local package database.' | |
sudo apt-get update |
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: 'maven' | |
uploadArchives { | |
repositories { | |
mavenDeployer { | |
//release repository for version with no suffix '-SNAPSHOT' | |
repository(url: "http://x.x.x.x/nexus/content/repositories/releases") { | |
authentication(userName: "name", password: "passwd") | |
} | |
//snapshot repository for version with suffix '-SNAPSHOT' |
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
task sourcesJar(type: Jar, dependsOn:classes) { | |
classifier = 'sources' | |
from sourceSets.main.allSource | |
} | |
artifacts { | |
archives sourcesJar | |
} |
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
/** | |
* get {@code ObjectMapper} with singleton pattern | |
* | |
* @author myles | |
* | |
*/ | |
public enum ObjectMapperHolder { | |
INSTANCE; |
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
public class ConfigurableUrlByteSource extends ByteSource{ | |
private final URL url; | |
private int connectTimeout = 0; | |
private int readTimeout = 0; | |
public ConfigurableUrlByteSource(URL url) { | |
this.url = Preconditions.checkNotNull(url, "url is null"); |
NewerOlder