tuplejump / play-yeoman

Play + Yeoman integration sbt and play plugins
Apache License 2.0
238 stars 57 forks source link

Multiproject configuration #84

Open ntenisOT opened 8 years ago

ntenisOT commented 8 years ago

We have a multiproject configuration and I would like to have separate ui folders for every project in order to be able to run the projects individual but able to run the project as a whole as well.

Can you provide some sample configuration? Thanks

Shiti commented 8 years ago

Do you have multiple play projects ? Maybe if you explain the project structure with an example, we can see what can be done

ghost commented 8 years ago

I am trying to solve the same problem. I have used play-multidomain-seed template as my base. This seed creates a root play project with three play sub-projects. I now want to configure play-yeoman for two of the sub-projects. My goal is to have one of the sub-projects be a REST api and the other two be AngularJS apps that access the REST api.

I was able to properly configure one of the sub-modules with play-yeoman and properly route the request through. The key was setting the yeoman.distDir & yeoman.devDirs correctly. The issue I am seeing is how to set this differently for the two sub-modules. If I set these values in the sub-project config they don't seem to be picked up. If I set it on the root project it works but obviously can only have one value.

So I am currently trying to debug why they aren't being set at the sub-project level. The other thing I noticed is that yeoman.distDir isn't even being used, unless I am missing something.

Shiti commented 8 years ago

@petergiesin Thanks for providing the details. I'll check it out.

Shiti commented 8 years ago

@petergiesin

yeoman.distDir - This is a String that takes the location where yeoman/grunt build puts your web app distribution. This location will be used by play-yeoman when you are running in production i.e. after dist/stage.

ghost commented 8 years ago

Correct but if I have 2 yeoman sub-projects play-yeoman doesn’t know which one to use. For example, my project looks like this:

root — modules —— web ——— ui ———— dist —— admin ——— ui ———— dist —— api

Both web and admin are yeoman angular web apps, and api is a standard play app. In the root project there is a custom request handler which routes all inbound requests to the appropriate sub-project. If I configure play-yeoman in the root project it works but I am only able to route to either web or admin but not both.

The other option is to configure play-yeoman as part of web and admin which I assume should work. However I have not been able to figure out the correct routing to make this true. I am not sure whether it is in the routing in my custom request handler or in the play-yeoman configuration.

On December 30, 2015 at 11:17:24 PM, Shiti Saxena (notifications@github.com) wrote:

@petergiesin

yeoman.distDir - This is a String that takes the location where yeoman/grunt build puts your web app distribution. This location will be used by play-yeoman when you are running in production i.e. after dist/stage.

— Reply to this email directly or view it on GitHub.