Browse Source

JARs are never empty.

PR: 4448

This probably is not what the reporting user intended ...


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269886 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
45463e16cc
5 changed files with 9 additions and 19 deletions
  1. +4
    -0
      WHATSNEW
  2. +0
    -5
      docs/manual/CoreTasks/ear.html
  3. +0
    -9
      docs/manual/CoreTasks/jar.html
  4. +0
    -5
      docs/manual/CoreTasks/war.html
  5. +5
    -0
      src/main/org/apache/tools/ant/taskdefs/Jar.java

+ 4
- 0
WHATSNEW View File

@@ -24,6 +24,10 @@ Fixed bugs:
that only one test could be running at the same time - this is not
necessarily true, see junit.extensions.ActiveTestSuite.

* <jar>'s whenEmpty attribute is useless as JARs are never empty, they
contain at least a manifest file, therefore it will now print a
warning and do nothing.

Other changes:
--------------



+ 0
- 5
docs/manual/CoreTasks/ear.html View File

@@ -97,11 +97,6 @@ attributes of zipfilesets in a Zip or Jar task.)</p>
the destination file if it already exists.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">whenempty</td>
<td valign="top">Behavior to use if no files match.</td>
<td valign="top" align="center">No</td>
</tr>
</table>
<h3>Nested elements</h3>
<h4>metainf</h4>


+ 0
- 9
docs/manual/CoreTasks/jar.html View File

@@ -38,10 +38,6 @@ JAR file already exists. When set to <code>yes</code>, the JAR file is
updated with the files specified. When set to <code>no</code> (the
default) the JAR file is overwritten. An example use of this is
provided in the <a href="zip.html">Zip task documentation</a>.</p>
<p>The <code>whenempty</code> parameter controls what happens when no files match.
If <code>create</code> (the default), the JAR is created anyway with only a manifest.
If <code>skip</code>, the JAR is not created and a warning is issued.
If <code>fail</code>, the JAR is not created and the build is halted with an error.</p>
<p>(The Jar task is a shortcut for specifying the manifest file of a JAR file.
The same thing can be accomplished by using the <i>fullpath</i>
attribute of a zipfileset in a Zip task. The one difference is that if the
@@ -124,11 +120,6 @@ include an empty one for you.)</p>
the destination file if it already exists.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">whenempty</td>
<td valign="top">Behavior to use if no files match.</td>
<td valign="top" align="center">No</td>
</tr>
</table>
<h3>Nested elements</h3>
<h4>metainf</h4>


+ 0
- 5
docs/manual/CoreTasks/war.html View File

@@ -99,11 +99,6 @@ attributes of zipfilesets in a Zip or Jar task.)</p>
the destination file if it already exists.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">whenempty</td>
<td valign="top">Behavior to use if no files match.</td>
<td valign="top" align="center">No</td>
</tr>
</table>
<h3>Nested elements</h3>
<h4>lib</h4>


+ 5
- 0
src/main/org/apache/tools/ant/taskdefs/Jar.java View File

@@ -91,6 +91,11 @@ public class Jar extends Zip {
setEncoding("UTF8");
}

public void setWhenempty(WhenEmpty we) {
log("JARs are never empty, they contain at least a manifest file",
Project.MSG_WARN);
}

/**
* @deprecated use setFile(File) instead.
*/


Loading…
Cancel
Save