Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8333783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:08:33+00:00 2026-06-09T03:08:33+00:00

I would need to have two different projects, let’s say internal and external, which

  • 0

I would need to have two different projects, let’s say internal and external, which use the same data layer, and I would like to avoid replicating the configuration file for dryness reasons.

I have looked to the sub projects documentation at http://www.playframework.org/documentation/2.0.2/SBTSubProjects but the doc is pretty short.

I am now aware of the possibility to modularize the configuration, thanks to @Georg Engel

import sbt._
import Keys._
import PlayProject._

object ApplicationBuild extends Build {

    val appName         = "MyApp"
    val appVersion      = "1.0-SNAPSHOT"

    val appDependencies = Seq(
      // Add your project dependencies here,
    )

    lazy val common = Project(appName + "-common", file("modules/common"))

    lazy val website = PlayProject(
    appName + "-website", appVersion, path = file("modules/website")
    ).dependsOn(common)

    lazy val adminArea = PlayProject(
    appName + "-admin", appVersion, path = file("modules/admin")
    ).dependsOn(common)

    lazy val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
      // Add your own project settings here      
    ).dependsOn(
    website, adminArea
    )


}

and the compilation errors I had where only due to the reverse router (canceling routes but not controller actions result in this)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:08:34+00:00Added an answer on June 9, 2026 at 3:08 am

    We are using submodules like this (where “core” is the shared submodule):

    Build.scala

    val coreModule = PlayProject(appName + "-core", "1.0", appDependencies, path = file("modules") / "core")
    
    val main = PlayProject(appName + "-app", appVersion, appDependencies, mainLang = SCALA).settings(
      // Add your own project settings here      
    ).dependsOn(coreModule).aggregate(coreModule)
    

    Unfortunatelly submodules have to live under the project tree (“../core” as path isn’t possible) – so we are using git submodules to get the shared module into the tree:

    git submodule add git://git.example.com/modules.git modules
    
    git submodule init
    
    git submodule update
    

    Propably SVN externals, mercurial submodules etc. will do this job too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two same web projects(Java) with different name in my workspace. One is
I have a project in which I would need to copy files found within
Need assistance with the pexpect module I have written a simple code which would
I have public and private keys in separate .pem files that I would need
I need to have script.sh , that would create files f1.txt and f2.txt with
I would like to retrieve an ordered query result, but I need to have
Here is the idea I would like to develop. I need to have an
I have to develop a table that would contain distance between destinations and need
i have this code, and need help with the logic end. I would like
Lets say I have two .dlls, Dll1 and Dll2. DLL1 uses or makes calls

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.