I have a problem with my gradle script construction:
apply plugin: 'java'
repositories {
mavenCentral()
}
configurations {
ftpAntTask
}
ext.priv = parseConfig(file('private.properties'))
version = '0.0.1'
group = 'randers.notenoughvocab'
archivesBaseName = 'NotEnoughVocab'
dependencies {
ftpAntTask('org.apache.ant:ant-commons-net:1.8.4') {
module('commons-net:commons-net:1.4.1') {
dependencies 'oro:oro:2.0.8:jar'
}
}
}
void ftp(Map args, Closure antFileset = {}) {
ant {
taskdef(name: 'ftp',
classname: 'org.apache.tools.ant.taskdefs.optional.net.FTP',
classpath: configurations.ftpAntTask.asPath)
Map ftpArgs = args + [
verbose : 'yes',
server : priv.host,
userid : priv.user,
password: priv.pass
]
delegate.ftp(ftpArgs) {
antFileset.delegate = delegate
antFileset()
}
}
}
def parseConfig(File config) {
config.withReader {
def prop = new Properties()
prop.load(it)
return (new ConfigSlurper().parse(prop))
}
}
task('uploadJavadoc', dependsOn: 'javadoc') << {
ftp(action: 'send') {
fileset(dir: 'build/docs/javadoc')
}
}
jar {
manifest {
attributes 'Main-Class': 'randers.notenoughvocab.main.NotEnoughVocab'
}
}
task('prepareBuild') {
ant.replace(file: 'src/main/java/randers/notenoughvocab/main/Reference.java', token: '@VERSION@', value: version)
}
build.dependsOn(tasks.prepareBuild)
The following error message appears:
could not install file: 425 Could not open data connection to port 55080: connection timeout
It seems to work for others . The server specified in private.propertiesworks fine with an FTP client, for example FileZilla, I do not quit the game. I also tried the same with a local FTP server, but since the transport has no bandwidth limitations, the transport was instant.
What can I do to prevent a timeout? And is there a port 55080I have to worry about?
, , priv.host, priv.user priv.pass .