title: Spring boot 2. Java 10. JUnit. The package org.slf4j is accessible from more than one module: <unnamed>, slf4j.api
body: <p>I use Maven, Java 10, Spring boot 2 and Junit 5 for create my application with unit tests.</p>
  
  <p>Main application class:</p>
  
  <pre><code>package mypackage;
  
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
  public class MyApplication {
  
      private final static Logger LOGGER = LoggerFactory.getLogger(MyApplication.class);
  
      public static void main(String[] args) {
          LOGGER.info("I'am running...");
          SpringApplication.run(MyApplication.class, args);
      }
  }
  </code></pre>
  
  <p>My JUnit test class:</p>
  
  <pre><code>package mypackage;
  
  import org.junit.jupiter.api.Test;
  import org.junit.jupiter.api.extension.ExtendWith;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  import org.springframework.boot.test.context.SpringBootTest;
  import org.springframework.test.context.junit.jupiter.SpringExtension;
  
  
  @ExtendWith(SpringExtension.class)
  @SpringBootTest(classes=MyTest.class)
  public class MyTest {
      private static final Logger LOGGER = LoggerFactory.getLogger(MyTest.class);
      @Test
      public void myTest() {
          LOGGER.info("Message from test");
      }
  }
  </code></pre>
  
  <p>When i import my maven project in Eclipse 4.10, i get error on my test class:</p>
  
  <pre><code>The package org.slf4j is accessible from more than one module: &lt;unnamed&gt;, slf4j.api
  </code></pre>
  
  <p>But mvn install work fine and maven-surefire-plugin run correct. What i'm doing wrong? Or it's eclipse bug? Maybe Java 10, Junit and SLF4J not working together? in my module-info.java: requires slf4j.api;</p>
  
  <p>Please help me. </p>