0

I have the following dependencies in my pom :

        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-bom</artifactId>
            <version>${dropwizard.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>

        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-auth</artifactId>
            <version>${dropwizard.version}</version>
            <scope>import</scope>
        </dependency>

I have built the project, to make sure everything needed is in place - but then when I write the following code :

public class BasicAuthentication implements Authenticator {
    // I am aware that Authenticator takes arguments, but this is a separate issue. :)
}

For some reason, as I type out the word "Authenticator" - the auto complete suggestions for that class are for java, sun, etc - the dropwizard.auth one is not there.

Any idea what is going on?

I am tagging Maven, intelliJ, and Dropwizard in the question, because I am unaway which of these is actually causing the issue...

EDIT : nobody really seems to have an answer for this - should I just abandon and go to something that has traditionally worked for me, like Spring?

MickeyThreeSheds
  • 986
  • 4
  • 23
  • 42

1 Answers1

1

First of all, make sure 'Enable auto import' is on for Maven projects and the library is visible under external libraries in the project view.

Preferences | Build, Execution, Deployment | Build Tools | Maven | Importing | Import Maven projects automatically.

You can also right click in project view.

Right click | Maven | Reimport.

If the issue still persists, you can try

File | Invalidate caches / Restart option in IntelliJ.

Dhruvil Vaghela
  • 580
  • 6
  • 13
  • Hmmm, thanks, but it appears as though none of these fix my problem. – MickeyThreeSheds Aug 30 '17 at 20:39
  • @MickeyThreeSheds Is bom dependency under dependencyManagement tag? io.dropwizard dropwizard-bom ${dropwizard.version} pom import Please try removing scope import for the dropwizard-auth and verify that dropwizard.version is specified under the properties. – Dhruvil Vaghela Aug 31 '17 at 06:30
  • @MickeyThreeSheds do refer this [StackOverflow | maven-bom-bill-of-materials-dependency](https://stackoverflow.com/questions/38496022/maven-bom-bill-of-materials-dependency) – Dhruvil Vaghela Aug 31 '17 at 06:35