membersound
membersound

Reputation: 86865

Opencsv import cannot be resolved

Anyone has a clue why I cannot use opencsv?

        <dependency>
            <groupId>net.sf.opencsv</groupId>
            <artifactId>opencsv</artifactId>
            <version>2.3</version>
        </dependency>

import au.com.bytecode.opencsv.CSVReader;

eclipse: "The import au cannot be resolved"

Upvotes: 3

Views: 12751

Answers (2)

Anxo P
Anxo P

Reputation: 759

i wrote this code, and my example works without problem.

<dependency>
            <groupId>au.com.bytecode</groupId>
            <artifactId>opencsv</artifactId>
            <version>${opencsv.version}</version>
</dependency>

Upvotes: 1

Michał Kalinowski
Michał Kalinowski

Reputation: 17983

Unfortunately, Eclipse support for Maven is far from perfect and some weird things sometimes happen. First of all, ensure that you're using m2e, at least 1.0 version. Second thing, regenerate Eclipse project files by Maven -> Update Project Configuration.... It must work then.

Upvotes: 1

Related Questions