Skip to content

Commit bbf5621

Browse files
committed
INTEXT-27 - SMB Adapter - Upgrade build to Gradle 1.2
For reference: https://jira.springsource.org/browse/INTEXT-27
1 parent 063253d commit bbf5621

File tree

5 files changed

+30
-25
lines changed

5 files changed

+30
-25
lines changed

spring-integration-smb/build.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ repositories {
2222
}
2323

2424
// ensure JDK 5 compatibility (GRADLE-18; INT-1578)
25-
sourceCompatibility=1.5
26-
targetCompatibility=1.5
25+
sourceCompatibility=1.6
26+
targetCompatibility=1.6
2727

2828
ext {
2929
aspectjVersion = '1.6.8'
@@ -33,12 +33,12 @@ ext {
3333
groovyVersion = '1.8.5'
3434
jacksonVersion = '1.9.2'
3535
javaxActivationVersion = '1.1.1'
36-
junitVersion = '4.8.2'
36+
junitVersion = '4.10'
3737
log4jVersion = '1.2.12'
3838
mockitoVersion = '1.9.0'
3939

40-
springVersion = '3.1.1.RELEASE'
41-
springIntegrationVersion = '2.1.2.RELEASE'
40+
springVersion = '3.1.3.RELEASE'
41+
springIntegrationVersion = '2.2.0.RC2'
4242

4343
}
4444

@@ -293,5 +293,5 @@ task dist(dependsOn: assemble) {
293293

294294
task wrapper(type: Wrapper) {
295295
description = 'Generates gradlew[.bat] scripts'
296-
gradleVersion = '1.0'
296+
gradleVersion = '1.2'
297297
}
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Aug 17 01:34:28 EDT 2012
1+
#Thu Nov 08 10:44:45 EST 2012
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=http\://services.gradle.org/distributions/gradle-1.0-bin.zip
6+
distributionUrl=http\://services.gradle.org/distributions/gradle-1.2-bin.zip

spring-integration-smb/gradlew

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
##############################################################################
44
##
@@ -101,7 +101,7 @@ if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
101101
warn "Could not set maximum file descriptor limit: $MAX_FD"
102102
fi
103103
else
104-
warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
104+
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105105
fi
106106
fi
107107

spring-integration-smb/src/main/java/org/springframework/integration/smb/session/SmbSession.java

+20-15
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@
3535
import org.springframework.util.StringUtils;
3636

3737
/**
38-
* Implementation of the {@link Session} interface for Server Message Block (SMB)
39-
* also known as Common Internet File System (CIFS). The Samba project set out to
38+
* Implementation of the {@link Session} interface for Server Message Block (SMB)
39+
* also known as Common Internet File System (CIFS). The Samba project set out to
4040
* create non-Windows implementations of SMB. Often Samba is thus used synonymously to SMB.
41-
*
42-
* SMB is an application-layer network protocol that manages shared access to files, printers
41+
*
42+
* SMB is an application-layer network protocol that manages shared access to files, printers
4343
* and other networked resources.
4444
*
45-
* See <a href="http://en.wikipedia.org/wiki/Server_Message_Block">Server Message Block</a>
45+
* See <a href="http://en.wikipedia.org/wiki/Server_Message_Block">Server Message Block</a>
4646
* for more details.
4747
*
48-
* Inspired by the sprint-integration-ftp implementation done by Mark Fisher and Oleg Zhurakousky.
48+
* Inspired by the sprint-integration-ftp implementation done by Mark Fisher and Oleg Zhurakousky.
4949
*
5050
* @author Markus Spann
5151
* @author Mark Fisher
@@ -74,7 +74,7 @@ public class SmbSession implements Session<SmbFile> {
7474
* @param _shareAndDir server root SMB directory
7575
* @param _replaceFile replace existing files if true
7676
* @param _useTempFile make use temporary files when writing
77-
* @throws IOException in case of I/O errors
77+
* @throws IOException in case of I/O errors
7878
*/
7979
SmbSession(String _host, int _port, String _domain, String _user, String _password, String _shareAndDir, boolean _replaceFile, boolean _useTempFile) throws IOException {
8080
this(new SmbShare(new SmbConfig(_host, _port, _domain, _user, _password, _shareAndDir)));
@@ -179,8 +179,8 @@ public void read(String _path, OutputStream _outputStream) throws IOException {
179179
}
180180

181181
/**
182-
* Writes contents of the specified {@link InputStream} to the remote resource
183-
* specified by path. Remote directories are created implicitely as required.
182+
* Writes contents of the specified {@link InputStream} to the remote resource
183+
* specified by path. Remote directories are created implicitely as required.
184184
* @param _inputStream input stream
185185
* @param _path remote path (of a file) to write to
186186
* @throws IOException on error conditions returned by a CIFS server
@@ -241,7 +241,7 @@ public SmbFile write(byte[] _contents, String _path) throws IOException {
241241
/**
242242
* Creates the specified remote path if not yet exists.
243243
* If the specified resource is a file rather than a path, creates all directories leading
244-
* to that file.
244+
* to that file.
245245
* @param _path remote path to create
246246
* @return always true (error states are express by exceptions)
247247
* @throws IOException on error conditions returned by a CIFS server
@@ -362,7 +362,7 @@ public boolean isOpen() {
362362
}
363363

364364
/**
365-
* Convenience method to write the specified input stream to a remote path and return
365+
* Convenience method to write the specified input stream to a remote path and return
366366
* the path as an SMB file object.
367367
* @param _inputStream input stream
368368
* @param _path remote path (of a file) to write to
@@ -380,7 +380,7 @@ SmbFile writeAndClose(InputStream _inputStream, String _path) throws IOException
380380
* @param _path remote path
381381
* @param _isDirectory Boolean object to indicate the path is a directory, may be null
382382
* @return SmbFile object for path
383-
* @throws IOException in case of I/O errors
383+
* @throws IOException in case of I/O errors
384384
*/
385385
private SmbFile createSmbFileObject(String _path, Boolean _isDirectory) throws IOException {
386386
String path = StringUtils.cleanPath(_path);
@@ -389,7 +389,7 @@ private SmbFile createSmbFileObject(String _path, Boolean _isDirectory) throws I
389389
}
390390

391391
SmbFile smbFile = new SmbFile(smbShare, path);
392-
392+
393393
boolean appendFileSeparator = !path.endsWith(FILE_SEPARATOR);
394394
if (appendFileSeparator) {
395395
try {
@@ -428,10 +428,10 @@ public SmbFile createSmbDirectoryObject(String _path) throws IOException {
428428
static void configureJcifs() {
429429
// TODO jcifs.Config.setProperty("jcifs.smb.client.useExtendedSecurity", "false");
430430
// TODO jcifs.Config.setProperty("jcifs.smb.client.disablePlainTextPasswords", "false");
431-
431+
432432
// set JCIFS SMB client library' log level unless already configured by system property
433433
final String sysPropLogLevel = "jcifs.util.loglevel";
434-
434+
435435
if (jcifs.Config.getProperty(sysPropLogLevel) == null) {
436436
// set log level according to this class' logger's log level.
437437
Log log = LogFactory.getLog(SmbSession.class);
@@ -445,4 +445,9 @@ static void configureJcifs() {
445445
}
446446
}
447447

448+
@Override
449+
public String[] listNames(String path) throws IOException {
450+
throw new UnsupportedOperationException("Not implemented yet");
451+
}
452+
448453
}

0 commit comments

Comments
 (0)