2017-09-22 17 views
0

私のプロジェクトをjdk-9 envにアップグレードしました。 私の設定::私はブランチをプッシュする場合でも、私は次のようトラヴィス-CIは、パッケージを見つけられませんでした建物の問題「Javax.json」を満たしjava9でtravis ciビルドに失敗しました

{ 
    "language": "java", 
    "install": "mvn install -DskipTests=true -Dmaven.javadoc.skip=true", 
    "jdk": "oraclejdk9", 
    "group": "stable", 
    "dist": "trusty", 
    "os": "linux" 
} 

エラー情報(一部):

[ERROR] COMPILATION ERROR : 
[INFO] ------------------------------------------------------------- 
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/helloidea/HelloIdea.java:[7,18] package javax.json does not exist 
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[14,18] package javax.json does not exist 
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[15,18] package javax.json does not exist 
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[48,9] cannot find symbol 
    symbol: class JsonObjectBuilder 
    location: class com.arvinsichuan.mongojdbc.MongoJDBC 
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[48,41] cannot find symbol 
    symbol: variable Json 
    location: class com.arvinsichuan.mongojdbc.MongoJDBC 
[INFO] 5 errors 
[INFO] ------------------------------------------------------------- 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 5.799 s 
[INFO] Finished at: 2017-09-22T05:49:56Z 
[INFO] Final Memory: 23M/512M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler- 
    plugin:3.1:compile (default-compile) on project JEETwentySeventeenAutumn: 
    Compilation failure: Compilation failure: 
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/helloidea/HelloIdea.java:[7,18] package javax.json does not exist 
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[14,18] package javax.json does not exist 
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[15,18] package javax.json does not exist 
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[48,9] cannot find symbol 
[ERROR] symbol: class JsonObjectBuilder 
[ERROR] location: class com.arvinsichuan.mongojdbc.MongoJDBC 
[ERROR] /home/travis/build/ArvinSiChuan/TwentySeventeenAutumn/src/main/java/com/arvinsichuan/mongojdbc/MongoJDBC.java:[48,41] cannot find symbol 
[ERROR] symbol: variable Json 
[ERROR] location: class com.arvinsichuan.mongojdbc.MongoJDBC 
[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 
The command "mvn install -DskipTests=true -Dmaven.javadoc.skip=true" failed 
and exited with 1 during . 
Your build has been stopped. 
+2

を 'Javax.json'は、Java 9で削除されました:https://jaxenter.com/json-api-dropped-java-9-113028.html – Ferrybig

+0

はI」 jsonがJava jdk-9の中核となるサポートはありませんか? –

+0

パッケージのどのクラスを使用しようとしていますか? – nullpointer

答えて

0

依存関係を追加します。

<dependency> 
    <groupId>org.glassfish</groupId> 
    <artifactId>javax.json</artifactId> 
    <version>1.1</version> 
</dependency> 
関連する問題