Unconventional naming of antlib descriptor [message #1855004] |
Fri, 23 September 2022 02:41 |
|
Epsilon's antlibs are in resources named tasks.xml instead of antlib.xml.
Unfortunately, this naming blocks the simplified declaration of antlibs described in the antlib documentation.
Quote:Antlib namespace
The name space URIs with the pattern antlib:java.package are given special treatment.
When Ant encounters a element with a namespace URI with this pattern, it will check to see if there is a resource of the name antlib.xml in the package directory in the default classpath.
A project using workflow tasks would then declare:
<project xmlns:workflow="antlib:org.eclipse.epsilon.workflow.tasks"/>
It would be great if the antlib resource could be renamed.
|
|
|
Re: Unconventional naming of antlib descriptor [message #1855005 is a reply to message #1855004] |
Fri, 23 September 2022 06:14 |
|
This would also allow to remove the longish prefix to be reduced, if tasks was given a short name, as shown below
<epsilon.emf.loadModel name="Tree1"
modelFile="TreeInstance.ecore"
metamodelFile="Tree.ecore" />
to be abbreviated
<emf:loadModel name="Tree1"
modelFile="TreeInstance.ecore"
metamodelFile="Tree.ecore" />
|
|
|
Re: Unconventional naming of antlib descriptor [message #1855031 is a reply to message #1855005] |
Sat, 24 September 2022 16:43 |
|
Hi Jörn,
Thanks for the suggestion. Instead of renaming tasks.xml files (which would break existing code), I have added new antlib.xml files to all Epsilon ANT projects (as with tasks.xml files, the new files are also auto-generated from the respective plugin.xmls). The new antlib.xml files omit the epsilon.* prefixes from task names so the following should work fine now:
<project xmlns:epsilon="antlib:org.eclipse.epsilon.workflow.tasks" default="main">
<target name="main">
<epsilon:eol>
"Hello world".println();
</epsilon:eol>
</target>
</project>
Thanks,
Dimitris
[Updated on: Sat, 24 September 2022 16:43] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03369 seconds