Skip to content

Instantly share code, notes, and snippets.

View sebersole's full-sized avatar

Steve Ebersole sebersole

View GitHub Profile
[steve@t510 hibernate-core]$ git push upstream master
fatal: remote error:
You can't push to git://github.com/hibernate/hibernate-core.git
Use git@github.com:hibernate/hibernate-core.git
[steve@t510 hibernate-core]$ gradle upload -s
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy UP-TO-DATE
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes UP-TO-DATE
:buildSrc:jar UP-TO-DATE
:buildSrc:assemble UP-TO-DATE
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy UP-TO-DATE
:buildSrc:processTestResources UP-TO-DATE
public class UploadManager implements Plugin<Project> {
@Override
public void apply(Project project) {
final Authenticator authenticator = project.getTasks().add( "nexusAuthHandler", Authenticator.class );
project.getTasks().allTasks(
new Action<Task>() {
@Override
public void execute(Task task) {
if ( Upload.class.isInstance( task ) ) {
public class Authenticator extends DefaultTask {
public static final String USER = "JBOSS_NEXUS_USERNAME";
public static final String PASS = "JBOSS_NEXUS_PASSWORD";
private Set<RemoteRepository> nexusRepositories = new HashSet<RemoteRepository>();
void addRepository(RemoteRepository remoteRepository) {
nexusRepositories.add( remoteRepository );
}
06:21:42.072 [main] DEBUG o.g.a.i.p.ant.AntLoggingAdapter - [ant:null] Maven Ant Tasks version: 2.1.0
06:21:42.072 [main] DEBUG o.g.a.i.p.ant.AntLoggingAdapter - [ant:null] Loading Maven settings file: /tmp/gradle_empty_settings2693242038544668269.xml
06:21:42.073 [main] DEBUG o.g.a.i.p.ant.AntLoggingAdapter - [ant:null] Loading Maven settings file: /opt/maven/current/conf/settings.xml
06:21:42.081 [main] DEBUG o.g.a.i.p.ant.AntLoggingAdapter - [ant:null] Loading Maven settings file: /home/steve/.m2/settings.xml
06:21:42.082 [main] DEBUG o.g.a.i.p.ant.AntLoggingAdapter - [ant:null] Loading Maven settings file: /opt/maven/current/conf/settings.xml
06:21:42.092 [main] INFO o.g.a.i.p.ant.AntLoggingAdapter - [ant:null] Deploying to https://repository.jboss.org/nexus/content/repositories/snapshots
06:21:42.095 [main] INFO system.out - [INFO] Retrieving previous build number from remote
06:21:43.003 [main] ERROR system.err - Uploading: org/hibernate/hibernate-c3p0/4.0.0-SNAPSHOT/hibernate-c3p0-4.0.0-20101012.1121
[steve@t510 tmp]$ git clone git@github.com:hibernate/hibernate-core.git
Cloning into hibernate-core...
remote: Counting objects: 60429, done.
remote: Compressing objects: 100% (20440/20440), done.
remote: Total 60429 (delta 34484), reused 57774 (delta 31931)
Receiving objects: 100% (60429/60429), 77.21 MiB | 674 KiB/s, done.
Resolving deltas: 100% (34484/34484), done.
[steve@t510 tmp]$ ls
hibernate-core
[steve@t510 tmp]$ cd hibernate-core/
[steve@t510 hibernate-core]$ gradle -version
------------------------------------------------------------
Gradle 0.9-rc-1
------------------------------------------------------------
Gradle buildtime: Wednesday, 4 August 2010 8:04:33 AM EST
Groovy: 1.7.3
Ant: Apache Ant version 1.8.1 compiled on April 30 2010
Ivy: 2.2.0-rc1
jdocbook {
userGuide {
masterSourceDocumentName 'GradleUserGuide.xml'
translations ['en-US', 'fr-FR']
}
pluginDevGuide {
masterSourceDocumentName 'GradlePluginDevGuide.xml'
translations ['en-US', 'fr-FR']
}
}
public void afterCompletion(int status) {
log.trace( "transaction after completion callback [status={}]", status );
try {
afterCompletionAction.doAction( ctx, status );
final boolean wasSuccessful = ( status == Status.STATUS_COMMITTED );
jdbcContext.afterTransactionCompletion( wasSuccessful, hibernateTransaction );
}
finally {
uploadArchives {
repositories.mavenDeployer {
name = 'jbossDeployer'
configuration = configurations.deployerJars
pom.project pomConfig
repository(url: "https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/")
snapshotRepository(url: "https://repository.jboss.org/nexus/content/repositories/snapshots")
}
}