I’m working on a project using Maven as tool. Within the project I have a toy-server to test in a web environment the output of the project, so that the structure is like this:
src
main
java
my_namespace
testserver
server_class1
server_class2
projectclass1
projectclass2
projectclass3
As the project grows, I’d like to use Play Framework to build a better web-testing environment. I’ve read that Play and Maven don’t work well together, so eventually I’ll create a second project (Play) with a dependancy on a jar generated by Maven in the current project.
How to synch the two projects?
In Play external dependancies have to be found in the /lib directory. Since I’ll work at both the projects at the same time, I need a way to tell Maven that, when done packing the jar, it has to be copied into an external directory (Play’s /lib). Or I need Play to pick the jar from a non standard position.
Again, since my project has some dependancies, would they be resolved within the jar if used in a non-maven environment? Do I need to create a uber-jar?
Now, play dependencies do not need to be copied to the lib folder by yourself : your can use the dependencies system integrated in Play!.
Check this : Play! dependencies.
The command
will retrieve the dependencies of your Java project.