0

Logger and LoggerFactory WERE available just before I added Maven exec plugin which caused IntelliJ to start whining about using Java 5. Fixed that up and now they are not available from the imports list now, leaving me only with:

Logger from java.util.logging and java.lang.system are all I've got. Mysterious indeed. .

.

.

Main

public class MultiThreadedBlockingServer {

    private static final Logger log = LoggerFactory.getLogger(MultiThreadedBlockingServer.class);

Most of pom.xml

<properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
    </properties>


    <dependencyManagement>
        <dependencies>
            <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>1.7.28</version>
            </dependency>


        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.2.1</version>
                <configuration>
                    <mainClass>com.demo.blocking.InToOut_BlockingServer_AutoClose</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
chrips
  • 4,996
  • 5
  • 24
  • 48
  • 1
    remove the `dependencyManagement` around the dependencies. `dependencyManagement` is used to manage dependencies within the pom, child modules etc. Not add them as runtime, test, compile time etc. dependencies. Essentially, you aren't compiling the dependencies in your example – Darren Forsythe Oct 18 '19 at 23:39
  • @DarrenForsythe Thank you. I selected the link that was provided in comment... that has disappeared now, as having answered my question. – chrips Oct 19 '19 at 00:31

0 Answers0