wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Creating Schemas with SchemaGenTask Producing Ominous Warning Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Creating Schemas with SchemaGenTask Producing Ominous Warning" Watch "Creating Schemas with SchemaGenTask Producing Ominous Warning" New topic
Author

Creating Schemas with SchemaGenTask Producing Ominous Warning

Jessie Kensinger
Greenhorn

Joined: Sep 27, 2011
Posts: 8
Has anyone out there seen this warning and figured out how to resolve it? If so, could you please post how... Otherwise, I am posting this as informational in case anyone else out there might be curious.

warning: The apt tool and its associated API are planned to be removed in the next major JDK release. These features have been superseded by javac and the standardized annotation processing API, javax.annotation.processing and javax.lang.model. Users are recommended to migrate to the annotation processing features of javac; see the javac man page for more information.

Background:

I am building a project with Ant inside netbeans on a linux system. Inside my build.xml, I have the following:
<target name="-pre-compile">
<taskdef name="schemagen" classname="com.sun.tools.jxc.SchemaGenTask">
<classpath>
<fileset dir="/usr/local/netbeans-7.0.1/ide/modules/ext/jaxb" includes="*.jar" />
</classpath>
</taskdef>
<echo message= "Generating schemas..." />
<mkdir dir="${build.dir}/schemas" />
<schemagen destdir="${build.dir}/schemas">
<src path="${src.dir}" />
<schema file="Group.xsd" />
</schemagen>
</target>

What this target does is build an XML schema from a plain old java class (i.e. POJO). The XSD file gets created successfully, however the process appears to use code that has been depreciated and hence the warning being generated. The best evidence I could find for this is:
http://stackoverflow.com/questions/9148379/how-to-use-javac-to-replace-deprecated-wsgen-or-apt-in-jdk-7-or-6
As the article seems to imply, it is a warning I will simply have to suffer with until Java 8... however... I thought Id post here and see if someone has an idea on how I should make it go away.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating Schemas with SchemaGenTask Producing Ominous Warning
 
Similar Threads
web service with jax-ws
Web Service with build.xml
Hibernate SchemaExportTask Problem
JIBX - ant script for jar.
ant schemagen task