weblogic-maven-plugin 12.1.3.0.0 For JWSC Task Does Not Compile Java Code With Version 1.7 (Doc ID 2085999.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle WebLogic Server - Version 12.1.3.0.0 to 12.1.3.0.0 [Release 12c]
Information in this document applies to any platform.

Symptoms

On : 12.1.3.0.0 version, WLS Build

weblogic-maven-plugin 12.1.3 for JWSC task does not compile Java code with version 1.7 throwing error:

[ERROR] Failed to execute goal com.oracle.weblogic:weblogic-maven-plugin:12.1.3-0-0:ws-jwsc (jwsc) on project TestWS: ws-jwsc goal failed: java.lang.RuntimeException: Unknown javadoc problem: result=1, root=null:
[ERROR] warning: [options] bootstrap class path not set in conjunction with -source 1.5
[ERROR] Loading source file /Users/ikromin/Downloads/TestWS/src/main/java/au/pcehr/docx/internal/TestWSImpl.java...
[ERROR] /Users/ikromin/Downloads/TestWS/src/main/java/au/pcehr/docx/internal/TestWSImpl.java:27: error: diamond operator is not supported in -source 1.5
[ERROR] java.util.List list = new java.util.ArrayList<>();
[ERROR] ^
[ERROR] (use -source 7 or higher to enable diamond operator)
[ERROR] 1 error
[ERROR] 1 warning
[ERROR] -> [Help 1]

 

 

Java 7 Diamond Operator causes JWSC to fail:
java.util.List<String> list = new java.util.ArrayList<>();

With Java 5 Generics, it works fine :
java.util.List<String> list = new java.util.ArrayList<String>();

The diamond<> was introduced in JAVA 7.

 

ENVIRONMENT
-----------------------

Weblogic : 12.1.3
Maven : 3.3.3
weblogic-maven-plugin, version : 12.1.3-0-0
JDK : 1.7

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms