diff --git a/build.gradle b/build.gradle index ef316f4393b5108a802f83558680fda198824279..06a3cc2003480c3d3dbabfabdcc85b4efe73b3be 100644 --- a/build.gradle +++ b/build.gradle @@ -8,6 +8,9 @@ apply plugin: 'vagrant' apply plugin: 'war' apply plugin: 'wrapper' +import org.apache.tools.ant.filters.FixCrLfFilter +import org.apache.tools.ant.filters.ReplaceTokens + group = 'it.unibz.inf.isochrones' version = '1.1-SNAPSHOT' @@ -54,14 +57,17 @@ buildscript { } dependencies { - compile group: 'postgresql', name: 'postgresql', version:'9.1-901.jdbc4' + compile group: 'org.postgresql', name: 'postgresql', version:'9.3-1100-jdbc41' compile group: 'commons-dbutils', name: 'commons-dbutils', version:'1.2' compile group: 'commons-httpclient', name: 'commons-httpclient', version:'3.1' - compile group: 'it.geosolutions', name: 'geoserver-manager', version:'1.5.1' + compile group: 'it.geosolutions', name: 'geoserver-manager', version:'1.5.2' compile group: 'javax.servlet', name: 'servlet-api', version:'2.5' - compile group: 'org.cometd.java', name: 'bayeux-api', version:'2.4.3' - compile group: 'org.cometd.java', name: 'cometd-java-server', version:'2.4.3' - compile group: 'org.cometd.javascript', name: 'cometd-javascript-jquery', version:'2.4.3' + compile group: 'org.cometd.java', name: 'bayeux-api', version:'2.7+' + compile group: 'org.cometd.java', name: 'cometd-java-server', version:'2.7+' + compile group: 'org.cometd.javascript', name: 'cometd-javascript-jquery', version:'2.7+' + compile(group: 'org.eclipse.jetty', name: 'jetty-servlets', version:'8+') { + exclude(module: 'jetty-client') + } compile group: 'org.json', name: 'json', version:'20131018' compile group: 'org.postgis', name: 'postgis-jdbc', version:'1.3.3' @@ -139,6 +145,12 @@ vagrant { provider = 'virtualbox' } +vagrantDestroy.doFirst { + if (!vagrantDir.isDirectory()) { + throw new StopExecutionException() + } +} + task javadocJar(type: Jar, dependsOn: javadoc) { description = 'Builds a jar file including javadoc' from javadoc.destinationDir @@ -170,6 +182,20 @@ task testSimple(type: Test, dependsOn: testClasses) { include '**/RunSimple*' } +task vagrantExport(type: Zip) { + description = 'Builds an archive file that contains the files, needed to create the vagrant box' + + from 'etc/vagrant' + + appendix = '' + baseName = 'vagrantbox' + classifier = '' + version = '' + + filter(FixCrLfFilter) + filter(ReplaceTokens, tokens: [db_username: 'myUser', db_password: 'myPassword']) +} + task vagrantPrepare << { description = 'Prepares the vagrant environment (creates directory, copies Vagrantfile, ...)' @@ -181,12 +207,9 @@ task vagrantPrepare << { sync { from files('etc/vagrant') into vagrantDir - } -} -vagrantDestroy.doFirst { - if (!vagrantDir.isDirectory()) { - throw new StopExecutionException() + filter(FixCrLfFilter) + filter(ReplaceTokens, tokens: [db_username: 'niko', db_password: 'secretPhdPassword#2013!']) } }