Skip to content

Commit 97f974f

Browse files
committed
changing to old maven publishing, since the newer plugin doesn't seem to
have the required features
1 parent d95b064 commit 97f974f

File tree

1 file changed

+38
-15
lines changed

1 file changed

+38
-15
lines changed

build.gradle

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
apply plugin: 'java'
22
apply plugin: 'maven'
3-
apply plugin: 'maven-publish'
43
apply plugin: 'signing'
54

65
group = 'com.unquietcode.tools.spring'
@@ -27,22 +26,46 @@ artifacts {
2726
archives javadocJar
2827
}
2928

30-
def AorB = { String a, String b ->
31-
return a != null && !a.trim().isEmpty() ? a : b;
32-
}
29+
uploadArchives {
30+
repositories {
31+
mavenDeployer {
32+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
3333

34-
publishing {
35-
publications {
36-
mavenJava(MavenPublication) {
37-
from components.java
38-
artifact sourcesJar
39-
artifact javadocJar
40-
}
41-
}
34+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
35+
authentication(userName: ossrhUsername, password: ossrhPassword)
36+
}
4237

43-
repositories {
44-
maven {
45-
url AorB(System.getProperty("maven.deploy.repository"), "$buildDir/repo")
38+
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
39+
authentication(userName: ossrhUsername, password: ossrhPassword)
40+
}
41+
42+
pom.project {
43+
name 'Spring Generics'
44+
packaging 'jar'
45+
description 'Procedurally extracted version of the Spring Framework\'s wonderful generics utilities.'
46+
url 'https://github.com/UnquietCode/spring-generics'
47+
48+
scm {
49+
connection 'scm:git:https://github.com/UnquietCode/spring-generics.git'
50+
developerConnection 'scm:git:https://github.com/UnquietCode/spring-generics.git'
51+
url 'https://github.com/SomMeri/less4j'
52+
}
53+
54+
licenses {
55+
license {
56+
name 'The Apache License, Version 2.0'
57+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
58+
}
59+
}
60+
61+
developers {
62+
developer {
63+
id 'unquietcode'
64+
name 'Benjamin Fagin'
65+
email 'blouis@unquietcode.com'
66+
}
67+
}
68+
}
4669
}
4770
}
4871
}

0 commit comments

Comments
 (0)