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 - provide easier way to specify compiler options
Summary: provide easier way to specify compiler options
Status: RESOLVED DUPLICATE of bug 46995
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker with 1 vote (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-30 16:00 UTC by athompson
Modified: 2004-08-30 22:39 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***