HHH-5904 - Deploy just testing artifacts from hibernate-core, not all tests
This commit is contained in:
parent
ac27759f2e
commit
3ba79384f0
|
@ -193,6 +193,8 @@ subprojects { subProject ->
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
subProject.basePomConfig = pomConfig
|
||||||
|
|
||||||
configure(install.repositories.mavenInstaller) {
|
configure(install.repositories.mavenInstaller) {
|
||||||
pom.project pomConfig
|
pom.project pomConfig
|
||||||
}
|
}
|
||||||
|
@ -202,8 +204,8 @@ subprojects { subProject ->
|
||||||
name = 'jbossDeployer'
|
name = 'jbossDeployer'
|
||||||
configuration = configurations.deployerJars
|
configuration = configurations.deployerJars
|
||||||
pom.project pomConfig
|
pom.project pomConfig
|
||||||
repository(url: "https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/")
|
repository(id: "jboss-releases-repository", url: "https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/")
|
||||||
snapshotRepository(url: "https://repository.jboss.org/nexus/content/repositories/snapshots")
|
snapshotRepository(id: "jboss-snapshots-repository", url: "https://repository.jboss.org/nexus/content/repositories/snapshots")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ import org.dom4j.Document;
|
||||||
import org.dom4j.DocumentException;
|
import org.dom4j.DocumentException;
|
||||||
import org.dom4j.Element;
|
import org.dom4j.Element;
|
||||||
import org.dom4j.io.SAXReader;
|
import org.dom4j.io.SAXReader;
|
||||||
import org.gradle.api.artifacts.maven.MavenDeployer;
|
|
||||||
import org.xml.sax.InputSource;
|
import org.xml.sax.InputSource;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -56,10 +55,6 @@ public class StandardMavenAuthenticationProvider implements AuthenticationProvid
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Authentication determineAuthentication(RemoteRepository remoteRepository) {
|
public Authentication determineAuthentication(RemoteRepository remoteRepository) {
|
||||||
if ( ! MavenDeployer.class.isInstance( remoteRepository ) ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( repositoryAuthenticationMap == null ) {
|
if ( repositoryAuthenticationMap == null ) {
|
||||||
loadRepositoryAuthenticationMap();
|
loadRepositoryAuthenticationMap();
|
||||||
}
|
}
|
||||||
|
@ -117,7 +112,6 @@ public class StandardMavenAuthenticationProvider implements AuthenticationProvid
|
||||||
private SAXReader buildSAXReader() {
|
private SAXReader buildSAXReader() {
|
||||||
SAXReader saxReader = new SAXReader();
|
SAXReader saxReader = new SAXReader();
|
||||||
saxReader.setMergeAdjacentText( true );
|
saxReader.setMergeAdjacentText( true );
|
||||||
saxReader.setValidation( true );
|
|
||||||
return saxReader;
|
return saxReader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,20 +46,54 @@ ideaModule {
|
||||||
sourceDirs.add( file( '$buildDir/generated-src/antlr/main' ) )
|
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) {
|
task testingJar(type: Jar, dependsOn: compileTestJava) {
|
||||||
from sourceSets.test.classes
|
from sourceSets.test.classes
|
||||||
includes += "org/hibernate/testing/*"
|
includes += "org/hibernate/testing/**"
|
||||||
baseName = 'hibernate-testing'
|
baseName = 'hibernate-testing'
|
||||||
}
|
}
|
||||||
|
|
||||||
task testingSourcesJar(type: Jar, dependsOn: compileTestJava) {
|
task testingSourcesJar(type: Jar, dependsOn: compileTestJava) {
|
||||||
from sourceSets.test.allSource
|
from sourceSets.test.allSource
|
||||||
includes += "org/hibernate/testing/*"
|
includes += "org/hibernate/testing/**"
|
||||||
baseName = 'hibernate-testing'
|
baseName = 'hibernate-testing'
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
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
|
Loading…
Reference in New Issue