You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2002/05/08 11:35:07 UTC
cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/extension Extension.java
donaldp 02/05/08 02:35:07
Modified: . Tag: ANT_15_BRANCH build.xml
src/main/org/apache/tools/ant/taskdefs/optional/extension
Tag: ANT_15_BRANCH Extension.java
Log:
Hopefully got jdk1.2 compatability back.
Revision Changes Path
No revision
No revision
1.304.2.4 +2 -2 jakarta-ant/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/build.xml,v
retrieving revision 1.304.2.3
retrieving revision 1.304.2.4
diff -u -r1.304.2.3 -r1.304.2.4
--- build.xml 7 May 2002 11:31:59 -0000 1.304.2.3
+++ build.xml 8 May 2002 09:35:07 -0000 1.304.2.4
@@ -120,6 +120,8 @@
-->
<!-- depends on JDK version -->
<patternset id="needs.jdk1.2+">
+ <exclude name="${optional.package}/extension/**/*.java"
+ unless="jdk1.2+" />
<exclude name="${util.package}/optional/NoExitSecurityManager.java"
unless="jdk1.2+" />
<exclude name="${optional.package}/Javah.java"
@@ -141,8 +143,6 @@
</patternset>
<patternset id="needs.jdk1.3+">
<exclude name="${ant.package}/taskdefs/TestProcess.java"
- unless="jdk1.3+" />
- <exclude name="${optional.package}/extension/**/*.java"
unless="jdk1.3+" />
</patternset>
<patternset id="needs.jdk1.4+">
No revision
No revision
1.2.2.1 +11 -7 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/Extension.java
Index: Extension.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/extension/Extension.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- Extension.java 18 Apr 2002 12:49:03 -0000 1.2
+++ Extension.java 8 May 2002 09:35:07 -0000 1.2.2.1
@@ -79,7 +79,7 @@
*
* @author <a href="mailto:craigmcc@apache.org">Craig R. McClanahan</a>
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
- * @version $Revision: 1.2 $ $Date: 2002/04/18 12:49:03 $
+ * @version $Revision: 1.2.2.1 $ $Date: 2002/05/08 09:35:07 $
*/
public final class Extension
{
@@ -87,7 +87,8 @@
* Manifest Attribute Name object for EXTENSION_LIST.
* @see Attributes.Name#EXTENSION_LIST
*/
- public static final Attributes.Name EXTENSION_LIST = Attributes.Name.EXTENSION_LIST;
+ public static final Attributes.Name EXTENSION_LIST =
+ new Attributes.Name( "Extension-List" );//Attributes.Name.EXTENSION_LIST;
/**
* <code>Name</code> object for <code>Optional-Extension-List</code>
@@ -99,14 +100,15 @@
* @see <a href="http://java.sun.com/j2se/1.3/docs/guide/extensions/spec.html#dependnecy">
* Installed extension dependency</a>
*/
- public static final Attributes.Name OPTIONAL_EXTENSION_LIST = new Attributes.Name( "Optional-Extension-List" );
+ public static final Attributes.Name OPTIONAL_EXTENSION_LIST =
+ new Attributes.Name( "Optional-Extension-List" );
/**
* Manifest Attribute Name object for EXTENSION_NAME.
* @see Attributes.Name#EXTENSION_NAME
*/
- public static final Attributes.Name EXTENSION_NAME = Attributes.Name.EXTENSION_NAME;
-
+ public static final Attributes.Name EXTENSION_NAME =
+ new Attributes.Name( "Extension-Name" );//Attributes.Name.EXTENSION_NAME;
/**
* Manifest Attribute Name object for SPECIFICATION_VERSION.
* @see Attributes.Name#SPECIFICATION_VERSION
@@ -135,13 +137,15 @@
* Manifest Attribute Name object for IMPLEMENTATION_URL.
* @see Attributes.Name#IMPLEMENTATION_URL
*/
- public static final Attributes.Name IMPLEMENTATION_URL = Attributes.Name.IMPLEMENTATION_URL;
+ public static final Attributes.Name IMPLEMENTATION_URL =
+ new Attributes.Name( "Implementation-URL" );//Attributes.Name.IMPLEMENTATION_URL;
/**
* Manifest Attribute Name object for IMPLEMENTATION_VENDOR_ID.
* @see Attributes.Name#IMPLEMENTATION_VENDOR_ID
*/
- public static final Attributes.Name IMPLEMENTATION_VENDOR_ID = Attributes.Name.IMPLEMENTATION_VENDOR_ID;
+ public static final Attributes.Name IMPLEMENTATION_VENDOR_ID =
+ new Attributes.Name( "Implementation-Vendor-Id" );//Attributes.Name.IMPLEMENTATION_VENDOR_ID;
/**
* Enum indicating that extension is compatible with other extension.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/extension
Extension.java
Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
The requirement is that Ant itself must build under JDK 1.1. This can be
achieved in various ways
1. Write the class so that it works under 1.1
2. Write the class so that it compiles under 1.1, perhaps with degraded
functionality (i.e. touch task). This may require use of reflection to
access non 1.1 functionality.
3. Make the class optional and provide checks in the build file to
exclude the class from the build
For your own custom tasks, you can use whatever version of Java you
want, providing your users have the appropriate JDK.
If the task is an optional task to be included in Ant you can use any
version of the JDK in combination with option 3 above.
If the task is to be a core task, or another core component of ant, you
should try to use option 1, if possible, falling back to option 2 if
required.
Conor
Patrick (Gus) Heck wrote:
> Wait, the docs (on writing tasks) said we had to be 1.1 compliant... is it
> 1.2 or 1.1? If I can use 1.2 I just wasted a bunch of time rewriting
> something that exists in 1.2 in 1.1 compliant form.
>
>
> Stefan Bodewig wrote:
>
>
>>On 8 May 2002, <do...@apache.org> wrote:
>>
>>
>>> Hopefully got jdk1.2 compatability back.
>>
>>looks good.
>>
>>Stefan
>>
>>--
>>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit:
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/extension
Extension.java
Posted by "Patrick (Gus) Heck" <pa...@olin.edu>.
Wait, the docs (on writing tasks) said we had to be 1.1 compliant... is it
1.2 or 1.1? If I can use 1.2 I just wasted a bunch of time rewriting
something that exists in 1.2 in 1.1 compliant form.
Stefan Bodewig wrote:
> On 8 May 2002, <do...@apache.org> wrote:
>
> > Hopefully got jdk1.2 compatability back.
>
> looks good.
>
> Stefan
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/extension Extension.java
Posted by Stefan Bodewig <bo...@apache.org>.
On 8 May 2002, <do...@apache.org> wrote:
> Hopefully got jdk1.2 compatability back.
looks good.
Stefan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>