2013-10-17 5 views
5

나는 Maven으로 자바 프로젝트를 만들려고한다. Java 7을 사용하지만 Maven 소스는 1.6입니다. 나는 그것을 바꿀 수 없다. 메이븐에 대한 물건을 사용되지 틀리 왜 궁금 .. 현재Maven build deprecation error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project search: Compilation failure 
[ERROR] could not parse error message: warning: [options] bootstrap class path not set in conjunction with -source 1.6 
[ERROR] /someClassName.java:114: warning: [deprecation] LUCENE_36 in Version has been deprecated 
[ERROR] out = new ICUCollationKeyAnalyzer(Version.LUCENE_36, l); 
[ERROR]^
[ERROR] -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project search: Compilation failure 
could not parse error message: warning: [options] bootstrap class path not set in conjunction with -source 1.6 
/someClassName.java:114: warning: [deprecation] LUCENE_36 in Version has been deprecated 
        out = new ICUCollationKeyAnalyzer(Version.LUCENE_36, l); 

, 나는 받는다는 권장으로 루씬 버전을 변경 않을거야 그래서 : 나는 "깨끗한 MVN 설치"를 실행하면 이상한 오류와 함께 실패 코드 및 이러한 오류를 방지하는 방법? 감사.

Apache Maven 3.0.4 
Java version: 1.7.0_25, vendor: Oracle Corporation 

답변

0

확인. 다들 감사 해요. 문제 클래스에 SuppressWarning("deprecation")을 추가하는 문제를 해결했습니다. 하지만 여전히 어떤 차이가 있는지 알 수는 없습니다.

3

오류 메시지가 잘못된 것입니다 - 그것은 단지 컴파일 경고가 아니라 실패입니다. 이는 http://jira.codehaus.org/browse/MCOMPILER-179과 관련이있을 수 있습니다. Maven 3.0.5 (또는 최신 3.1.x)로 업그레이드하거나 POM에서 maven 컴파일러 플러그인의 버전을 업데이트하십시오.

1

이 주제에 대해 좀 더 자세히 설명하려면 showWarnings 구성을 사용하여 컴파일 경고 표시를 켜거나 끕니다.

처음에 경고를 표시하지 않으려면 false로 설정하십시오 (적절한 경우).

<plugins> 
    <plugin> 
     <artifactId>maven-compiler-plugin</artifactId> 
     <version>3.3</version> 
     <configuration> 
      <source>1.8</source> 
      <target>1.8</target> 
      <showWarnings>false</showWarnings> 
     </configuration> 
    </plugin> 
</plugins>