module-1_0.xsd 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ JBoss, Home of Professional Open Source.
  4. ~ Copyright 2010, Red Hat, Inc., and individual contributors
  5. ~ as indicated by the @author tags. See the copyright.txt file in the
  6. ~ distribution for a full listing of individual contributors.
  7. ~
  8. ~ This is free software; you can redistribute it and/or modify it
  9. ~ under the terms of the GNU Lesser General Public License as
  10. ~ published by the Free Software Foundation; either version 2.1 of
  11. ~ the License, or (at your option) any later version.
  12. ~
  13. ~ This software is distributed in the hope that it will be useful,
  14. ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. ~ Lesser General Public License for more details.
  17. ~
  18. ~ You should have received a copy of the GNU Lesser General Public
  19. ~ License along with this software; if not, write to the Free
  20. ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  21. ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  22. -->
  23. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  24. targetNamespace="urn:jboss:module:1.0"
  25. xmlns="urn:jboss:module:1.0"
  26. elementFormDefault="qualified"
  27. attributeFormDefault="unqualified"
  28. version="1.0">
  29. <!-- Root element -->
  30. <xsd:element name="module" type="moduleType">
  31. <xsd:annotation>
  32. <xsd:documentation>
  33. Root element for a module declaration.
  34. </xsd:documentation>
  35. </xsd:annotation>
  36. </xsd:element>
  37. <!-- Root element -->
  38. <xsd:element name="configuration" type="configurationType">
  39. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  40. <documentation>
  41. Root element for a filesystem module loader configuration.
  42. </documentation>
  43. </annotation>
  44. </xsd:element>
  45. <xsd:complexType name="moduleType">
  46. <xsd:annotation>
  47. <xsd:documentation>
  48. The module declaration type; contains dependencies, resources, and the main class
  49. specification.
  50. </xsd:documentation>
  51. </xsd:annotation>
  52. <xsd:all>
  53. <xsd:element name="exports" type="filterType" minOccurs="0">
  54. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  55. <documentation>
  56. Lists filter expressions to apply to the export filter of the local resources of this module
  57. (optional). By default, everything is exported. If filter expressions are provided, the default
  58. action is to accept all paths if no filters match.
  59. </documentation>
  60. </annotation>
  61. </xsd:element>
  62. <xsd:element name="dependencies" type="dependenciesType" minOccurs="0">
  63. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  64. <documentation>
  65. Lists the dependencies of this module (optional).
  66. </documentation>
  67. </annotation>
  68. </xsd:element>
  69. <xsd:element name="resources" type="resourcesType" minOccurs="0">
  70. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  71. <documentation>
  72. Lists the resource roots of this module (optional).
  73. </documentation>
  74. </annotation>
  75. </xsd:element>
  76. <xsd:element name="main-class" type="classNameType" minOccurs="0">
  77. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  78. <documentation>
  79. Specifies the main class of this module; used to run the module from the command-line
  80. (optional).
  81. </documentation>
  82. </annotation>
  83. </xsd:element>
  84. </xsd:all>
  85. <xsd:attribute name="name" type="moduleNameType" use="required">
  86. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  87. <documentation>
  88. The name of this module (required).
  89. </documentation>
  90. </annotation>
  91. </xsd:attribute>
  92. <xsd:attribute name="slot" type="moduleSlotType" use="optional">
  93. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  94. <documentation>
  95. The version slot of this module (optional).
  96. </documentation>
  97. </annotation>
  98. </xsd:attribute>
  99. </xsd:complexType>
  100. <xsd:simpleType name="moduleNameType">
  101. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  102. <documentation>
  103. A module name, which consists of one or more dot (.)-separated segments. Each segment must begin and end
  104. with an alphanumeric or underscore (_), and may otherwise contain alphanumerics, underscores, and hyphens
  105. (-).
  106. </documentation>
  107. </annotation>
  108. <xsd:restriction base="xsd:string">
  109. <xsd:pattern value="[a-zA-Z0-9_]([-a-zA-Z0-9_]*[a-zA-Z0-9_])?(\.[a-zA-Z0-9_]([-a-zA-Z0-9_]*[a-zA-Z0-9_])?)*"/>
  110. </xsd:restriction>
  111. </xsd:simpleType>
  112. <xsd:simpleType name="moduleSlotType">
  113. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  114. <documentation>
  115. A module version slot. A slot may consist of one or more alphanumerics, hyphens (-), underscores (_),
  116. plus signs (+), asterisks (*), or dots (.).
  117. </documentation>
  118. </annotation>
  119. <xsd:restriction base="xsd:string">
  120. <xsd:pattern value="[-a-zA-Z0-9_+*.]+"/>
  121. </xsd:restriction>
  122. </xsd:simpleType>
  123. <xsd:complexType name="dependenciesType">
  124. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  125. <documentation>
  126. A list of zero or more module dependencies.
  127. </documentation>
  128. </annotation>
  129. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  130. <xsd:element name="module" type="moduleDependencyType">
  131. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  132. <documentation>
  133. A specified module dependency.
  134. </documentation>
  135. </annotation>
  136. </xsd:element>
  137. </xsd:choice>
  138. </xsd:complexType>
  139. <xsd:complexType name="moduleDependencyType">
  140. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  141. <documentation>
  142. A single module dependency expression.
  143. </documentation>
  144. </annotation>
  145. <xsd:all minOccurs="0">
  146. <xsd:element name="exports" type="filterType" minOccurs="0">
  147. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  148. <documentation>
  149. A filter used to restrict what packages or directories from this dependency are re-exported by
  150. this module. See also the "export" and "services" attributes. The default action of this filter
  151. list is controlled by the value of the "export" attribute. Regardless of the setting of these
  152. attributes, this filter always behaves as if it has a final entry which rejects META-INF and
  153. all of its subdirectories.
  154. </documentation>
  155. </annotation>
  156. </xsd:element>
  157. <xsd:element name="imports" type="filterType" minOccurs="0">
  158. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  159. <documentation>
  160. A filter used to restrict what packages or directories from this dependency are visible to this
  161. module. See also the "services" attribute. The default action of this filter list is to reject
  162. a path if not matched.
  163. </documentation>
  164. </annotation>
  165. </xsd:element>
  166. </xsd:all>
  167. <xsd:attribute name="name" type="moduleNameType" use="required">
  168. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  169. <documentation>
  170. The dependency module name (required).
  171. </documentation>
  172. </annotation>
  173. </xsd:attribute>
  174. <xsd:attribute name="slot" type="moduleSlotType" use="optional">
  175. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  176. <documentation>
  177. The dependency module version slot (optional).
  178. </documentation>
  179. </annotation>
  180. </xsd:attribute>
  181. <xsd:attribute name="export" type="xsd:boolean" use="optional" default="false">
  182. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  183. <documentation>
  184. Specifies whether this module dependency is re-exported by default (default is "false"). Setting
  185. this attribute to true sets the default action for the export filter list to "accept"; leaving it
  186. as false sets the default action to "reject". Thus you can still export dependency resources even
  187. if this attribute is false by listing explicit paths for the export list.
  188. </documentation>
  189. </annotation>
  190. </xsd:attribute>
  191. <xsd:attribute name="services" type="serviceDispositionType" use="optional" default="none">
  192. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  193. <documentation>
  194. Specifies whether and how services found in this dependency are used (default is "none"). Specifying
  195. a value of "import" for this attribute is equivalent to adding a filter at the end of the import
  196. filter list which includes the META-INF/services path from the dependency module. Setting a value
  197. of "export" for this attribute is equivalent to the same action on the export filter list.
  198. </documentation>
  199. </annotation>
  200. </xsd:attribute>
  201. <xsd:attribute name="optional" type="xsd:boolean" use="optional" default="false">
  202. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  203. <documentation>
  204. Specifies whether this dependency is optional (defaults to false). An optional dependency will not
  205. cause the module to fail to load if not found; however if the module is added later, it will not be
  206. retroactively linked into this module's dependency list.
  207. </documentation>
  208. </annotation>
  209. </xsd:attribute>
  210. </xsd:complexType>
  211. <xsd:simpleType name="serviceDispositionType">
  212. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  213. <documentation>
  214. The requested behavior for service handling on a dependency.
  215. </documentation>
  216. </annotation>
  217. <xsd:restriction base="xsd:string">
  218. <xsd:enumeration value="none">
  219. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  220. <documentation>
  221. Do not import or export services from this dependency.
  222. </documentation>
  223. </annotation>
  224. </xsd:enumeration>
  225. <xsd:enumeration value="import">
  226. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  227. <documentation>
  228. Import, but do not re-export, services from this dependency.
  229. </documentation>
  230. </annotation>
  231. </xsd:enumeration>
  232. <xsd:enumeration value="export">
  233. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  234. <documentation>
  235. Import and re-export services found in this dependency.
  236. </documentation>
  237. </annotation>
  238. </xsd:enumeration>
  239. </xsd:restriction>
  240. </xsd:simpleType>
  241. <xsd:complexType name="classNameType">
  242. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  243. <documentation>
  244. A class name.
  245. </documentation>
  246. </annotation>
  247. <xsd:attribute name="name" type="xsd:string" use="required">
  248. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  249. <documentation>
  250. The class name.
  251. </documentation>
  252. </annotation>
  253. </xsd:attribute>
  254. </xsd:complexType>
  255. <xsd:complexType name="pathType">
  256. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  257. <documentation>
  258. A filesystem path name.
  259. </documentation>
  260. </annotation>
  261. <xsd:attribute name="name" type="xsd:string" use="required">
  262. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  263. <documentation>
  264. The path name.
  265. </documentation>
  266. </annotation>
  267. </xsd:attribute>
  268. </xsd:complexType>
  269. <xsd:complexType name="resourcesType">
  270. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  271. <documentation>
  272. A list of zero or more resource roots for this deployment.
  273. </documentation>
  274. </annotation>
  275. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  276. <xsd:element name="resource-root" type="resourceType">
  277. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  278. <documentation>
  279. A resource root within this deployment.
  280. </documentation>
  281. </annotation>
  282. </xsd:element>
  283. </xsd:choice>
  284. </xsd:complexType>
  285. <xsd:complexType name="resourceType">
  286. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  287. <documentation>
  288. A resource root within a deployment.
  289. </documentation>
  290. </annotation>
  291. <xsd:all>
  292. <xsd:element name="filter" type="filterType" minOccurs="0">
  293. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  294. <documentation>
  295. A path filter specification for this resource root (optional). By default all paths are accepted.
  296. </documentation>
  297. </annotation>
  298. </xsd:element>
  299. </xsd:all>
  300. <xsd:attribute name="name" type="xsd:string" use="optional">
  301. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  302. <documentation>
  303. The name of this resource root (optional). If not specified, defaults to the value of the path
  304. attribute.
  305. </documentation>
  306. </annotation>
  307. </xsd:attribute>
  308. <xsd:attribute name="path" type="xsd:string" use="required">
  309. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  310. <documentation>
  311. The path of this resource root, relative to the path in which the module.xml file is found.
  312. </documentation>
  313. </annotation>
  314. </xsd:attribute>
  315. </xsd:complexType>
  316. <xsd:complexType name="filterType">
  317. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  318. <documentation>
  319. A filter specification, consisting of zero or more filter items.
  320. </documentation>
  321. </annotation>
  322. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  323. <xsd:element name="include" type="pathSpecType" minOccurs="0">
  324. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  325. <documentation>
  326. A path to include. The path value can be a path name or a "glob" which may include the special
  327. wildcards "*", "**", and "?".
  328. </documentation>
  329. </annotation>
  330. </xsd:element>
  331. <xsd:element name="exclude" type="pathSpecType" minOccurs="0">
  332. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  333. <documentation>
  334. A path to exclude. The path value can be a path name or a "glob" which may include the special
  335. wildcards "*", "**", and "?".
  336. </documentation>
  337. </annotation>
  338. </xsd:element>
  339. <xsd:element name="include-set" type="pathSetType" minOccurs="0">
  340. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  341. <documentation>
  342. A set of literal path names to include. Wildcards are not supported.
  343. </documentation>
  344. </annotation>
  345. </xsd:element>
  346. <xsd:element name="exclude-set" type="pathSetType" minOccurs="0">
  347. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  348. <documentation>
  349. A set of literal path names to exclude. Wildcards are not supported.
  350. </documentation>
  351. </annotation>
  352. </xsd:element>
  353. </xsd:choice>
  354. </xsd:complexType>
  355. <xsd:complexType name="pathSpecType">
  356. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  357. <documentation>
  358. A path specification type, which may include wildcards.
  359. </documentation>
  360. </annotation>
  361. <xsd:attribute name="path" type="xsd:string" use="required">
  362. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  363. <documentation>
  364. The path name, which can be a literal path name or it may include the special wildcards "*", "**",
  365. and "?".
  366. </documentation>
  367. </annotation>
  368. </xsd:attribute>
  369. </xsd:complexType>
  370. <xsd:complexType name="pathSetType">
  371. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  372. <documentation>
  373. A set of literal path names which can be used for efficient matching against multiple possible values.
  374. </documentation>
  375. </annotation>
  376. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  377. <xsd:element name="path" type="pathType" minOccurs="0">
  378. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  379. <documentation>
  380. The path name to include in the set.
  381. </documentation>
  382. </annotation>
  383. </xsd:element>
  384. </xsd:choice>
  385. </xsd:complexType>
  386. <xsd:complexType name="configurationType">
  387. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  388. <documentation>
  389. A configuration for the default module loader.
  390. </documentation>
  391. </annotation>
  392. <xsd:choice minOccurs="1" maxOccurs="unbounded">
  393. <xsd:element name="loader" type="loaderType">
  394. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  395. <documentation>
  396. A defined loader. More than one loader may be defined.
  397. </documentation>
  398. </annotation>
  399. </xsd:element>
  400. </xsd:choice>
  401. <xsd:attribute name="default-loader" type="loaderNameType" use="required">
  402. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  403. <documentation>
  404. The loader to use. The name matches the value of the "name" attribute of one of the defined loaders.
  405. </documentation>
  406. </annotation>
  407. </xsd:attribute>
  408. </xsd:complexType>
  409. <xsd:complexType name="loaderType">
  410. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  411. <xsd:element name="module-path" type="pathType">
  412. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  413. <documentation>
  414. A module root path for this loader. Paths are relative to ${user.dir} by default.
  415. </documentation>
  416. </annotation>
  417. </xsd:element>
  418. <xsd:element name="import" type="xsd:string">
  419. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  420. <documentation>
  421. Specifies another loader whose content should be imported. Such loaders are visible to modules
  422. defined by this loader, but not to modules defined in other loaders.
  423. </documentation>
  424. </annotation>
  425. </xsd:element>
  426. </xsd:choice>
  427. <xsd:attribute name="name" type="loaderNameType" use="required">
  428. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  429. <documentation>
  430. The name of this particular module loader.
  431. </documentation>
  432. </annotation>
  433. </xsd:attribute>
  434. </xsd:complexType>
  435. <xsd:simpleType name="loaderNameType">
  436. <annotation xmlns="http://www.w3.org/2001/XMLSchema">
  437. <documentation>
  438. A loader type name, which may consist of letters, numbers, hyphens, and underscores.
  439. </documentation>
  440. </annotation>
  441. <xsd:restriction base="xsd:token">
  442. <xsd:pattern value="[-0-9a-zA-Z_]+"/>
  443. </xsd:restriction>
  444. </xsd:simpleType>
  445. </xsd:schema>