JDK-8196078 : Add Warnings to the JAX-WS and JAXB tools indicating they are deprecated
  • Type: Enhancement
  • Component: xml
  • Priority: P2
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2018-01-24
  • Updated: 2018-01-31
  • Resolved: 2018-01-31
Related Reports
Relates :  
Description
It was suggested that we should add a simple warning message to the JAXWS and JAXB tools indicating that the tools have been deprecated and may be removed.

The proposed change is:

$ hg diff
diff -r 3eae36c6baa5 src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java
--- a/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java	Tue Jan 23 12:23:55 2018 +0000
+++ b/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/SchemaGenerator.java	Wed Jan 24 12:29:34 2018 -0500
@@ -64,6 +64,8 @@
      * Runs the schema generator.
      */
     public static void main(String[] args) throws Exception {
+        System.out.println("WARNING: schemagen has been deprecated and will be removed in a future release!");
+
         System.exit(run(args));
     }
 
diff -r 3eae36c6baa5 src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Driver.java
--- a/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Driver.java	Tue Jan 23 12:23:55 2018 +0000
+++ b/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Driver.java	Wed Jan 24 12:29:34 2018 -0500
@@ -125,6 +125,8 @@
     }
 
     private static void _main( String[] args ) throws Exception {
+        System.out.println("WARNING: xjc has been deprecated and will be removed in a future release!");
+
         try {
             System.exit(run( args, System.out, System.out ));
         } catch (BadCommandLineException e) {
diff -r 3eae36c6baa5 src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java
--- a/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java	Tue Jan 23 12:23:55 2018 +0000
+++ b/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java	Wed Jan 24 12:29:34 2018 -0500
@@ -94,6 +94,7 @@
     }
 
     public boolean run(String[] args) {
+        System.out.println("WARNING: wsgen has been deprecated and will be removed in a future release!");
         final Listener listener = new Listener();
         for (String arg : args) {
             if (arg.equals("-version")) {
diff -r 3eae36c6baa5 src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java
--- a/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java	Tue Jan 23 12:23:55 2018 +0000
+++ b/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java	Wed Jan 24 12:29:34 2018 -0500
@@ -170,6 +170,7 @@
 
     protected boolean run(String[] args, Listener listener,
                        Receiver receiver) {
+        System.out.println("WARNING: wsimport has been deprecated and will be removed in a future release!");
         for (String arg : args) {
             if (arg.equals("-version")) {
                 listener.message(
$ 

Comments
It has been determined that we are too late in the release cycle for JDK 10 to consider this feature request.
31-01-2018

Enhancement request declined by Project Lead. Sorry, but I can't see how this is critical to the success of the release. We have to draw the line somewhere.
30-01-2018

We should have done this in JDK 9 as there are likely projects running these tools at build time and these projects will need work to move them to use the standalone versions (the standalone versions of JAX-* do not include command line launchers, they instead expose APIs for Maven plugins or ant tasks to run). If we can't do anything on this in JDK 10 then we should at least ensure that the release notes make it clear that these command line tools will be removed in a future release.
30-01-2018

Late Enhancement Request This is low risk and provides an extra heads up to anyone who is using the Java EE tools that they are going away. Currently while the Java EE modules are not available by default, the tools are without and heads up they are deprecated. This was an internal request for this change realizing we are late in the cycle. The changes are trivial and can be pushed back this week if needed.
29-01-2018

JDK 10 is in Rampdown Phase Two (http://openjdk.java.net/projects/jdk/10/rdp-2). This is a P4 issue, and it's really an enhancement rather than a bug. It hence requires approval as such (http://openjdk.java.net/projects/jdk/10/late-enhancement-process) and also re-prioritization to P1 or P2.
29-01-2018

Fix Request: This is low risk and provides an extra heads up to anyone who is using the Java EE tools that they are going away
26-01-2018