ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12038] New: - Use of external command line compiler requires execute <<ALL FILES>> FilePermission
Date Mon, 26 Aug 2002 13:04:42 GMT
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=12038>.
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=12038

Use of external command line compiler requires execute <<ALL FILES>> FilePermission

           Summary: Use of external command line compiler requires execute
                    <<ALL FILES>> FilePermission
           Product: Ant
           Version: 1.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: glenn@apache.org


Ant is now used by Tomcat's Jasper 2 for compiling JSP pages.
Tomcat runs with the Java SecurityManager and invokes ant
classes to compile JSP pages.

If you want to use ant with an external compiler like jikes
you have to grant the following FilePermission:

permission java.io.FilePermission "<<ALL FILES>>, "read,execute";

This is too broad a permission grant for those who use a strict
java security policy and prevents use of an external compiler
like jikes.

The following enhancement would fix the problem:

Add another property called build.compiler.path in addition to
the build.compiler property.  This property would be set to
the complete path of the jikes (or other external compiler) path.

For example: -Dbuild.compiler=jikes -Dbuild.compiler.path=/usr/local/bin/jikes

Then in org.apache.tools.ant.taskdefs.compiler.Jikes.java
the following code which sets the executable would use the
property if it existed.

        Commandline cmd = new Commandline();
        cmd.setExecutable("jikes");

A path attribute could be added to the compiler element of javac to set
the complete full path to the jikes or other external compiler.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message