Skip to content

Commit 86a4c57

Browse files
committed
Add maven repo releasing. (and cleanup accidentally committed logging.)
1 parent badeb54 commit 86a4c57

File tree

2 files changed

+76
-15
lines changed

2 files changed

+76
-15
lines changed

build.gradle

+76-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
apply plugin: 'java'
2-
version = '1.2'
2+
apply plugin: 'maven'
3+
apply plugin: 'signing'
4+
5+
group = 'com.orangefunction'
6+
version = '2.0.0'
37

48
repositories {
59
mavenCentral()
@@ -14,6 +18,75 @@ dependencies {
1418
compile group: 'org.apache.tomcat', name: 'tomcat-catalina', version: '7.0.27'
1519
compile group: 'redis.clients', name: 'jedis', version: '2.5.2'
1620
compile group: 'org.apache.commons', name: 'commons-pool2', version: '2.2'
17-
// compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
18-
// testCompile group: 'junit', name: 'junit', version: '4.+'
21+
compile group: 'commons-codec', name: 'commons-codec', version: '1.9'
22+
23+
testCompile group: 'junit', name: 'junit', version: '4.+'
24+
testCompile 'org.hamcrest:hamcrest-core:1.3'
25+
testCompile 'org.hamcrest:hamcrest-library:1.3'
26+
testCompile 'org.mockito:mockito-all:1.9.5'
27+
testCompile group: 'org.apache.tomcat', name: 'tomcat-coyote', version: '7.0.27'
28+
}
29+
30+
task javadocJar(type: Jar, dependsOn: javadoc) {
31+
classifier = 'javadoc'
32+
from 'build/docs/javadoc'
33+
}
34+
35+
task sourcesJar(type: Jar) {
36+
from sourceSets.main.allSource
37+
classifier = 'sources'
38+
}
39+
40+
artifacts {
41+
archives jar
42+
43+
archives javadocJar
44+
archives sourcesJar
45+
}
46+
47+
signing {
48+
sign configurations.archives
49+
}
50+
51+
uploadArchives {
52+
repositories {
53+
mavenDeployer {
54+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
55+
56+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
57+
authentication(userName: sonatypeUsername, password: sonatypePassword)
58+
}
59+
//repository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
60+
// authentication(userName: sonatypeUsername, password: sonatypePassword)
61+
//}
62+
63+
pom.project {
64+
name 'tomcat-redis-session-manager'
65+
packaging 'jar'
66+
description 'Tomcat Redis Session Manager is a Tomcat extension to store sessions in Redis'
67+
url 'https://github.com/jcoleman/tomcat-redis-session-manager'
68+
69+
scm {
70+
url 'scm:[email protected]:jcoleman/tomcat-redis-session-manager.git'
71+
connection 'scm:[email protected]:jcoleman/tomcat-redis-session-manager.git'
72+
developerConnection 'scm:[email protected]:jcoleman/tomcat-redis-session-manager.git'
73+
}
74+
75+
licenses {
76+
license {
77+
name 'MIT'
78+
url 'http://opensource.org/licenses/MIT'
79+
distribution 'repo'
80+
}
81+
}
82+
83+
developers {
84+
developer {
85+
id 'jcoleman'
86+
name 'James Coleman'
87+
}
88+
}
89+
}
90+
}
91+
}
1992
}

src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java

-12
Original file line numberDiff line numberDiff line change
@@ -605,18 +605,6 @@ protected boolean saveInternal(Jedis jedis, Session session, boolean forceSave)
605605

606606
log.trace("Save was determined to be necessary");
607607

608-
/*if (forceSave) {
609-
log.info("save was necessary: forceSave=true");
610-
} else if (redisSession.isDirty()) {
611-
log.info("save was necessary: isDirty()=true");
612-
} else if (null == (isCurrentSessionPersisted = this.currentSessionIsPersisted.get())) {
613-
log.info("save was necessary: isCurrentSessionPersisted=null");
614-
} else if (!isCurrentSessionPersisted) {
615-
log.info("save was necessary: isCurrentSessionPersisted=false");
616-
} else if (!Arrays.equals(originalSessionAttributesHash, (sessionAttributesHash = serializer.attributesHashFrom(redisSession)))) {
617-
log.info("save was necessary: sessionsAttributeHashChanged: orig=" + new String(Base64.encodeBase64(originalSessionAttributesHash)) + " new=" + new String(Base64.encodeBase64(sessionAttributesHash)));
618-
}*/
619-
620608
if (null == sessionAttributesHash) {
621609
sessionAttributesHash = serializer.attributesHashFrom(redisSession);
622610
}

0 commit comments

Comments
 (0)