Include local .jar files in dependencies.yml

4,233 views
Skip to first unread message

DrKarl

unread,
May 6, 2011, 5:53:47 AM5/6/11
to play-framework
Hi,

How can I include a local .jar file which isn't available in any
repository in dependencies.yml so that when I run play dependencies --
sync it doesn't get deleted?

Thank you.

Pascal Voitot Dev

unread,
May 6, 2011, 6:04:50 AM5/6/11
to play-fr...@googlegroups.com
This issue has been discussed many times :)
for the time being, I don't know any way to do it...
you can install it manually in your local maven repo...
But why do you need to run --sync so often, it should be used scarcely afaik?

Pascal


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.


Florian Gutmann

unread,
May 6, 2011, 7:23:05 AM5/6/11
to play-fr...@googlegroups.com
On my continuous integration server I always want to sync.
If I delete dependencies they should be also removed for the nightly builds.

The solution I found works well so far and is straight forward.
Just add a local repository to dependencies.yml that points to a path within the application where you store the jars.

require:
  - play
  - play -> googleclosure 1.2
  - provided -> mylib 1.0

repositories:
  - provided:
      type:       local
      descriptor: "${application.path}/../[module]/conf/dependencies.yml"
      artifact:   "${application.path}/jar/[module]-[revision].jar"
      contains:
        - provided -> *

With this type of config just store all the jars in the "jar" folder of the application and add them as dependencies. In the example above the name for the mylib jar must be "mylib-1.0.jar".

Florian
-- 
Florian Gutmann

Thijs

unread,
May 6, 2011, 7:26:47 AM5/6/11
to play-fr...@googlegroups.com
I'm using this too, it works like a charm!

I was inspired by looking at the dependencies.yml file in the play directory.

Florian Gutmann

unread,
May 6, 2011, 7:44:57 AM5/6/11
to play-fr...@googlegroups.com
Sorry, just saw that i have left a "descriptor" entry in the dependency.yml which is totally useless.
Here the fixed version:


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

DrKarl

unread,
May 6, 2011, 10:02:00 AM5/6/11
to play-framework
It works flawlessly!!

Thank you very much!!
> >> On Fri, May 6, 2011 at 11:53 AM, DrKarl <karlma...@gmail.com
> >> <mailto:karlma...@gmail.com>> wrote:
>
> >>     Hi,
>
> >>         How can I include a local .jar file which isn't available in any
> >>     repository in dependencies.yml so that when I run play
> >>     dependencies --
> >>     sync it doesn't get deleted?
>
> >>     Thank you.
>
> >>     --
> >>     You received this message because you are subscribed to the
> >>     Google Groups "play-framework" group.
> >>     To post to this group, send email to
> >>     play-fr...@googlegroups.com
> >>     <mailto:play-fr...@googlegroups.com>.
> >>     To unsubscribe from this group, send email to
> >>     play-framewor...@googlegroups.com
> >>     <mailto:play-framework%2Bunsu...@googlegroups.com>.

Pascal Voitot Dev

unread,
May 6, 2011, 10:06:25 AM5/6/11
to play-fr...@googlegroups.com
yes it's a nice workaround :)
I think a real provided directory could be useful but meanwhile it will work with that!

Pascal

notalifeform

unread,
May 6, 2011, 4:57:37 PM5/6/11
to play-fr...@googlegroups.com
very useful solutionFlorian,

thanks,

Robert

Brandon Gresham

unread,
Jun 24, 2012, 4:45:58 PM6/24/12
to play-fr...@googlegroups.com
This works beautifully.  Thanks!
Reply all
Reply to author
Forward
0 new messages