Evgenii
Evgenii

Reputation: 3450

neo4j.test: "package org.neo4j.test does not exist" error in maven

I have small question: when I add dependency

   <dependency>
       <groupId>org.neo4j</groupId>
       <artifactId>neo4j-kernel</artifactId>
       <version>1.8.1</version>
       <type>test-jar</type>
       <scope>test</scope>
   </dependency>

to maven, I have error:

package org.neo4j.test does not exist

Why?

I didn't find "neo4j.test" in maven repository (http://search.maven.org/).

TIA.


Eugeny

Upvotes: 0

Views: 1999

Answers (3)

Adrian
Adrian

Reputation: 2388

You need to use the classifier element:

<dependency>
       <groupId>org.neo4j</groupId>
       <artifactId>neo4j-kernel</artifactId>
       <version>1.8.1</version>
       <classifier>tests</classifier>
       <scope>test</scope>
</dependency>

Some read: http://maven.apache.org/pom.html#Maven_Coordinates

Upvotes: 1

carlspring
carlspring

Reputation: 32629

If your actual code is underneath src/main/java, then the scope should not be test. Otherwise, please provide more details.

Upvotes: 2

Related Questions