Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I specify a local jar file as a dependency in Play! Framework 1.x

I have a jar file copied in the lib directory

I'd like to run "play deps --sync" without this jar being deleted..

I've already looked at depency file documentation but couldn't figure out how to do it

any idea?

-- edit

I've just found the answer: http://groups.google.com/group/play-framework/browse_thread/thread/b54e4e25ae49161b

Gonna google around a bit more before asking here

like image 629
opensas Avatar asked Aug 25 '11 02:08

opensas


People also ask

How do you add a dependency in play framework?

Unmanaged dependencies work like this: create a lib/ directory in the root of your project and then add jar files to that directory. They will automatically be added to the application classpath. There's not much else to it. There's nothing to add to build.

Do jar files have dependencies?

a dependency management utility for jar files. It's primary purpose is to traverse through a directory, parse each of the jar files in that directory, and identify the dependencies between the jar files. The output is an xml file representing the PhysicalDependencies between the jar files.

How do I check the dependencies of a jar file?

jar file. Use the -verbose:class option to find class-level dependencies or use the -v or -verbose option to include dependencies from the same JAR file.


1 Answers

just like the answer in google groups said, I could achieve it with the following dependencies.yml file

for library /jar/DateHelper-1.0.jar

require:
    - play -> crud
    - provided -> DateHelper 1.0 
repositories: 
    - provided: 
        type:       local 
        artifact:   "${application.path}/jar/[module]-[revision].jar" 
        contains: 
            - provided -> * 

(You need to create the jar dir and put your jar files in it)

so, according to the ${xxxx} it seems like dependecies.yml file is processed like a template... just like happens with the routes file

like image 151
opensas Avatar answered Oct 26 '22 20:10

opensas