ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r419898 - in /ant/core/trunk: CONTRIBUTORS contributors.xml docs/manual/CoreTasks/java.html src/main/org/apache/tools/ant/taskdefs/Java.java
Date Fri, 07 Jul 2006 14:39:29 GMT
Author: jhm
Date: Fri Jul  7 07:39:28 2006
New Revision: 419898

URL: http://svn.apache.org/viewvc?rev=419898&view=rev
Log:
Bug: 39153
Add notes (log+manual) that <java> does not handle jar+classpath together (more exactly
Java itself does not).

Modified:
    ant/core/trunk/CONTRIBUTORS
    ant/core/trunk/contributors.xml
    ant/core/trunk/docs/manual/CoreTasks/java.html
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java

Modified: ant/core/trunk/CONTRIBUTORS
URL: http://svn.apache.org/viewvc/ant/core/trunk/CONTRIBUTORS?rev=419898&r1=419897&r2=419898&view=diff
==============================================================================
Binary files - no diff available.

Modified: ant/core/trunk/contributors.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/contributors.xml?rev=419898&r1=419897&r2=419898&view=diff
==============================================================================
--- ant/core/trunk/contributors.xml (original)
+++ ant/core/trunk/contributors.xml Fri Jul  7 07:39:28 2006
@@ -960,6 +960,10 @@
   </name>
   <name>
     <first>Wolfgang</first>
+    <last>Frech</last>
+  </name>
+  <name>
+    <first>Wolfgang</first>
     <last>Werner</last>
   </name>
   <name>

Modified: ant/core/trunk/docs/manual/CoreTasks/java.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/java.html?rev=419898&r1=419897&r2=419898&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/java.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/java.html Fri Jul  7 07:39:28 2006
@@ -288,12 +288,15 @@
 
 <h3>JAR file execution</h3>
 
-The parameter of the <tt>jar</tt> attribute is of type <tt>File</tt>;
+<p>The parameter of the <tt>jar</tt> attribute is of type <tt>File</tt>;
 that is, the parameter is resolved to an absolute file relative to the
 base directory of the project, <i>not</i> the directory in which the Java
 task is run. If you need to locate a JAR file relative to the directory
 the task will be run in, you need to explicitly create the full path
-to the JAR file.
+to the JAR file.</p>
+<p>When using the <tt>jar</tt> attribute, all classpath settings are 
+ignored according to <a href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/java.html#-jar">Sun's
+specification</a>. 
 
 
 <h3>Examples</h3>
@@ -355,14 +358,14 @@
     &lt;jvmarg value=&quot;-Xrunhprof:cpu=samples,file=log.txt,depth=3&quot;/&gt;
   &lt;/java&gt;
 </pre>
-Add system properties and JVM-properties to the JVM as in 
+Add system properties and JVM-properties to the JVM as in
 <code>java ="-Xrunhprof:cpu=samples,file=log.txt,depth=3 -DDEBUG=true test.Main</code>
 
 <pre>  &lt;java classname=&quot;ShowJavaVersion&quot; classpath=&quot;.&quot;
         jvm=&quot;path-to-java14-home/bin/java&quot; fork=&quot;true&quot;
         taskname=&quot;java1.4&quot; &gt;
 </pre>
-Use a given Java implementation (another the one Ant is currently using) to run the class.

+Use a given Java implementation (another the one Ant is currently using) to run the class.
 For documentation in the log <code>taskname</code> is used to change the <code>[java]</code>
 log-prefix to <code>[java1.4]</code>.
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java?rev=419898&r1=419897&r2=419898&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java Fri Jul  7 07:39:28 2006
@@ -116,7 +116,7 @@
      * Do the execution and return a return code.
      *
      * @return the return code from the execute java class if it was
-     * executed in a separate VM (fork = "yes") or a security manager was 
+     * executed in a separate VM (fork = "yes") or a security manager was
      * installed that prohibits ExitVM (default).
      *
      * @throws BuildException if required parameters are missing.
@@ -134,6 +134,10 @@
             throw new BuildException("Cannot spawn a java process in non-forked mode."
                                      + " Please set fork='true'. ");
         }
+        if (cmdl.getClasspath()!=null && cmdl.getJar()!=null) {
+            log("When using 'jar' attribute classpath-settings are ignored. "
+                + "See the manual for more information.", Project.MSG_VERBOSE);
+        }
         if (spawn && incompatibleWithSpawn) {
             getProject().log("spawn does not allow attributes related to input, "
             + "output, error, result", Project.MSG_ERR);
@@ -925,4 +929,4 @@
     public CommandlineJava.SysProperties getSysProperties() {
         return cmdl.getSystemProperties();
     }
-}
+}
\ No newline at end of file



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


Mime
View raw message