This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 48176

Summary: provide easier way to specify compiler options
Product: projects Reporter: athompson <athompson>
Component: AntAssignee: Jesse Glick <jglick>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P2    
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description athompson 2004-08-30 16:00:05 UTC
since i'm too lazy to write at the moment, i'll
just cut and paste the mailing list text:

<Bryon Abbott>
When you get the following types of errors, what
is the best way to temporarily change the compile
options to view the more detailed output?

Compiling 1 source file to
/home/bryon/nbProjects/Pictures/build/classes
Note:
/home/bryon/nbProjects/Pictures/src/bma/netbeans/modules/pictures/Pictures.java
uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note:
/home/bryon/nbProjects/Pictures/src/bma/netbeans/modules/pictures/Pictures.java
uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
compile:
</Bryon Abbot>

<Tom Ball>
For deprecation, you can specify
"deprecation=true" in the args in your javac task.
 Other -Xlint arguments are a little harder,
because you have to embed a compilarg element, like:

   <javac srcdir="${src}" destdir="${build}">
      <compilerarg value="-Xlint:all"/>
   </javac>

Ant doesn't have a temporary way to turn on
error-checking, but many NetBeans projects do so
by setting a project property:

   <javac srcdir="${src}" destdir="${build}"
    deprecated="${my.project.deprecated.flag}">
   </javac>

My preference is to turn on the strictest
error-checking the source allows, clean up the
warnings, and then leave it there to catch
possible regressions.

Tom
</Tom Ball>
Comment 1 Jesse Glick 2004-08-30 22:39:25 UTC

*** This issue has been marked as a duplicate of 46995 ***