0
I am studying the project example of the official website of Dagger, which can be accessed in this link: https://github.com/google/dagger/tree/master/examples/simple/src/main/java/coffee. I am using the eclipse IDE. When I run the project it gives error on the line where reference is made to the generated Dagger_coffee class. Eclipse is simply not generating this file automatically, as stated in the tutorials. I emphasize that I will not use Dagger in a mobile project, but with Java EE. I know CDI is the most appropriate, but this is a requirement of my boss. What must be wrong? Follow the code:
package coffee;
import dagger.Component;
import javax.inject.Singleton;
public class CoffeeApp {
@Singleton
@Component(modules = { DripCoffeeModule.class })
public interface Coffee {
CoffeeMaker maker();
}
public static void main(String[] args) {
Coffee coffee = Dagger_Coffee.builder().build();
coffee.maker().brew();
}
}