Maven Scala

From Stax

Jump to: navigation, search

Scala is a "tastefully typed" programming language for the Java runtime that combines powerful features from both the object-oriented and functional programming worlds into a very concise and expressive syntax.

The Stax Maven archetype catalog includes an archetype that can be used to jumpstart development and deployment of Scala applications. The archetype supports Scala 2.8.0 and includes support for both Scala and Java source files.


Contents

Create a Stax Scala project using Maven

Maven command (interactive)

mvn archetype:generate -DarchetypeCatalog=http://mvn.stax.net/archetypes.xml

Maven command (non-interactive)

mvn archetype:generate -U \ 
-DarchetypeGroupId=net.stax \ 
-DarchetypeArtifactId=stax-scala-archetype \ 
-DarchetypeVersion=2.8.0 \ 
-DremoteRepositories=http://mvn.stax.net/content/repositories/releases \ 
-DgroupId=your.proj.groupid \ 
-DartifactId=your-proj-id \ 
-Dversion=0.1-SNAPSHOT

Application lifecycle commands

Compile the Scala and Java source files

mvn compile

Test the application

mvn test

Run the application in a local server

mvn stax:run

Deploy the application to Stax

mvn stax:deploy

Generate an Eclipse project

Using Eclipse

Use the following command to generate Eclipse projects for your application.

mvn eclipse:eclipse

After running this command, you can import the application as a project into Eclipse. Each time you change the dependencies in your pom.xml file, you will need to run the following command:

mvn eclipse:clean eclipse:eclipse
Personal tools
Navigation