HHH-5904 - Deploy just testing artifacts from hibernate-core, not all tests

This commit is contained in:
Steve Ebersole 2011-02-10 09:45:28 -06:00 committed by JPAV
parent 7b9d7f2c25
commit 4fd609e41e
3 changed files with 41 additions and 11 deletions

View File

@ -227,6 +227,8 @@ subprojects { subProject ->
}
}
subProject.basePomConfig = pomConfig
configure(install.repositories.mavenInstaller) {
pom.project pomConfig
}
@ -236,8 +238,8 @@ subprojects { subProject ->
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")
repository(id: "jboss-releases-repository", url: "https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/")
snapshotRepository(id: "jboss-snapshots-repository", url: "https://repository.jboss.org/nexus/content/repositories/snapshots")
}
}

View File

@ -29,7 +29,6 @@ import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import org.gradle.api.artifacts.maven.MavenDeployer;
import org.xml.sax.InputSource;
import org.slf4j.Logger;
@ -56,10 +55,6 @@ public class StandardMavenAuthenticationProvider implements AuthenticationProvid
@Override
public Authentication determineAuthentication(RemoteRepository remoteRepository) {
if ( ! MavenDeployer.class.isInstance( remoteRepository ) ) {
return null;
}
if ( repositoryAuthenticationMap == null ) {
loadRepositoryAuthenticationMap();
}
@ -117,7 +112,6 @@ public class StandardMavenAuthenticationProvider implements AuthenticationProvid
private SAXReader buildSAXReader() {
SAXReader saxReader = new SAXReader();
saxReader.setMergeAdjacentText( true );
saxReader.setValidation( true );
return saxReader;
}

View File

@ -48,20 +48,54 @@ ideaModule {
sourceDirs.add( file( '$buildDir/generated-src/antlr/main' ) )
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// This entire section below is all about creating, installing and uploading the hibernate-testing artifacts.
// This is obviously extremely verbose. Check back once Gradle goes m2 for 1.0 to see about the MavenPublication
// approach Adam talked about as a means to make this more succinct and natural.
// todo : check back once Gradle goes m2 for 1.0 to see about the MavenPublication approach
configurations {
testing
}
task testingJar(type: Jar, dependsOn: compileTestJava) {
from sourceSets.test.classes
includes += "org/hibernate/testing/*"
includes += "org/hibernate/testing/**"
baseName = 'hibernate-testing'
}
task testingSourcesJar(type: Jar, dependsOn: compileTestJava) {
from sourceSets.test.allSource
includes += "org/hibernate/testing/*"
includes += "org/hibernate/testing/**"
baseName = 'hibernate-testing'
classifier = 'sources'
}
artifacts {
testing testingJar, testingSourcesJar
testing testingJar, testingSourcesJar
}
// ugh, lots of duplication with uploadArchives
uploadTesting {
repositories.mavenDeployer {
name = 'jbossDeployer'
configuration = configurations.deployerJars
pom.project basePomConfig
pom.artifactId = 'hibernate-testing'
repository(id: "jboss-releases-repository", url: "https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/")
snapshotRepository(id: "jboss-snapshots-repository", url: "https://repository.jboss.org/nexus/content/repositories/snapshots")
}
}
uploadArchives.dependsOn uploadTesting
task installTesting(type:Upload, dependsOn: [testingJar,testingSourcesJar]) {
configuration = configurations.testing
repositories.mavenInstaller {
name = RepositoryHandler.DEFAULT_MAVEN_INSTALLER_NAME
pom.project basePomConfig
pom.artifactId = 'hibernate-testing'
}
}
install.dependsOn installTesting
uploadTesting.dependsOn installTesting