- 浏览: 181705 次
- 性别:
- 来自: 武汉
文章分类
- 全部博客 (100)
- git (1)
- j2ee (7)
- python (9)
- mysql (1)
- php (9)
- android (6)
- 翻译 (0)
- web 前端 (3)
- ruby (0)
- java (8)
- 读书 (1)
- object-c 之 iphone (9)
- scala (19)
- iphone (13)
- c/c++ (3)
- apache (2)
- javascript (5)
- vi (1)
- lift (5)
- jquery (1)
- dos (1)
- java解惑 (1)
- excel函数 (1)
- 软件开发 (2)
- wxwidget (2)
- mac (1)
- virtualbox (1)
- discuz (2)
- struts2 (2)
- jsp (1)
- object-c (5)
- http (1)
- codeigniter (1)
- django (1)
- regx (1)
最新评论
-
a564941464:
一样
Initializers -- object-c中的alloc init的解释 -
pj7670623:
幸好有~~~有道!!不然咋看的懂哦!
Initializers -- object-c中的alloc init的解释 -
higherzjm:
[flash=200,200][/flash][url][/u ...
用jdb调试Java程序
下面是在网上google时,看到的一篇在eclipse中配置 scala+lift+maven 的开发环境,特记录如下:
Prerequisites
This post assumes that you already have Scala 2.8 final and Eclipse 3.6 on your system. For Eclipse, I recommend upping the Xmx setting if you haven’t already – I had issues when I had multiple Lift projects imported with Xmx set to 386.
Also, this tutorial is going to use Maven, not SBT. SBT may be a better build tool for Scala projects, but I’m not sure how well it works with m2eclipse – I’m going to play with that more later.
I also assume you know how to install plugins into Eclipse – I will create a more in-depth screencast for doing all of this if there is enough interest.
1. Install m2eclipse
Install m2eclipse using the following URL:
http://m2eclipse.sonatype.org/sites/m2e
If you need full instructions, you can go here:
http://m2eclipse.sonatype.org/installing-m2eclipse.html
2. Install the Scala IDE
Get the Scala IDE for Scala 2.8.0 and Eclipse Helios here:
http://download.scala-ide.org/nightly-update-helios-2.8.0.final
3. Install the m2eclipse-scala plugin
There is a configurer for m2eclipse that will setup Scala projects for you. You can install it using the directions here:
http://github.com/sonatype/m2eclipse-scala
The short version of those instructions:
1. Download the latest jar found at this url:
http://github.com/sonatype/m2eclipse-scala/downloads
2. Copy it to the dropins/ directory in your Eclipse installation
3. Restart Eclipse
4. Create a Lift project from an Archetype
Now you can create a new Lift project from the Archetype – this is effectively the same as running the mvn archetype:generate command that the Lift ‘Getting Started’ guide tells you to.
To do this, go to File > New > Other… > Maven > Maven Project
Follow the wizard until you get to the Select an Archetype screen. In the Catalog drop-down, select the Scala-Tools.org Catalog. A list of archetypes will appear below – you can filter down to just the Lift projects by typing ‘lift’ in the Filter box. Select one of the Scala 2.8/Lift 2.1 archetypes – I selected lift-archetype-basic_2.8.0. Click next and fill in the information (group id, artifact id, and version), and then click ‘Finish’.
m2eclipse will spend a few minutes setting up your project, downloading sources, and configuring it in Eclipse.
5. Import an existing Lift project (optional)
If you already have a Maven-based Lift project, you can import it. Just select File > Import.. > Maven > Existing Maven Projects and then follow the wizard to import your project. It will configure everything for you.
6. What you can do
So, now that you have a Maven-based Lift project in Eclipse, what can you do?
- Code complete, syntax highlighting, and real-time compiler errors are available
- Code navigation works quite well – you can CMD/Control + click a class or method to go right to it. Cmd + O will let you navigate the methods and fields in the current class.
- m2eclipse will download sources for you automatically – this is one of my favorite features. If you navigate to a class in the Scala API or Lift itself, you’ll see a rough decompiled view of the class for a second while m2eclips grabs the sources, then it will refresh with the actual source code. This is a really handy feature! It will also download scaladocs for you.
- You can setup an m2eclipse command to run Jetty within the IDE. Right-click on the web project and select ‘Run as…’ > Maven build…
You’ll be presented with a screen for creating a new maven runtime configuration. In the Goals box, add jetty:run
, then click ‘Run’.
This configuration will be saved, so you can run your project in Jetty anytime you want by using the Run button in the menu bar. You can also do this for the mvn scala:cc command if you want.
7. Final thoughts / Feedback
I think the tooling situation for Scala and Lift is pretty good – much better than when I was doing a lot of Lift work last year. A lot of credit goes to Miles Sabin, David Bernard, and others who have done a lot of work to make this possible.
If this post was helpful, please let me know. I’m also interested to know if people are interested in more in this area, specifically:
1) A screencast showing how to do all of this, and what other features are available when working with Scala/Lift projects in Eclipse.
2) A single Eclipse feature that can tie all of the above features together into one easy-to-install package, along with setting up the m2eclipse Run As.. commands automatically for you.
可以按以下方式修改jetty运行时服务器端口(如图):
-Djetty.port=9999 jetty:run
发表评论
-
Nil
2011-09-28 11:41 783关于scala中的Nil: 关于函数当参数: -
In Scala, every defined variable has to be initialized at the point of its definit
2011-09-28 11:31 805In Scala, every defined variable ... -
scala中的case class
2011-09-27 21:43 793scala中的case class中的字段不需要显式声明即可直 ... -
scala中的基本类型的表示
2011-09-27 20:24 0引用Byte 8-bit signed 2's comple ... -
scala中将doule转换为int
2011-09-27 17:28 861(100.12).toInt (100.12).asInst ... -
scala中的协变,逆变
2011-08-14 02:45 1017trait Queue[+T] { ... } Prefixin ... -
scala中的for表达式
2011-08-11 23:58 909通常,scala中for表达式有如下形式: for ( seq ... -
Lift项目的生成、配置和运行
2011-08-07 15:49 9481. 安装Maven,配置好环 ... -
Scala levels: beginner to expert, application programmer to library designer
2011-08-05 15:11 946Scala is a bit of a chameleon. ... -
lift中的路径映射
2011-08-03 23:40 1076以下英文引用自:http://simply.liftweb.n ... -
scala match compared to java switch
2011-08-03 11:00 950There are three differences to ... -
scala中xml mode
2011-07-31 23:04 1015class varval(x:String,var y:Str ... -
scala中类的var val参数
2011-07-31 23:03 1303class varval(x:String,var y:Str ... -
scala 中的修饰符 private
2011-07-31 22:30 953Example 5.2.1 The following cod ... -
scala中的预先定义
2011-07-31 22:08 977Early definitions are particular ... -
scala 函数声明使用返回值时要用=号
2011-07-31 20:30 2573class Operators{ def retStri ... -
lift中的snippet中报错not found
2011-07-31 12:17 1267报错代码信息: Snippit with incorrect ... -
scala保留字
2011-07-18 14:58 1184abstract case catch class def ... -
scala中的require说明
2011-07-05 13:30 1111The require method is defined in ... -
scala unit
2011-07-02 20:24 1051A result type of Unit indicates ...
相关推荐
为了方便开发者快速搭建 Scala 环境,本文将介绍 Scala+maven 的安装方法,并对 Scala IDE 的下载和配置进行详细的讲解。 一、下载 Scala IDE Scala IDE 是一个基于 Eclipse 平台的集成开发环境,提供了许多功能...
:warning:Scala + Spring + Hibernate + Maven + Selenium WebDriver 该项目包含使用Scala,Spring,Hibernate和Maven的最新版本启动Webapp项目的源代码,包括基于Selenium WebDriver PageObject的Web测试。...
- 集成步骤通常包括添加MyBatis和其Scala绑定库到项目依赖,配置MyBatis的SqlSessionFactory,并编写Scala版的Mapper接口。 2. **Scala版的MyBatis配置** - 在Scala中,我们需要创建一个`...
pom.xml是Maven项目对象模型(Project Object Model)的配置文件,用于定义项目的依赖、插件和其他构建设置。在SpringBoot项目中,pom.xml用于声明SpringBoot起步依赖、SpringData JPA、Scala库、MySQL驱动等相关...
NULL 博文链接:https://blackproof.iteye.com/blog/2242759
2. **Scala**: Scala是一种多范式的编程语言,结合了面向对象和函数式编程的特点。它运行在Java虚拟机(JVM)上,可以无缝集成Java库,因此非常适合构建复杂、高性能的分布式系统。在大数据领域,Scala由于其强大的...
hadoop+scala+spakr配置,步骤详细,值得收藏。
基于Spark+Scala+MongoDB的大数据实战,商品推荐系统设计与实现.zip 1、该资源内项目代码经过严格调试,下载即用确保可以运行! 2、该资源适合计算机相关专业(如计科、人工智能、大数据、数学、电子信息等)正在做...
基于java+scala+Python+spark实现的图书推荐系统的设计与实现+详细文档+全部资料(高分毕业设计).zip基于java+scala+Python+spark实现的图书推荐系统的设计与实现+详细文档+全部资料(高分毕业设计).zip ...
### sbt + Scala + IDEA 安装配置及创建导入 sbt 项目的详细步骤 #### 一、环境搭建 本文档将详细介绍如何在 Windows 10 和 JDK 1.8 的环境下,搭建完整的 Scala + sbt + IntelliJ IDEA 开发环境。这对于初学者来...
Scala Maven 插件 scala-maven-plugin (以前是 maven-scala-plugin)用于在 Maven 中编译/测试/运行/记录 Scala 代码。类似插件 建造目前,您需要 Maven 3.x 和 JDK 8 来构建插件、创建站点并运行integration-test ...
本文主要讲述了Eclipse中集成Maven和Scala的过程,包括JDK和Scala-SDK的安装和配置、Eclipse和Scala-IDE插件的安装、m2eclipse-scala插件的安装和设置Archetype等。通过这些步骤,可以在Eclipse中使用Maven和Scala...
基于Scala+Flink实现实时冰蝎(Behinder)流量检测源码+部署文档+全部资料齐全 高分项目.zip基于Scala+Flink实现实时冰蝎(Behinder)流量检测源码+部署文档+全部资料齐全 高分项目.zip 【备注】 1、该项目是个人高分...
在本压缩包中,我们关注的是Java、Hadoop、Scala和Spark这四个技术在Windows 10环境下的配置。这些工具广泛应用于大数据处理和分析领域,尤其是Spark在现代数据科学中扮演了重要角色。让我们逐一深入理解这些技术...
在本项目中,"springboot+scala+react"的组合为我们提供了一个现代Web应用程序的开发框架,结合了Spring Boot的强大后端能力、Scala的高效编程语法以及React的前端交互优势。下面将详细介绍这三个关键技术及其在项目...
基于Scala+Hadoop+Spark的大数据金融信贷风险控系统源码+详细文档+全部数据资料 高分项目.zip 【备注】 1、该项目是个人高分项目源码,已获导师指导认可通过,答辩评审分达到95分 2、该资源内项目代码都经过测试运行...
【play2+scala+mongodb demo示例】是一个用于学习如何集成和使用Play Framework 2、Scala编程语言以及MongoDB数据库的实战项目。这个项目旨在帮助初学者理解这三者之间的协同工作,通过创建一个基本的CRUD(创建、...
Scala Lift 是一个基于 Scala 语言的全功能Web框架,它为开发者提供了构建高效、可扩展且反应迅速的Web应用程序的工具。在这个压缩包中,包含了三本书籍,旨在帮助学习者深入理解 Scala Lift 框架,提升开发能力。...