I would like to start a Spark project in Eclipse using Maven. I installed m2eclipse and I have a working HelloWorld Java application in my Maven project.
I would like to use the Spark infrastructure, and I follow the instructions on the official site . I added the Spark repository to my pom.xml :
<repository> <id>Spark repository</id> <url>http://www.sparkjava.com/nexus/content/repositories/spark/</url> </repository>
And then the dependency:
<dependency> <groupId>spark</groupId> <artifactId>spark</artifactId> <version>0.9.9.4-SNAPSHOT</version> </dependency>
But I get an error in Eclipse:
Missing artifact spark:spark:jar:0.9.9.4-SNAPSHOT
How can I solve this problem? I do not want to download the jar Spark file and put it in a local repository.
This is my pom.xml file:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.myproject</groupId> <artifactId>Spark1</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>Spark1</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <repository> <id>Spark repository</id> <url>http://www.sparkjava.com/nexus/content/repositories/spark/</url> </repository> <dependencies> <dependency> <groupId>spark</groupId> <artifactId>spark</artifactId> <version>0.9.9.4-SNAPSHOT</version> </dependency> </dependencies> </project>
source share