Created
May 2, 2014 13:31
-
-
Save pedrofurla/8213d4242f9d1c0d387c to your computer and use it in GitHub Desktop.
My SBT last night struggle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // The problem, I believe, was doing `inConfig(hconfig)(Defaults.defaultSettings + other settings) `, therefore kill the project | |
| // setup in the hconfig. Btw, h stands for hibernate (ergh) config. I wanted a shell where it'd be easy to play with hibernate | |
| project.in(file(".")). | |
| configs(hconfig). | |
| settings(inConfig(hconfig)(Defaults.configTasks) : _*) | |
| .settings( | |
| fork.in(hconfig,console) := true, | |
| initialCommands in hconfig := | |
| """ | |
| |import exec._ | |
| |import exec.TestHelper._ | |
| |import support.JpaInstances.HibernateJpa | |
| |import scalaz._ | |
| |import Scalaz._ | |
| | | |
| |import collection.JavaConversions._ | |
| | | |
| |import jpaperf._ | |
| |import jpaperf.Entities._ | |
| | | |
| |val slick = support.SlickInstances.SlickMySql | |
| |slick.createSchema | |
| | | |
| |val jpa = HibernateJpa | |
| |val em = jpa.defaultEm | |
| |val ic = new JpaInsertCompany(jpa) | |
| |ic.run(Nel(10)) | |
| """.stripMargin, | |
| cleanupCommands in hconfig := | |
| """ | |
| |jpa.emFactory.close() | |
| |slick.destroySchema | |
| """.stripMargin | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment