2011-09-16 22 views
-1

Mavenパッケージとして実行するとこのBUILDエラーが発生します。しかし、私は何がエラーであるか分からない。誰も助けることができますか?前もって感謝します。Mavenパッケージとして実行するとコンパイルエラーが発生する

[INFO] Scanning for projects... 
[INFO] ------------------------------------------------------------------------ 
[INFO] Building Conference Organizer 
[INFO] task-segment: [package] 
[INFO] ------------------------------------------------------------------------ 
[INFO] [resources:resources {execution: default-resources}] 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] Copying 36 resources 
[INFO] [compiler:compile {execution: default-compile}] 
[INFO] Compiling 1 source file to C:\Users\Wallace\Desktop\co-app\co-app\target\classes 
[INFO] ------------------------------------------------------------------------ 
[ERROR] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Compilation failure 
C:\Users\Wallace\Desktop\co-app\co-app\src\main\java\com\alcatel\co\service\AdminControlService.java:[38,5] error: generics are not supported in -source 1.3 


[INFO] ------------------------------------------------------------------------ 
[INFO] For more information, run Maven with the -e switch 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 3 seconds 
[INFO] Finished at: Fri Sep 16 06:02:09 SGT 2011 
[INFO] Final Memory: 14M/34M 
[INFO] ------------------------------------------------------------------------ 

答えて

2

「エラー:ジェネリックは-source 1.3でサポートされていない」

イムあなたのコードを推測は、ジェネリックを使用し、コンパイラは、そのようなサポートしていないのJava 1.3を使用するように指示されます。

編集: あなたのMaven POMにこれを追加少なくとも

1.5のJava
<project> 
[...] 
    <build> 
    [...] 
    <plugins> 
    <plugin> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-compiler-plugin</artifactId> 
    <version>2.3.2</version> 
    <configuration> 
     <source>1.5</source> 
     <target>1.5</target> 
    </configuration> 
    </plugin> 
    </plugins> 
    [...] 
    </build> 
[...] 
</project> 
0

を使用する必要があります:

<build> 
    [...] 
    <plugins> 
     <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-compiler-plugin</artifactId> 
     <version>2.3.2</version> 
     <configuration> 
      <!-- set compliance level here --> 
      <source>1.6</source> 
      <target>1.6</target> 
     </configuration> 
     </plugin> 
    </plugins> 
    [...] 
</build> 

をところで、Mavenの現在のバージョンでは、デフォルトの準拠レベルとして1.5を想定しています。おそらく、現在のMavenバージョンにアップグレードする必要があります。

+0

申し訳ありませんが、どうやって追加しますか?私はpom.xmlを見ます。これを追加しますか? – Wallace

+0

' 4.0.0 com.alcatel 共同アプリ 戦争 0.0.1-SNAPSHOT 会議主催 <前提条件> 2.2。 1 ' – Wallace

関連する問題