forked from apache/xmlbeans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.jelly
44 lines (35 loc) · 1.4 KB
/
plugin.jelly
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:jelant="jelly:ant"
xmlns:util="jelly:util">
<!-- ================================================================== -->
<!-- XMLBean PlugIn -->
<!-- ================================================================== -->
<!-- This goal generates the XMLBeans from the .xsd files -->
<goal name="xmlbeans:xmlbean"
description="Generates XMLBeans from XML Schema files.">
<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean">
<classpath>
<path refid="maven.dependency.classpath"/>
</classpath>
</taskdef>
<xmlbean>
<!-- list of additional options -->
<j:set var="opsDelim" value=","/>
<j:set var="addOps" value="schema,includes,excludes,destfile,classgendir,srconly,srcgendir,debug"/>
<!-- Setup the XMLBean's ant properties: -->
<util:tokenize var="ops" delim="${opsDelim}">${addOps}</util:tokenize>
<j:forEach items="${ops}" var="op">
<j:set var="op_var_name" value="maven.xmlbeans.xmlbean.${op}"/>
<j:set var="opX" value="${op_var_name}X"/>
<j:if test="${opX != 'X'}">
<jelant:setProperty name="${op}" value="${context.getVariable(op_var_name)}"/>
</j:if>
</j:forEach>
<classpath>
<path refid="maven.dependency.classpath"/>
</classpath>
</xmlbean>
</goal>
</project>