[shrinkwrap-issues] [JBoss JIRA] (SHRINKDESC-130) Provide a way to validate an imported or created descriptor content

Ralf Battenfeld (JIRA) jira-events at lists.jboss.org
Thu Nov 22 07:47:21 EST 2012


    [ https://issues.jboss.org/browse/SHRINKDESC-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736360#comment-12736360 ] 

Ralf Battenfeld commented on SHRINKDESC-130:
--------------------------------------------

I finalized the validation feature. It is now integrated into the descriptors. 

Here are some details:

1) The path element in the metadata-plugin is enhanced with the element 
   <pathToResources> ... </pathToResources>. If present, then

   a) the specified schema(s) will be copied into the impl package under META-INF/xsd
   b) The XSLT transformation creates a method validate() which takes the current
      definition and validates it against the schema (top level).

2) If not present, then no validation() method is created and no schemas are copied

3) The package schema-validator has no more a dependency to the gen package.
   It can be used stand-alone without the descriptors. The implementation is based
   on getting the schemas from the class path via getResourceAsStream(). There are
   default search locations: META-INF/xsd, xsd, . , but it is possible to add other locations.

I changed the test cases XmlValidationTestCase in order to speed up the validation. Just
the validation takes only few milliseconds on my machine.

Let me know what you think.

Regards,
Ralf
                
> Provide a way to validate an imported or created descriptor content
> -------------------------------------------------------------------
>
>                 Key: SHRINKDESC-130
>                 URL: https://issues.jboss.org/browse/SHRINKDESC-130
>             Project: ShrinkWrap Descriptors
>          Issue Type: Feature Request
>            Reporter: Ralf Battenfeld
>            Assignee: Ralf Battenfeld
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the shrinkwrap-issues mailing list