Несовместимые типы: логическое не может быть преобразовано в org.eclipse.jdt.annotation.DefaultLocation - PullRequest
0 голосов
/ 11 июля 2019

Я получаю сообщение об ошибке несовместимых типов: логическое значение не может быть преобразовано в org.eclipse.jdt.annotation.DefaultLocation и не знаю причину этой ошибки.

Мой файл pom:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <properties> 
    <project.build.sourceEncoding>ISO-8859-1 </project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source> 
    <maven.compiler.target>1.8</maven.compiler.target> 
  </properties> 
  <modelVersion>4.0.0</modelVersion>
  <groupId>iav.main</groupId>
  <artifactId>C-Check.ParserDevelopment</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>C-Check.ParserDevelopment</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.12</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jdt</groupId>
      <artifactId>org.eclipse.jdt.annotation</artifactId>
      <version>2.0.0</version>
    </dependency>
    <dependency>
      <groupId>args4j</groupId>
      <artifactId>args4j</artifactId>
      <version>2.32</version>
    </dependency>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr4-runtime</artifactId>
      <version>4.0</version>
    </dependency>

  </dependencies>
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
       <version>3.3</version>
       <configuration>
        <source>1.8</source>
        <target>1.8</target>
        <encoding>ISO-8859-1 </encoding>
       </configuration>
      </plugin>
     </plugins>
   </build> 
</project>

Я получаю ошибки:

Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< iav.main:C-Check.ParserDevelopment >-----------------
[INFO] Building C-Check.ParserDevelopment 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ C-Check.ParserDevelopment ---
[INFO] Deleting C:\Users\***\Desktop\C-Check.ParserDevelopment\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ C-Check.ParserDevelopment ---
[INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ C-Check.ParserDevelopment ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 113 source files to C:\Users\***\Desktop\C-Check.ParserDevelopment\target\classes
[INFO] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/Args4J/Config.java: Some input files use or override a deprecated API.
[INFO] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/Args4J/Config.java: Recompile with -Xlint:deprecation for details.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/fileParser/LineNumberCalculatorTest.java:[10,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/utils/StringUtilsTest.java:[10,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/utils/package-info.java:[1,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/Args4J/package-info.java:[7,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/Args4J/spi/package-info.java:[5,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/arguments/package-info.java:[1,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/fileParser/ANTLR4/package-info.java:[1,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[INFO] 7 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  16.023 s
[INFO] Finished at: 2019-07-11T17:14:18+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project C-Check.ParserDevelopment: Compilation failure: Compilation failure:
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/fileParser/LineNumberCalculatorTest.java:[10,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/utils/StringUtilsTest.java:[10,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/utils/package-info.java:[1,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/Args4J/package-info.java:[7,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/Args4J/spi/package-info.java:[5,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/arguments/package-info.java:[1,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] /C:/Users/***/Desktop/C-Check.ParserDevelopment/src/main/java/iav/main/fileParser/ANTLR4/package-info.java:[1,19] incompatible types: boolean cannot be converted to org.eclipse.jdt.annotation.DefaultLocation
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Я пытаюсь создать проект maven из существующего проекта Java.В Eclipse нельзя использовать плагин m2e.Буду очень признателен, если кто-нибудь поможет мне с этой ошибкой.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...