diff --git a/pom.xml b/pom.xml index 2f5f9dfe..f847d31c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,319 +1,341 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 4.0.0 - com.tesobe - Social_Finance - 1.0 - war - Social Finance - 2011 - - 2.9.1 - 2.4 - - UTF-8 - ${project.build.sourceEncoding} - - 1.2-m1 - scaladocs/ - http://scala-tools.org/mvnsites/liftweb - + 4.0.0 + com.tesobe + Social_Finance + 1.0 + war + Social Finance + 2011 + + 2.10.5 + 2.10 + 2.6.2 + 2.6 + + UTF-8 + ${project.build.sourceEncoding} + + 1.2-m1 + scaladocs/ + http://scala-tools.org/mvnsites/liftweb + - - - scala-tools.releases - Scala-Tools Dependencies Repository for Releases - https://oss.sonatype.org/content/groups/scala-tools/ - + + + scala-tools.releases + Scala-Tools Dependencies Repository for Releases + https://oss.sonatype.org/content/groups/scala-tools/ + java.net.maven2 java.net Maven2 Repository http://download.java.net/maven/2/ - - scala-tools.snapshots - Scala-Tools Dependencies Repository for Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - - + + scala-tools.snapshots + Scala-Tools Dependencies Repository for Snapshots + https://oss.sonatype.org/content/repositories/snapshots/ + + - + org.sonatype.oss.groups.public - Sonatype Public + Sonatype Public https://oss.sonatype.org/content/groups/public - + - - - net.liftweb - lift-mapper_${scala.version} - ${lift.version} - - - net.liftweb - lift-widgets_${scala.version} - ${lift.version} - - - net.databinder - dispatch-http_${scala.version} - 0.8.6 - - - net.databinder - dispatch-oauth_${scala.version} - 0.8.6 - + + + net.liftweb + lift-mapper_${scala.baseversion} + ${lift.version} + + + net.liftmodules + widgets_${lift.baseversion}_${scala.baseversion} + 1.3 + + + net.databinder + dispatch-http_${scala.baseversion} + 0.8.10 + + + net.databinder + dispatch-oauth_${scala.baseversion} + 0.8.10 + - net.databinder - dispatch-lift-json_${scala.version} - 0.8.5 + net.databinder.dispatch + dispatch-lift-json_${scala.baseversion} + 0.11.0 - - ch.qos.logback - logback-classic - 0.9.26 - - - javax.servlet - servlet-api - 2.5 - provided - - - junit - junit - 4.7 - test - - - org.scalatest - scalatest_${scala.version} - 2.0.M5 - test - - - org.scala-tools.testing - specs_${scala.version} - 1.6.9 - test - - - org.mortbay.jetty - jetty - 6.1.25 - test - - - - org.scala-lang - scala-compiler - ${scala.version} - compile - + + ch.qos.logback + logback-classic + 0.9.30 + + + javax.servlet + servlet-api + 2.5 + provided + + + junit + junit + 4.7 + test + + + org.scalatest + scalatest_${scala.baseversion} + 2.3.0-SNAP2 + test + + + org.scala-tools.testing + specs_${scala.baseversion} + 1.6.9 + test + + + org.mortbay.jetty + jetty + 6.1.26 + test + + + + org.scala-lang + scala-compiler + ${scala.version} + compile + org.scala-lang scala-library - 2.9.1 + ${scala.version} - - oauth.signpost - signpost-commonshttp4 - 1.2.1.2 - - + + oauth.signpost + signpost-commonshttp4 + 1.2.1.2 + + - - src/main/scala - src/test/scala - - - org.apache.maven.plugins - maven-surefire-plugin - 2.7 - - true - - - - - org.scalatest - maven-scalatest-plugin - 1.0-SNAPSHOT - - ${project.build.directory}/surefire-reports - . - WDF TestSuite.txt - -Drun.mode=test - - - - test - - test - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - generate-sources - - add-source - - - - src/main/java - - - - - - - org.scala-tools - maven-scala-plugin - 2.15.2 - - ${project.build.sourceEncoding} - - -Xmx1024m - -DpackageLinkDefs=file://${project.build.directory}/packageLinkDefs.properties - - - - - - compile - testCompile - - - - - - org.apache.maven.plugins - maven-war-plugin - 2.3 - - - org.apache.maven.plugins - maven-resources-plugin - 2.5 - - - default-copy-resources - process-resources - - copy-resources - - - true - ${project.build.directory} - - - ${project.basedir}/src - - packageLinkDefs.properties - - true - - - - - - - - org.mortbay.jetty - maven-jetty-plugin - 6.1.25 - - / - 5 - - - - net.sf.alchim - yuicompressor-maven-plugin - 0.7.1 - - - - compress - - - - - true - - - - org.apache.maven.plugins - maven-idea-plugin - 2.2 - - true - - - - org.apache.maven.plugins - maven-eclipse-plugin - 2.7 - - true - - ch.epfl.lamp.sdt.core.scalanature - - - ch.epfl.lamp.sdt.core.scalabuilder - - - ch.epfl.lamp.sdt.launching.SCALA_CONTAINER - org.eclipse.jdt.launching.JRE_CONTAINER - - - - - pl.project13.maven - git-commit-id-plugin - 2.1.0 - - - - revision - - - - - ${project.basedir}/.git - true - src/main/resources/git.properties - false - - - - - - - - org.scala-tools - maven-scala-plugin - 2.15.2 - - ${project.build.sourceEncoding} - - -Xmx1024m - -DpackageLinkDefs=file://${project.build.directory}/packageLinkDefs.properties - - - - - + + src/main/scala + src/test/scala + + + org.apache.maven.plugins + maven-surefire-plugin + 2.7.2 + + true + + + + + org.scalatest + scalatest-maven-plugin + 1.0 + + ${project.build.directory}/surefire-reports + . + WDF TestSuite.txt + -Drun.mode=test + + + + test + + test + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.7 + + + generate-sources + + add-source + + + + src/main/java + + + + + + + net.alchim31.maven + scala-maven-plugin + 3.2.0 + + ${project.build.sourceEncoding} + + -Xmx1024m + -DpackageLinkDefs=file://${project.build.directory}/packageLinkDefs.properties + + ${scala.baseversion} + ${scala.version} + incremental + true + + + + + compile + testCompile + + + + -make:transitive + -dependencyfile + ${project.build.directory}/.scala_dependencies + -deprecation + + + + + scala-test-compile + process-test-resources + + testCompile + + + + + + org.apache.maven.plugins + maven-war-plugin + 2.6 + + + org.apache.maven.plugins + maven-resources-plugin + 2.7 + + + default-copy-resources + process-resources + + copy-resources + + + true + ${project.build.directory} + + + ${project.basedir}/src + + packageLinkDefs.properties + + true + + + + + + + + org.mortbay.jetty + maven-jetty-plugin + 6.1.25 + + / + 5 + + + + net.alchim31.maven + yuicompressor-maven-plugin + 1.5.1 + + + + compress + + + + + true + + + + org.apache.maven.plugins + maven-idea-plugin + 2.2 + + true + + + + org.apache.maven.plugins + maven-eclipse-plugin + 2.7 + + true + + ch.epfl.lamp.sdt.core.scalanature + + + ch.epfl.lamp.sdt.core.scalabuilder + + + ch.epfl.lamp.sdt.launching.SCALA_CONTAINER + org.eclipse.jdt.launching.JRE_CONTAINER + + + + + pl.project13.maven + git-commit-id-plugin + 2.1.0 + + + + revision + + + + + ${project.basedir}/.git + true + src/main/resources/git.properties + false + + + + + + + + org.scala-tools + maven-scala-plugin + 2.15.2 + + ${project.build.sourceEncoding} + + -Xmx1024m + -DpackageLinkDefs=file://${project.build.directory}/packageLinkDefs.properties + + + + + diff --git a/src/main/scala/bootstrap/liftweb/Boot.scala b/src/main/scala/bootstrap/liftweb/Boot.scala index ee37ff42..98dcc77d 100755 --- a/src/main/scala/bootstrap/liftweb/Boot.scala +++ b/src/main/scala/bootstrap/liftweb/Boot.scala @@ -41,7 +41,7 @@ import Loc._ import mapper._ import Helpers._ import json.JsonDSL._ -import net.liftweb.widgets.tablesorter.TableSorter +import net.liftmodules.widgets.tablesorter.TableSorter import java.io.FileInputStream import java.io.File import code.lib.{OAuthClient, ObpGet, ObpJson, ObpAPI} @@ -67,7 +67,7 @@ class Boot extends Loggable{ logger.info("running mode: " + runningMode) val contextPath = LiftRules.context.path - val propsPath = tryo{Box.legacyNullTest(System.getProperty("props.resource.dir"))}.flatten + val propsPath = tryo{Box.legacyNullTest(System.getProperty("props.resource.dir"))}.toList.flatten logger.info("external props folder: " + propsPath) @@ -121,7 +121,7 @@ class Boot extends Loggable{ } Props.whereToLook = () => { - firstChoicePropsDir.flatten.toList ::: secondChoicePropsDir.flatten.toList + firstChoicePropsDir.toList.flatten ::: secondChoicePropsDir.toList.flatten } if(Props.get("defaultAuthProvider").isEmpty) { diff --git a/src/main/scala/code/snippet/AccountsOverview.scala b/src/main/scala/code/snippet/AccountsOverview.scala index 6b7e6132..a3dab034 100644 --- a/src/main/scala/code/snippet/AccountsOverview.scala +++ b/src/main/scala/code/snippet/AccountsOverview.scala @@ -66,7 +66,7 @@ class AccountsOverview extends Loggable { val publicAccountJsons : List[(BankID, BarebonesAccountJson)] = for { bankId <- bankIds publicAccountsJson <- ObpAPI.publicAccounts(bankId).toList - barebonesAccountJson <- publicAccountsJson.accounts.flatten + barebonesAccountJson <- publicAccountsJson.accounts.toList.flatten } yield (bankId, barebonesAccountJson) logger.info("Accounts Overview: Public accounts found: " + publicAccountJsons) @@ -74,7 +74,7 @@ class AccountsOverview extends Loggable { val privateAccountJsons : List[(BankID, BarebonesAccountJson)] = for { bankId <- bankIds privateAccountsJson <- ObpAPI.privateAccounts(bankId).toList - barebonesAccountJson <- privateAccountsJson.accounts.flatten + barebonesAccountJson <- privateAccountsJson.accounts.toList.flatten } yield (bankId, barebonesAccountJson) logger.info("Accounts Overview: Private accounts found: " + privateAccountJsons) @@ -86,7 +86,7 @@ class AccountsOverview extends Loggable { ".accountList" #> publicAccountJsons.map { case (bankId, accountJson) => { //TODO: It might be nice to ensure that the same view is picked each time the page loads - val views = accountJson.views_available.flatten + val views = accountJson.views_available.toList.flatten val aPublicViewId: String = (for { aPublicView <- views.filter(view => view.is_public.getOrElse(false)).headOption viewId <- aPublicView.id @@ -112,7 +112,7 @@ class AccountsOverview extends Loggable { ".accountList" #> privateAccountJsons.map{case (bankId, accountJson) => { //TODO: It might be nice to ensure that the same view is picked each time the page loads - val views = accountJson.views_available.flatten + val views = accountJson.views_available.toList.flatten val aPrivateViewId: String = (for { aPrivateView <- views.filterNot(view => view.is_public.getOrElse(false)).headOption viewId <- aPrivateView.id diff --git a/src/main/scala/code/snippet/Nav.scala b/src/main/scala/code/snippet/Nav.scala index b9668274..e6bce857 100644 --- a/src/main/scala/code/snippet/Nav.scala +++ b/src/main/scala/code/snippet/Nav.scala @@ -67,7 +67,7 @@ class Nav { val viewJsons: List[ViewJson] = { accountJson.flatMap(accJson => { accJson.views_available - }).flatten.toList + }).toList.flatten } def eraseMenu = @@ -92,7 +92,7 @@ class Nav { val url = S.uri.split("/", 0) def getManagement = { - val views = accountJson.flatMap(_.views_available).flatten + val views = accountJson.flatMap(_.views_available).toList.flatten //TODO: Determine this in a better way val hasOwnerPermissions = views.exists(v => v.id == Some("owner")) @@ -109,7 +109,7 @@ class Nav { } def editViews : CssSel = { - val views = accountJson.flatMap(_.views_available).flatten + val views = accountJson.flatMap(_.views_available).toList.flatten val hasOwnerPermissions = views.exists(v => v.id == Some("owner")) if(hasOwnerPermissions) { @@ -144,7 +144,7 @@ class Nav { val url = S.uri.split("/", 0) def getPrivilegeAdmin = { - val views = accountJson.flatMap(_.views_available).flatten + val views = accountJson.flatMap(_.views_available).toList.flatten //TODO: Determine this in a better way val hasOwnerPermissions = views.exists(v => v.id == Some("owner")) diff --git a/src/main/scala/code/snippet/TransactionsList.scala b/src/main/scala/code/snippet/TransactionsList.scala index d1a72224..afc996d4 100644 --- a/src/main/scala/code/snippet/TransactionsList.scala +++ b/src/main/scala/code/snippet/TransactionsList.scala @@ -108,7 +108,7 @@ class OBPTransactionSnippet (params : (TransactionsJson, AccountJson, Transactio def aliasSelector = { val hasManagementAccess = { - val availableViews = accountJson.views_available.flatten + val availableViews = accountJson.views_available.toList.flatten availableViews.exists(view => view.id == Some("owner")) }