Не добавляются ресурсные файлы в jar при сборке мавеном: - answers.txt - questions.txt - rightAnswers.txt В pom.xml описаны: <resources> <resource> <directory>src/main/resources</directory> <includes> <include>questions.txt</include> <include>answers.txt</include> <include>rightAnswers.txt</include> </includes> </resource> </resources> Чтение в Main.class первый вариант: FileReader readerQuestions = new FileReader("questions.txt"); FileReader readerAnswers = new FileReader("answers.txt"); FileReader readerRightAnswers = new FileReader("rightAnswers.txt"); Второй вариант: FileReader readerQuestions = new FileReader(new String(Files.readAllBytes(Paths.get("questions.txt")))); FileReader readerAnswers = new FileReader(new String(Files.readAllBytes(Paths.get("answers.txt")))); FileReader readerRightAnswers = new FileReader(new String(Files.readAllBytes(Paths.get("rightAnswers.txt")))); 

Rep - https://github.com/MichelShumaher/System-of-Testing.git

Project structure

  • In addition to specifying the link to the repository, specify somehow the structure of the project in the question itself, so that you can see it without following the link. At least a screenshot of the IDE attach. And then the links may die, or you change the code in the repository and the question will become meaningless, because there will be no possibility of reproducing the problem. - Yuriy SPb
  • Also indicate what you are assembling. - Temka, too,

0