Domanda

I'm doing an upgrade from Grails 2.2.1 to 2.3.4 and upgrading the plugins as I go as well. When I compile I get a message that states:

 NOTE: Some input files use or override a deprecated API.
 NOTE: Recompile with -Xlint:deprecation for details

I tried recompiling with the flag:

 grails compile -Xlint:deprecation

The application doesn't relinquish anymore details about the deprecated plugin. I've searched online and don't see any documentation for the "-Xlint:deprecation" flag. I know I could just take off a plugin and compile to find the one its referring to, but I'd like to know how to use this "-Xlint:deprecation" for future use and ease.

È stato utile?

Soluzione

As of Grails 2.4.0, if you specify

-Xlint:deprecation 

as a command-line option, Grails ignores this option and places it in it's DefaultCommandLine's undeclaredOptions HashMap. Grails explicitly sets the compilerargs for javac to

-Xlint:-options

This sets "no further warnings about command line options are generated from this point on".

You can see this in the Grails code on line 285 in the GrailsProjectCompiler.groovy

This is why setting JAVA_OPTS="-Xlint:-deprecation" or GRAILS_OPTS doesn't work. See the unresolved Jira issue at http://jira.grails.org/browse/GRAILS-7670?jql=project%20%3D%20GRAILS%20AND%20text%20~%20javac.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top