Scala是否有pip/easy_install? [英] Is there a pip / easy_install for Scala?

查看:88
本文介绍了Scala是否有pip/easy_install?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想整理我的Scala软件包,并喜欢Python如何用pip解决此问题.

I want to organize my Scala packages and love how Python solves this issue with pip.

您可以推荐类似的工具来管理Scala软件包吗?

我正在寻找具有所有依赖项的新软件包的简易安装,例如

I am looking for an easy installation of new packages with all it's dependencies like

 >>> pip install <a_package> # installs a_package with all dependencies.

推荐答案

最直接的相似之处可能是 Scala构建工具.具体来说,库依赖项. Java生态系统包括许多库和构建工具,Scala基于Java构建.这样您就可以利用-

The most directly similar is probably Scala Build Tool. Specifically, Library Dependencies. The Java ecosystem includes many libraries and build tools, Scala is built on Java. So you gain the ability to leverage things like -

  • Maven
  • Gradle
  • Scala Build Tool

此外,因为所有内容都在虚拟机中运行;没有系统"级别的安装.您可以从 CLASSPATH 开始,有关更多信息,请

Further, because everything is run inside a virtual machine; there is no "system" level install. You can start with your CLASSPATH and for more investigate class loading.

#!/bin/sh
# From http://www.scalaclass.com/node/10 - CLASSPATH
L=`dirname $0`/../lib
cp=`echo $L/*.jar|sed 's/ /:/g'`
exec scala -classpath "$cp" "$0" "$@"
!#
import com.my.Goodness
val goodness = new Goodness
world.hello

这篇关于Scala是否有pip/easy_install?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆