Giter Club home page Giter Club logo

scala-archetype-sparkinaction's Introduction

Archetype to scaffold projects for the Spark in Action book

The book cover
However unlikely, you maybe still haven't purchased the book, so here's the link: Spark in Action. Use the coupon code bonaci39 for 39% off. BTW, you don't need to try bonaci100, it won't work :)
Thanks



Eclipse:

  1. File > New > Project... > Maven > Maven Project
  2. Click Next on the first screen of the New project wizard
  3. Select Configure... > Add Remote Catalog...
  4. Enter the following URL in the Catalog file field: https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/master/archetype-catalog.xml
    Enter Spark in Action in the Description field
  5. After you close the dialog, choose the Spark in Action catalog in the Catalog dropdown list
  6. In the next dialog simply enter you project details and confirm with Finish. In case of problems with this step (such as IDE not being able to locate the POM file) try to use a different URL in the step 4: https://raw.githubusercontent.com/spark-in-action/scala-archetype-sparkinaction/master/archetype-catalog.xml
  7. Once the new projects generates change the Scala version to 2.10.5: Right click on the generated project and select: Scala > Set the Scala Installation > Fixed Scala Installation 2.10.5.(bundled)

IntelliJ IDEA:

  1. File > New > Project... > Maven
  2. Select Create from Archetype and click on Add Archetype button
  3. Fill-in the Add archetype dialog:
    • GroupId: org.sparkinaction
    • ArtifactId: scala-archetype-sparkinaction
    • Version: 0.13
    • Repository: https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/master And confirm with OK.
  4. In the list of archetypes, find org.sparkinaction, the one that you just added, expand it and select the archetype with the version and click Next
  5. Enter parameters for your new project:
    • GroupId: org.sia
    • ArtifactId: chapter-03-app
    • Version: 0.1-SNAPSHOT
  6. In the next screen, just confirm with Next
  7. In the last screen, enter Chapter03App as the project name and click Finish
More detailed, tutorial-style instructions, with all the prerequisites are in chapter 3 of the book.

From the terminal (interactive mode):

Select the only possible option (1) and answer subsequent questions.
mvn archetype:generate \
  -DarchetypeCatalog=https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/master/archetype-catalog.xml \
  -DarchetypeRepository=https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/master

From the terminal or a shell script (batch mode):

Don't forget to change the parameter values in the last line.
mvn archetype:generate -B \
    -DarchetypeCatalog=https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/master/archetype-catalog.xml \
    -DarchetypeRepository=https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/master \
    -DarchetypeGroupId=org.sparkinaction \
    -DarchetypeArtifactId=scala-archetype-sparkinaction \
    -DarchetypeVersion=0.13 \
    -DgroupId=com.sia -DartifactId=chapter03App -Dversion=0.1-SNAPSHOT -Dpackage=com.sia

Generated project example usage

(run mvn scala:help for the full list of commands)

In Eclipse, you can run the generated project by simply doing Shift+Alt+x s (while positioned in App.scala), which is the shortcut for Run As > Scala Application.

You can also run it from the command line or from Eclipse Maven Run configuration with these goals (adjust main class if needed):

mvn scala:compile
mvn scala:run -DmainClass=com.sia.Chapter03App

If you choose to purchase the book, thank you :)

scala-archetype-sparkinaction's People

Contributors

mbonaci avatar davidb avatar zecevicp avatar arun-rama avatar riverma avatar etorreborre avatar

Watchers

Alvaro del Castillo avatar James Cloos avatar

scala-archetype-sparkinaction's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.