You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2002/12/03 03:50:33 UTC

DO NOT REPLY [Bug 15014] New: - ${build.sysclasspath} is ignored when there is no classpath set on

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15014>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15014

${build.sysclasspath} is ignored when there is no classpath set on <javac>

           Summary: ${build.sysclasspath} is ignored when there is no
                    classpath set on <javac>
           Product: Ant
           Version: 1.5.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: jesse.glick@netbeans.com


I am reporting this against 1.5.1 but actually I think the bug is much older.

Normally ${build.sysclasspath} works as documented. However if you have a
<javac> task with no classpath set at all (neither via attribute nor via nested
element), the behavior is as if the value 'last' (or 'only' or 'first') were
used, even if the property is in fact set to 'ignore'. Thus people who expect
-Dbuild.sysclasspath=ignore to protect them against unintended classpath
entries, will find that this does not work unless they give an *empty* classpath
for source trees which do not require anything other than the standard JRE
classes! This behavior is inconsistent, confusing, and maybe dangerous in some
situations.

Attaching a transcript of a test session. You can see that ant
empty-cp-build.syscp=ignore fails as you would expect, yet ant
no-cp-build.syscp=ignore mysteriously succeeds. After applying a patch to the
trunk version of DefaultCompilerAdapter (also attached), both of these fail as
expected.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>