How can i have multiple source folders in a play project? I am using play 1.2.4 and the eclipse plugin. What I want to do is use a source folder from another project (e.g. a normal java project) in the play project.
The normal way by adding the folder as a source folder via properties->java build path->link source does not work. So where do i have to add the dependencies to tell play what i want? I know that if I want to link a jar file i have to write it in the dependencies.yml file, so can i do the same for a folder full of normal java files?
And is it possible to add a third source folder to a play project, so "1. app 2. test 3. mysoucefolder" for example.
Changing the default Content-Type Will automatically set the Content-Type header to text/plain , while: JsonNode json = Json. toJson(object); Result jsonResult = ok(json); will set the Content-Type header to application/json .
To ensure that languages are resolved correctly, specify the languages your app supports using the resConfigs property in the module-level build.
You can create the package hierarchy you want in app/
.
For example :
app/
controller/
models/
views/
org/
myproject/
MyClass.java
conf/
...
MyClass
can be accessed in your play project with import org.myproject.MyClass
If what you re trying to do deals with constraints on folders hierarchy, you can give a try to symbolic links.
I think you can achieve that by creating a Play Module with your source folder from another project.
A module in play is actually little more than an organisation of your code base.
You can read more about Play Module here:
http://www.playframework.org/documentation/1.2.4/modules
http://playframework.wordpress.com/2011/02/27/play-modules/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With