{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# %classpath add mvn group name version" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%classpath add mvn com.fasterxml.jackson.core jackson-databind 2.6.5" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Gson exmaple" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import com.google.gson.Gson;" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%classpath add mvn com.google.code.gson gson 2.2.4" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import com.google.gson.Gson;" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%classpath add mvn com.google.code.gson gson 2.2.4\n", "\n", "import com.google.gson.Gson;\n", "import com.google.gson.GsonBuilder;\n", "\n", "Gson gson = new GsonBuilder().create();\n", "gson.toJson(\"Hello\", System.out);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Error handling" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%classpath add mvn com.fasterxml.jackson.XXXXXXX jackson-databind 2.6.5" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%classpath add mvn com.fasterxml.jackson.XXXXXXX jackson-databind" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Clojars repository\n", "https://mvnrepository.com/artifact/goog-jar/goog-jar/1.0.0" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%classpath add mvn goog-jar goog-jar 1.0.0" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Groovy", "language": "groovy", "name": "groovy" }, "language_info": { "codemirror_mode": "groovy", "file_extension": ".groovy", "mimetype": "", "name": "Groovy", "nbconverter_exporter": "", "version": "2.4.3" } }, "nbformat": 4, "nbformat_minor": 2 }