Permalink
Browse files

INTEXT-27 + INTEXT-46 Upgrade to Gradle 1.4

* INTEXT-46 - Make Build JDK7 Ready + Cleanup
  • Loading branch information...
Gunnar Hillert
Gunnar Hillert committed Feb 22, 2013
1 parent b1448bd commit ca708e08270ca20b88f5e26ad9aad4d2c769e8ee
Showing with 521 additions and 510 deletions.
  1. +8 −2 spring-integration-smb/README.md
  2. +34 −45 spring-integration-smb/build.gradle
  3. BIN spring-integration-smb/gradle/wrapper/gradle-wrapper.jar
  4. +2 −2 spring-integration-smb/gradle/wrapper/gradle-wrapper.properties
  5. +2 −2 spring-integration-smb/gradlew
  6. +4 −4 spring-integration-smb/publish-maven.gradle
  7. +1 −1 ...-smb/src/main/java/org/springframework/integration/smb/config/SmbInboundChannelAdapterParser.java
  8. +2 −2 ...integration-smb/src/main/java/org/springframework/integration/smb/config/SmbNamespaceHandler.java
  9. +2 −2 ...-smb/src/main/java/org/springframework/integration/smb/filters/SmbRegexPatternFileListFilter.java
  10. +3 −1 ...smb/src/main/java/org/springframework/integration/smb/filters/SmbSimplePatternFileListFilter.java
  11. +2 −2 ...ion-smb/src/main/java/org/springframework/integration/smb/inbound/SmbInboundFileSynchronizer.java
  12. +1 −3 ...in/java/org/springframework/integration/smb/inbound/SmbInboundFileSynchronizingMessageSource.java
  13. +8 −8 spring-integration-smb/src/main/java/org/springframework/integration/smb/session/SmbConfig.java
  14. +59 −58 spring-integration-smb/src/main/java/org/springframework/integration/smb/session/SmbSession.java
  15. +5 −5 ...-integration-smb/src/main/java/org/springframework/integration/smb/session/SmbSessionFactory.java
  16. +6 −2 spring-integration-smb/src/main/java/org/springframework/integration/smb/session/SmbShare.java
  17. +23 −19 spring-integration-smb/src/main/java/org/springframework/integration/smb/session/SmbUtils.java
  18. +2 −2 spring-integration-smb/src/main/resources/META-INF/spring.schemas
  19. +95 −71 ...ramework/integration/smb/config/{spring-integration-smb-2.0.xsd → spring-integration-smb-1.0.xsd}
  20. BIN ...tion-smb/src/main/resources/org/springframework/integration/smb/config/spring-integration-smb.gif
  21. +47 −49 spring-integration-smb/src/test/java/org/springframework/integration/smb/AbstractBaseTest.java
  22. +20 −21 ...egration-smb/src/test/java/org/springframework/integration/smb/SmbMessageHistoryTests-context.xml
  23. +2 −2 spring-integration-smb/src/test/java/org/springframework/integration/smb/SmbMessageHistoryTests.java
  24. +33 −34 ...tegration-smb/src/test/java/org/springframework/integration/smb/SmbParserInboundTests-context.xml
  25. +22 −23 ...tion-smb/src/test/java/org/springframework/integration/smb/SmbParserInboundTests-fail-context.xml
  26. +1 −1 spring-integration-smb/src/test/java/org/springframework/integration/smb/SmbParserInboundTests.java
  27. +24 −26 ...t/java/org/springframework/integration/smb/config/SmbInboundChannelAdapterParserTests-context.xml
  28. +32 −28 ...src/test/java/org/springframework/integration/smb/config/SmbInboundChannelAdapterParserTests.java
  29. +24 −28 ...c/test/java/org/springframework/integration/smb/config/SmbInboundChannelAdapterSample-context.xml
  30. +4 −3 ...ration-smb/src/test/java/org/springframework/integration/smb/config/SmbInboundOutboundSample.java
  31. +29 −29 .../java/org/springframework/integration/smb/config/SmbOutboundChannelAdapterParserTests-context.xml
  32. +6 −5 ...rc/test/java/org/springframework/integration/smb/config/SmbOutboundChannelAdapterParserTests.java
  33. +14 −15 .../test/java/org/springframework/integration/smb/config/SmbOutboundChannelAdapterSample-context.xml
  34. +3 −11 .../java/org/springframework/integration/smb/inbound/SmbInboundRemoteFileSystemSynchronizerTest.java
  35. +0 −3 ...g-integration-smb/src/test/java/org/springframework/integration/smb/session/MySmbSessionTest.java
  36. +1 −1 spring-integration-smb/src/test/resources/log4j.properties
@@ -1,3 +1,9 @@
-Spring Integration Smb Adapter
-=================================================
+Spring Integration Smb Support
+==============================
+
+## Introduction
+
+This module add Spring Integration* support for [Server Message Block][] (SMB).
+
+[Server Message Block]: http://en.wikipedia.org/wiki/Server_Message_Block
@@ -14,7 +14,7 @@ apply from: "${rootProject.projectDir}/publish-maven.gradle"
apply plugin: 'eclipse'
apply plugin: 'idea'
-group = 'org.springframework.integration.smb'
+group = 'org.springframework.integration'
repositories {
maven { url 'http://repo.springsource.org/libs-milestone' }
@@ -29,16 +29,17 @@ ext {
aspectjVersion = '1.6.8'
cglibVersion = '2.2'
commonsNetVersion = '3.0.1'
- easymockVersion = '2.3'
groovyVersion = '1.8.5'
jacksonVersion = '1.9.2'
javaxActivationVersion = '1.1.1'
- junitVersion = '4.10'
+ junitVersion = '4.11'
log4jVersion = '1.2.12'
mockitoVersion = '1.9.0'
springVersion = '3.1.3.RELEASE'
- springIntegrationVersion = '2.2.0.RC2'
+ springIntegrationVersion = '2.2.1.RELEASE'
+
+ idPrefix = 'smb'
}
@@ -49,7 +50,7 @@ dependencies {
compile "org.springframework.integration:spring-integration-stream:$springIntegrationVersion"
compile "jcifs:jcifs:1.3.17"
compile "org.springframework:spring-context-support:$springVersion"
- compile("javax.activation:activation:$javaxActivationVersion") { optional = true }
+ compile("javax.activation:activation:$javaxActivationVersion", optional)
testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion"
}
@@ -80,8 +81,6 @@ dependencies {
testCompile "cglib:cglib-nodep:$cglibVersion"
testCompile "junit:junit-dep:$junitVersion"
testCompile "log4j:log4j:$log4jVersion"
- testCompile "org.easymock:easymock:$easymockVersion"
- testCompile "org.easymock:easymockclassextension:$easymockVersion"
testCompile "org.hamcrest:hamcrest-all:1.1"
testCompile "org.mockito:mockito-all:$mockitoVersion"
testCompile "org.springframework:spring-test:$springVersion"
@@ -155,19 +154,16 @@ sonar {
task api(type: Javadoc) {
group = 'Documentation'
- description = 'Generates aggregated Javadoc API documentation.'
+ description = 'Generates the Javadoc API documentation.'
title = "${rootProject.description} ${version} API"
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = rootProject.description
options.overview = 'src/api/overview.html'
- source subprojects.collect { project ->
- project.sourceSets.main.allJava
- }
+
+ source = sourceSets.main.allJava
+ classpath = project.sourceSets.main.compileClasspath
destinationDir = new File(buildDir, "api")
- classpath = files(subprojects.collect { project ->
- project.sourceSets.main.compileClasspath
- })
}
task schemaZip(type: Zip) {
@@ -176,27 +172,23 @@ task schemaZip(type: Zip) {
description = "Builds -${classifier} archive containing all " +
"XSDs for deployment at static.springframework.org/schema."
- subprojects.each { subproject ->
- def Properties schemas = new Properties();
- def shortName = subproject.name.replaceFirst("${rootProject.name}-", '')
- if (subproject.name.endsWith("-core")) {
- shortName = ''
- }
+ def Properties schemas = new Properties();
+ def shortName = idPrefix.replaceFirst("${idPrefix}-", '')
- subproject.sourceSets.main.resources.find {
- it.path.endsWith('META-INF/spring.schemas')
- }?.withInputStream { schemas.load(it) }
+ project.sourceSets.main.resources.find {
+ it.path.endsWith('META-INF/spring.schemas')
+ }?.withInputStream { schemas.load(it) }
- for (def key : schemas.keySet()) {
- File xsdFile = subproject.sourceSets.main.resources.find {
- it.path.endsWith(schemas.get(key))
- }
- assert xsdFile != null
- into ("integration/${shortName}") {
- from xsdFile.path
- }
+ for (def key : schemas.keySet()) {
+ File xsdFile = project.sourceSets.main.resources.find {
+ it.path.endsWith(schemas.get(key))
+ }
+ assert xsdFile != null
+ into ("integration/${shortName}") {
+ from xsdFile.path
}
}
+
}
task docsZip(type: Zip) {
@@ -241,12 +233,10 @@ task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
into "${baseDir}/schema"
}
- subprojects.each { subproject ->
- into ("${baseDir}/libs") {
- from subproject.jar
- from subproject.sourcesJar
- from subproject.javadocJar
- }
+ into ("${baseDir}/libs") {
+ from project.jar
+ from project.sourcesJar
+ from project.javadocJar
}
}
@@ -262,14 +252,13 @@ task depsZip(type: Zip, dependsOn: distZip) { zipTask ->
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(":${zipTask.name}")) {
- def projectNames = rootProject.subprojects*.name
+ def projectName = rootProject.name
def artifacts = new HashSet()
- subprojects.each { subproject ->
- subproject.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact ->
- def dependency = artifact.moduleVersion.id
- if (!projectNames.contains(dependency.name)) {
- artifacts << artifact.file
- }
+
+ rootProject.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact ->
+ def dependency = artifact.moduleVersion.id
+ if (!projectName.equals(dependency.name)) {
+ artifacts << artifact.file
}
}
@@ -293,5 +282,5 @@ task dist(dependsOn: assemble) {
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
- gradleVersion = '1.2'
+ gradleVersion = '1.4'
}
Binary file not shown.
@@ -1,6 +1,6 @@
-#Thu Nov 08 10:44:45 EST 2012
+#Fri Feb 22 11:59:38 EST 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.2-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.4-bin.zip
@@ -61,9 +61,9 @@ while [ -h "$PRG" ] ; do
fi
done
SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/"
+cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
-cd "$SAVED"
+cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -31,7 +31,7 @@ def customizePom(pom, gradleProject) {
generatedPom.project {
name = gradleProject.description
description = gradleProject.description
- url = 'https://github.com/SpringSource/spring-integration'
+ url = 'https://github.com/SpringSource/spring-integration-extensions'
organization {
name = 'SpringSource'
url = 'http://springsource.org'
@@ -44,9 +44,9 @@ def customizePom(pom, gradleProject) {
}
}
scm {
- url = 'https://github.com/SpringSource/spring-integration'
- connection = 'scm:git:git://github.com/SpringSource/spring-integration'
- developerConnection = 'scm:git:git://github.com/SpringSource/spring-integration'
+ url = 'https://github.com/SpringSource/spring-integration-extensions'
+ connection = 'scm:git:git://github.com/SpringSource/spring-integration-extensions'
+ developerConnection = 'scm:git:git://github.com/SpringSource/spring-integration-extensions'
}
developers {
@@ -21,7 +21,7 @@
* Parser for the SMB 'inbound-channel-adapter' element.
*
* @author Markus Spann
- * @since 2.1.1
+ * @since 1.0
*/
public class SmbInboundChannelAdapterParser extends AbstractRemoteFileInboundChannelAdapterParser {
@@ -22,11 +22,11 @@
* Provides namespace support for using SMB.
*
* @author Markus Spann
- * @since 2.1.1
+ * @since 1.0
*/
public class SmbNamespaceHandler extends AbstractIntegrationNamespaceHandler {
- public void init() {
+ public void init() {
registerBeanDefinitionParser("inbound-channel-adapter", new SmbInboundChannelAdapterParser());
registerBeanDefinitionParser("outbound-channel-adapter", new RemoteFileOutboundChannelAdapterParser()); // TODO need implementation for SMB?
}
@@ -23,9 +23,9 @@
/**
* Implementation of {@link AbstractRegexPatternFileListFilter} for SMB.
- *
+ *
* @author Markus Spann
- * @since 2.1.1
+ * @since 1.0
*/
public class SmbRegexPatternFileListFilter extends AbstractRegexPatternFileListFilter<SmbFile> {
@@ -21,8 +21,10 @@
/**
* Implementation of {@link AbstractSimplePatternFileListFilter} for SMB.
- *
+ *
* @author Markus Spann
+ * @since 1.0
+ *
*/
public class SmbSimplePatternFileListFilter extends AbstractSimplePatternFileListFilter<SmbFile> {
@@ -26,7 +26,7 @@
* An implementation of {@link AbstractInboundFileSynchronizer} for SMB.
*
* @author Markus Spann
- * @since 2.1.1
+ * @since 1.0
*/
public class SmbInboundFileSynchronizer extends AbstractInboundFileSynchronizer<SmbFile> {
@@ -35,7 +35,7 @@
private final String toString;
/**
- * Create a synchronizer with the {@link SessionFactory} used to acquire
+ * Create a synchronizer with the {@link SessionFactory} used to acquire
* {@link org.springframework.integration.file.remote.session.Session} instances.
*/
public SmbInboundFileSynchronizer(SessionFactory<SmbFile> _sessionFactory) {
@@ -27,13 +27,11 @@
* A {@link org.springframework.integration.core.MessageSource} implementation for SMB.
*
* @author Markus Spann
- * @since 2.1.1
+ * @since 1.0
*/
public class SmbInboundFileSynchronizingMessageSource extends AbstractInboundFileSynchronizingMessageSource<SmbFile> {
- // CHECKSTYLE:OFF
private final static String componentType = "smb:inbound-channel-adapter";
- // CHECKSTYLE:ON
private final String toString;
public SmbInboundFileSynchronizingMessageSource(AbstractInboundFileSynchronizer<SmbFile> _synchronizer) {
@@ -28,7 +28,7 @@
* smb://[[[domain;]username[:password]@]server[:port]/[[share/[dir/]file]]][?[param=value[param2=value2[...]]]
*
* @author Markus Spann
- * @since 2.1.1
+ * @since 1.0
*/
public class SmbConfig {
@@ -149,8 +149,8 @@ String getHostPort() {
* @return the object
*/
public final SmbConfig validate() {
- Assert.hasText(getHost(), "host must not be empty in " + this);
- Assert.isTrue(getPort() >= 0, "port must be >= 0 in " + this);
+ Assert.hasText(getHost(), "host must not be empty in " + this);
+ Assert.isTrue(getPort() >= 0, "port must be >= 0 in " + this);
Assert.hasText(getShareAndDir(), "share must not be empty in " + this);
return this;
}
@@ -160,17 +160,17 @@ public final String getUrl() {
}
public final String getUrl(boolean _includePassword) {
- String domainUserPass = getDomainUserPass(_includePassword);
+ String domainUserPass = getDomainUserPass(_includePassword);
if (domainUserPass != null) {
try {
domainUserPass = URLEncoder.encode(domainUserPass, "UTF8");
- // CHECKSTYLE:OFF
- } catch (UnsupportedEncodingException _ex) {
- // CHECKSTYLE:ON
+ }
+ catch (UnsupportedEncodingException ex) {
+ throw new IllegalStateException(ex);
}
}
return String.format("smb://%s@%s/%s", domainUserPass, getHostPort(), StringUtils.cleanPath(this.shareAndDir));
- }
+ }
@Override
public String toString() {
Oops, something went wrong.

0 comments on commit ca708e0

Please sign in to comment.