개발관련/JAVA

The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files

길동무92 2020. 4. 9. 13:53



pom.xml 빌드시

The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files  

오류가 발생한다면

pom.xml 의 <build>쪽의 버전이 맞지 않아서 발생하는 부분이 있음


이런 경우 아래와 같이 버전을 맞춰줘야 함

1. maven compiler


               <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>


2. aspectj-maven-plugin


            <plugin>
                   <groupId>org.codehaus.mojo</groupId>
                   <artifactId>aspectj-maven-plugin</artifactId>
                   <version>1.7</version>
                   <configuration>
                       <complianceLevel>1.8</complianceLevel>
                       <source>1.8</source>
                       <target>1.8</target>
                       <showWeaveInfo>true</showWeaveInfo>
                       <weaveDependencies>
                        <weaveDependency>
                            <groupId>org.apache.ibatis</groupId>
                            <artifactId>ibatis-sqlmap</artifactId>
                        </weaveDependency>
                    </weaveDependencies>
                   </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
     <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
      <version>1.7.4</version>
     </dependency>
     <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjtools</artifactId>
      <version>1.7.4</version>
     </dependency>
    </dependencies>
            </plugin>

pom.xml
0.02MB