It would be great if someone forked the project and fussed with it until it displays web pages again. Failing that, any suggestions would be appreciated.
Mike
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/d8bf0b9f-b36c-4f6c-8b6d-428b315c7b33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/e7e31c11-f121-4f6c-b5ac-ce555acfaadd%40googlegroups.com.
Thanks,
Mike
I am guessing that filters defined in serviceA and serviceB won't be used, because the root subproject is actually the project that handles requests, and I am unaware of a co-operative mechanism between Play subprojects for request handling. Without any such cooperation, application.conf in the root subproject will need to specify and configure the filters.
That would be suboptimal for the scenario where a modified version of silhouette-seed-template is a subproject, because that project would need to be deconstructed and dispersed throughout the rest of the webapp in order to integrate it into a larger project. Dispersal would make it harder to keep the project current with changes to silhouette-seed-template. I am also unaware of a partial import mechanism for Typesafe Config, so perhaps one way to keep things separate would be to extract silhouette-seed-template's http.filter section from silhouette.application.conf and save it as filters.silhouette.application.conf. Because SBT's dependsOn augments the project classpath with the classpath of subprojects, filters.silhouette.application.conf could be imported by application.conf and/or by silhouette.application.conf. Is there a better way to handle this?
I have a similar question about Guice modules defined in subprojects and bound in AbstractModule subclasses within their respective subprojects. Yes, they are all on the project classpath because of dependsOn, but I am unclear if the root project would need to mention them in a root-level AbstractModule subclass, or if Guice would automatically process every AbstractModule subclass on the classpath (I am guessing the latter is likely true, but I have not tested this yet). I am also unclear if application.conf in the root project would need to mention each subproject's Guice modules in play.modules.enabled, or if the subprojects would automatically forward their subproject.application.conf settings into the consolidated Configuration.
Many questions!
Mike
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/e7e31c11-f121-4f6c-b5ac-ce555acfaadd%40googlegroups.com.
On Sun, Jul 24, 2016 at 7:45 AM, Michael Slinn <msl...@gmail.com> wrote:I am guessing that filters defined in serviceA and serviceB won't be used, because the root subproject is actually the project that handles requests, and I am unaware of a co-operative mechanism between Play subprojects for request handling. Without any such cooperation, application.conf in the root subproject will need to specify and configure the filters.The filters won't be used, but that's because it's defined based on the play.http.filters setting in your main app's application.conf. Because of the way filters are bound, you can only bind one HttpFilters binding at once. So you should create one in each app and explicitly set the setting.
That would be suboptimal for the scenario where a modified version of silhouette-seed-template is a subproject, because that project would need to be deconstructed and dispersed throughout the rest of the webapp in order to integrate it into a larger project. Dispersal would make it harder to keep the project current with changes to silhouette-seed-template. I am also unaware of a partial import mechanism for Typesafe Config, so perhaps one way to keep things separate would be to extract silhouette-seed-template's http.filter section from silhouette.application.conf and save it as filters.silhouette.application.conf. Because SBT's dependsOn augments the project classpath with the classpath of subprojects, filters.silhouette.application.conf could be imported by application.conf and/or by silhouette.application.conf. Is there a better way to handle this?I'm not that familiar with the silhouette seed, but it should be fine to include other configuration files on the classpath in your main application.conf. You should only have one application.conf on the classpath. This is the reason for having differently named config files for services that are explicitly configured in the build, to prevent conflicts when subprojects are used in another main project.
I have a similar question about Guice modules defined in subprojects and bound in AbstractModule subclasses within their respective subprojects. Yes, they are all on the project classpath because of dependsOn, but I am unclear if the root project would need to mention them in a root-level AbstractModule subclass, or if Guice would automatically process every AbstractModule subclass on the classpath (I am guessing the latter is likely true, but I have not tested this yet). I am also unclear if application.conf in the root project would need to mention each subproject's Guice modules in play.modules.enabled, or if the subprojects would automatically forward their subproject.application.conf settings into the consolidated Configuration.Neither Guice nor Play does any kind of classpath scanning to find modules. You need to set play.modules.enabled += "com.example.FooModule" to get it working.
Just import the subproject config files in your main project's application.conf, so you don't have to re-add those modules.
Is it true that there is only one Configuration for the entire project, and it is consistent for all SBT subprojects? That would explain why each subproject does not have a setting like:
javaOptions += "-Dconfig.resource=serviceX-application.conf"
Here is some code I wrote to define the root filter chain. It incorporates the filter chain for the silhouette subproject's filter chain, which would otherwise be ignored. Of course, this only works if Guice has bound the silhouetteFilters instance of utils.silhouette.Filters. Comments?
Got that, thanks. Any suggestions regarding the relative merits of bottom-up or top-down inclusion of config files?
Seems like each subproject's config files will need to be split up, so the subprojects can put them together as required for testing.
There's only one classloader for the application:Play doesn't segment or isolate classes in sub projects in their own classloader -- there's some classloader logic in the SBT plugin to handle live restarts, but it's all flat at the application classloader level, and when packaging a Play app for distribution, everything is arranged on the classpath.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/80b86362-7f0f-4d29-ba7f-69fb2dbfe568%40googlegroups.com.
Routes are contextual. If you define a routes file with /a pointing to servicesA.Routes, then you have a servicesA.routes file and you have a reference in it to /b, then you'll get /a/b
-- I don't think this is what you want.
This is why I tend to go with a SIRD router, because you have more flexibility.
You can also checkout Adrian Hurt's multidomain example, which is a good deal more complex but really shows what you can do:
If a non-Play subproject dependsOn a Play subproject, how might the reverse routes from the Play subproject be made available to the non-Play 'parent' subproject? The Play docs for aggregateReverseRoutes make it sound like only Play subprojects can use this SBT task. I did not get an error when I tried using aggregateReverseRoutes on a non-Play subproject. What is the story here?
Mike
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/41549104-1ef4-4bb2-89f9-ad12f7948574%40googlegroups.com.
PlayKeys.devSettings += ("play.http.router", "silhouette.Routes")
However, I want to run unit tests, not run in dev mode. Seems there is no support for PlayKeys.testSettings and PlayKeys.prodSettings. Instead, I must create conf/test.silhouette.application.conf and put something this in it:PlayKeys.devSettings exists, why not also support PlayKeys.testSettings and PlayKeys.prodSettings?The point of this email is to say, ifPlayKeys.devSettingsexists, why not also supportPlayKeys.testSettingsandPlayKeys.prodSettings?
implicit override lazy val app = GuiceApplicationBuilder(configuration = conf)
.bindings(new JobModule)
.bindings(new BaseModule)
.bindings(new SilhouetteTestModule)
.bindings(new MailerModule)
.build()
val application = new GuiceApplicationBuilder()
.configure(Configuration("a" -> 1))
.configure(Map("b" -> 2, "c" -> "three"))
.configure("d" -> 4, "e" -> "five")
.build--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/b461d144-63cf-4f4c-9211-89cad4e1889d%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/fe79d5a0-6391-4c68-9780-3d4124198abc%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/0080a3a8-2c18-40c0-8a38-d20f0c239bc5%40googlegroups.com.