2

I have an play application with the following structure:

-mainApp
 -app
   - controllers
   - models
   - services
   - views
 -test
 -modules
...

And i have a subproject in the modules folder. Now I want to use the class Test.class in the "services"-folder in a class of a submodule (called "listadmin"). I thought it's possible with the import:

import services.Test;

But this doesn't work. I get the error (if I compile) that the system don't know the package service. How do i import a class of the main-project in a subproject?

Thanks for help!

Der_V
  • 177
  • 1
  • 16
  • See here. http://stackoverflow.com/questions/25763647/play2-using-main-project-views-controllers-models-in-submodule-subproject-and-in/25763994?noredirect=1#comment40434554_25763994 Simillar issue – masterdany88 Sep 17 '14 at 08:09

1 Answers1

1

I think the only way you can do that is to have the sub-project dependOn the main project. Of course, the main project also will dependOn the subproject, so I'm not sure what you gain by creating a sub-project. I'm having a similar issue. I'm trying to separate my big project into self-contained smaller projects, but I need some info from the big project (the main template file so my views fit in with the rest of the application, a default URL to send pages to when users don't have permission to see pages, etc.) If I can't find that someone has already asked this question, I'm going to, so keep an eye out.

Todd O'Bryan
  • 2,234
  • 17
  • 30