java - how to access parent project's classes in sub project in playFramework 2.3.x -


i using play 2.3.8 , using this gudie create sub project in project created subproject 'mysubproject' , imported project in eclipse parent project myparentproject , mysubproject have 2 questions first -> correct first imported myparentproject in eclipse imported mysubproject second-> in mysubproject can access classes of myparentproject , import packages in mysubproject when want access class/packages of myparentproject not let me show error object not found here build file of root project myparentproject

name := """myparentproject"""  version := "1.0-snapshot"  lazy val root = (project in file(".")).enableplugins(playscala)     .aggregate(mysubproject)     .dependson(mysubproject)  scalaversion := "2.11.1"  fork in run := true  javaoptions in run ++= seq("-j-xms1g", "-j-xmx2g")  val appdependencies = seq(   // add project dependencies here,   "org.scalatestplus" %% "play" % "1.2.0" % "test" )  lazy val mysubproject = project   librarydependencies ++= seq("org.scalatest" %% "scalatest" % "2.2.1" % "test"withsources() withjavadoc(),                     "com.esotericsoftware.kryo" % "kryo" % "2.10",                 "org.mongodb" %% "casbah" % "2.8.0",                 "org.slf4j" % "slf4j-api" % "1.6.4",                 "org.elasticsearch" % "elasticsearch" % "1.6.0",                 "org.codehaus.groovy" % "groovy-all" % "2.4.0",                 "org.apache.lucene" % "lucene-expressions" % "4.10.4",                 "org.scalatest" %% "scalatest" % "2.2.1" % "test"withsources() withjavadoc(),                 "org.easymock" % "easymock" % "3.1" withsources() withjavadoc(),                 "org.mockito" % "mockito-all" % "1.9.5",                 "com.typesafe.akka" %% "akka-actor" % "2.3.6",                 "ch.qos.logback" % "logback-core" % "1.0.9",                  "com.github.nscala-time" %% "nscala-time" % "2.0.0",                  "net.liftweb" %% "lift-json" % "2.6+",                  "net.liftweb" %% "lift-json" % "2.6+",                  "com.hazelcast" % "hazelcast" % "3.5",                  "com.hazelcast" % "hazelcast-client" % "3.5",                  "com.twitter" % "chill-bijection_2.11" % "0.7.0"                 //,"com.codahale" % "jerkson_2.9.1" % "0.5.0" ) 

and here build file of child projectmysubproject

name := """mysubproject"""  version := "1.0-snapshot"  scalaversion := "2.11.1"  librarydependencies ++= seq("org.scalatest" %% "scalatest" % "2.2.1" % "test"withsources() withjavadoc(),                     "org.slf4j" % "slf4j-api" % "1.6.4",                 "org.elasticsearch" % "elasticsearch" % "1.6.0",                 "org.codehaus.groovy" % "groovy-all" % "2.4.0",                 "org.apache.lucene" % "lucene-expressions" % "4.10.4",                 "org.easymock" % "easymock" % "3.1" withsources() withjavadoc(),                 "org.mockito" % "mockito-all" % "1.9.5",                 "com.typesafe.akka" %% "akka-actor" % "2.3.6",                 "ch.qos.logback" % "logback-core" % "1.0.9",                  "com.github.nscala-time" %% "nscala-time" % "2.0.0",                  "net.liftweb" %% "lift-json" % "2.6+",                  "net.liftweb" %% "lift-json" % "2.6+") 

and here code in parent project myparentproject created class named app/mypackagae/abc.scala here code

  package mypackagae import mysubproject._ class abc { def helloabc()={   println(" root project ,  class abc ") } val test=new testing test.hellotesting() } 

and in mysubproject created class in /mysubproject/src/main/scala-2.11/mysubproject/testing.scala here code

package mysubproject //import parentprojectpackage._  import mypackagae._ //here  error not found: object mypackagae  class testing {    def hellotesting() ={     println("i subproject or child project , class testing")   } //and here want access class abc , method helloabc() eclipse not importing } 

please guide me how can import packages/classes of root project in child project


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -