简体   繁体   中英

Play! framework add external jar dependecies using SBT

I am using play 2.1.4 and i want to add my external jar library in my project but that jar is further dependent on some maven dependencies, i have my external jar in /lib folder. I want to include this jar from local repository (/lib) along with maven dependencies from maven repository through SBT

You are trying to mix managed and unmanaged dependencies in SBT. http://www.scala-sbt.org/release/docs/Getting-Started/Library-Dependencies

You can:

  1. Put your jar with all its dependent jars into the lib folder. A bit of manual work.
  2. Put only your jar into the lib folder and add all Maven dependencies to SBT (build.sbt). In this case your jar will be an unmanaged resource, but the dependencies will be managed by SBT.
  3. Build your jar so that it already contains all dependencies: How can I create an executable JAR with dependencies using Maven?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM