在maven中调用rt.jar

命令  mvn clean compile

出错如下

 

[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

/scionDevTool/workspace/spc-portlet/spcPortal-core/src/main/java/com/sanminasci/spc/util/ImageWaterSet.java:[15,31] 警告:com.sun.image.codec.jpeg.JPEGCodec 是 Sun 的专用 API,可能会在未来版本中删除

/scionDevTool/workspace/spc-portlet/spcPortal-core/src/main/java/com/sanminasci/spc/util/ImageWaterSet.java:[16,31] 警告:com.sun.image.codec.jpeg.JPEGImageEncoder 是 Sun 的专用 API,可能会在未来版本中删除

/scionDevTool/workspace/spc-portlet/spcPortal-core/src/main/java/com/sanminasci/spc/util/ImageWaterSet.java:[41,3] 警告:com.sun.image.codec.jpeg.JPEGImageEncoder 是 Sun 的专用 API,可能会在未来版本中删除

/scionDevTool/workspace/spc-portlet/spcPortal-core/src/main/java/com/sanminasci/spc/util/ImageWaterSet.java:[41,30] 警告:com.sun.image.codec.jpeg.JPEGCodec 是 Sun 的专用 API,可能会在未来版本中删除


[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.refl

 

纠正如下

   
       
           
               
                    org.apache.maven.plugins
                    maven-compiler-plugin
                   
                        1.5
                        1.5
                       
                            
                              ${java.home}/lib/rt.jar
                       
  
                     
                   
       
               

           

       

   

你可能感兴趣的:(开发随笔,开发出错集合)