the modules in Play 2 are SBT projects. So they at the very least need
to have a structure like
src/
java
and contain a SBT build definition. If you just want to do things such
as declaring dependencies you can use a simple build.sbt definition at
the root of your module that looks like e.g.
----
name := "my-module"
organization := "fooBar"
resolvers += "someRepo" at "http://maven.fooBar.org/maven2"
libraryDependencies ++= Seq(
"commons-collections" % "commons-collections" % "3.2.1",
"com.foo" % "bar" % "1.0")
----
(Note that all statements are separated by an empty lines)
Most likely tough you want to have a Play project scaffold there so
instead of the above just do
cd modules
play new my-module
and link that new project from the main build definition.
Then, in order to run it, run play in the main project and switch to
the sub-project:
play2
projects --> lists all projects
project my-module (you are in the project)
If you want to understand more about SBT, a good place to start is
https://github.com/harrah/xsbt/wiki/Getting-Started-Welcome
Manuel
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
--
Guillaume Bort
I think the question was if there was a way to run sub-projects (aka
modules) stand-alone, in the play console.
Regarding routes in sub-projects: do you plan on adding some kind of
support for these in a later release?
Thanks,
Manuel
Yes.
On Wed, Feb 1, 2012 at 6:38 PM, Manuel Bernhardt
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/d67XWpVqM5UJ.
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/_SA0fnM_KNoJ.
But it is not clear, how configure this, that would run all
subprojects from a single developer console. Is that possible?
2012/2/17 Pekka Mattila <pekka....@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/UhwOz-TzSZMJ.
>
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
--
С уважением, Илья Скорик
Yours faithfully, Ilya Skorik
/
-- /projectA
-- /projectB
-- /common
-- /project
-- plugins.sbt
-- Build.scala
And create the sbt build file in Build.scala, projectA and projectB
being PlayProject, and common an simple Project. Make both A and B
depends of common.
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/UhwOz-TzSZMJ.
2012/2/17 Guillaume Bort <guillau...@gmail.com>:
--
import sbt._
import Keys._
import PlayProject._
object ApplicationBuild extends Build {
val common = Project(id = "common", base = file("common"))
val projectA = PlayProject("projectA", "1.0-SNAPSHOT", path =
file("projectA"), mainLang = SCALA).dependsOn(common)
val projectB = PlayProject("projectB", "1.0-SNAPSHOT", path =
file("projectB"), mainLang = SCALA).dependsOn(common)
}
2012/2/17 Илья Скорик <il...@skorik.me>:
--
Guillaume Bort
17 февраля 2012 г. 14:21 пользователь Guillaume Bort
<guillau...@gmail.com> написал:
test1/ -- root folder
test1/project -- folder with configs:
test1/project/Build.scala
test1/project/plugins.sbt
test1/projectA -- play project
test1/projectB -- play project
When I type "play" in "test1" folder, i have "This is not a play
application!" error.
2012/2/17 Julien Richard-Foy <j...@zenexity.com>:
> In the root directory (of the layout suggested by Guillaume), just run
> the play command.
>
But you can use sbt directly instead of play.
2012/2/17 Илья Скорик <il...@skorik.me>:
--
Guillaume Bort
17 февраля 2012 г. 16:31 пользователь Guillaume Bort
<guillau...@gmail.com> написал:
2012/2/17 Илья Скорик <il...@skorik.me>:
play#sbt-plugin;2.0-RC3-SNAPSHOT: not found
17 февраля 2012 г. 16:42 пользователь Guillaume Bort