ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siberski, Wolf" <Wolf.Siber...@tui.de>
Subject RE: [DISC] details of task library concept
Date Tue, 22 May 2001 12:46:33 GMT
> Jose Alberto Fernandez wrote:
> > From: Stefan Bodewig [mailto:bodewig@apache.org]
[snip]
> > * Will each task library be assigned to an XML-Namespace to avoid
> > task-name clashes?
> >
> > IMHO, yes.  Maybe we should use the name of the jar file (without
> > extension) as the namespace prefix.
> 
> I prefer an explicit name assignment. There is nothin to prevent having
two
> task libraries with the same file name but in different directories. Or
any
> need to modify my build file all over the place when I upgrade from
> "weblogiclib-1.1.jar" to "weblogic-1.2.jar".
> 
> 	<tasklib name="weblogic">
> 		<classpath ...>
> 		<fileset .... />
> 	</tasklib>
> 

IMHO the task library writer should determine the name
of its namespace, not the build file writer, because:
- otherwise there is a lot of redundant information
- this could lead to confusing situations such as a
  task imported twice under different names

We should either name tasks with dot notation (e.g. cvs.checkin)
or introduce a package tag:
 <taskpackage name="cvs>
 <taskdef...
 </taskpackage>

The build file writer should access them using the dot notation.
Using the jar file name as package name is also not a
good idea, because it blocks getting tasks from other
sources than jar files.

> >
> > * The extension of the library file itself.
> >
> > ".tsk" has been proposed, but this might put too much focus on tasks.
> > How about ".ant"?
> >
> I propose that <tasklib> itself does not require a specific 
> extention name.

I agree. If it is a .jar *and* is in the appropriate directory 
*and* contains the correct meta-inf file then we can safely assume 
it is a task library.

Wolf

Mime
View raw message