[shrinkwrap-issues] [JBoss JIRA] (SHRINKDESC-151) Descriptors should generate a common parent for different spec versions

Ralf Battenfeld (JIRA) issues at jboss.org
Sat Feb 22 08:13:47 EST 2014


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

Ralf Battenfeld commented on SHRINKDESC-151:
--------------------------------------------

A first descriptor build providing common descriptors are here: https://github.com/rbattenfeld/descriptors/tree/SHRINKDESC-151

It would be great if you can check and see if that is what you expect.

It was a long journey in order to find all hidden issues. If something works for a descriptor A it does not mean that this works as well for a descriptor B. The long time was also caused by the fact that xslt doesn't allow to check if a common class is already generated. So, I had to introduce in the metadata parser a search functionality for such generated classes. Let me know what you think.

Here is a list of workable common descriptors:
- ConnectorCommonDescriptor (versions 1.5, 1.6, 1.7)
- PortletCommonDescriptor (2.0)
- ApplicationCommonDescriptor (5, 6, 7)
- PersistenceCommonDescriptor (1.0, 2.0, 2.1)
- OrmCommonDescriptor (1.0, 2.0, 2.1)
- EjbJarCommonDescriptor (3.0, 3.1, 3.2)
- WebFacelettaglibraryCommonDescriptor (2.0, 2.2)
- WebFacesConfigCommonDescriptor (2.0, 2.1, 2.2)
- WebFacesPartialResponseCommonDescriptor (2.0, 2.1, 2.2)
- WebAppCommonDescriptor (2.5, 3.0, 3.1)
- PermissionsCommonDescriptor (7.0)
- JobXMLCommonDescriptor (1.0)
- BatchXMLCommonDescriptor (1.0)
- ValidationMappingCommonDescriptor (1.1)
- ValidationConfigurationCommonDescriptor (1.1)

I am aware that one of the most important descriptors are not in this list, the beans descriptor. I will try to find a solution for this one. But later:-)

Once you are happy with this, I will try to squash my commits into one.

Forecast:-) After this JIRA is in 2.0.0.X I will and want to:
1. Get rid of the Child<T> stuff in the way I proposed some months ago. Details we can discuss.
2. Read-Only descriptors (SD-21)

In this order. I think, the read-only descriptors are easier to implement after the generics up(). is gone.

Let me know what you think.
Ralf 
                
> Descriptors should generate a common parent for different spec versions
> -----------------------------------------------------------------------
>
>                 Key: SHRINKDESC-151
>                 URL: https://issues.jboss.org/browse/SHRINKDESC-151
>             Project: ShrinkWrap Descriptors
>          Issue Type: Feature Request
>          Components: api-javaee
>            Reporter: George Gastaldi
>            Assignee: Ralf Battenfeld
>
> This affects only the JavaEE API. Some usecases manipulate descriptors regardless of the version it is currently on. The API could be abstracted to a common interface so that common element types to the supported complex types could be used.
> A sample is provided in https://github.com/forge/javaee-descriptors/. The IMPL remains untouched (as generated by the ShrinkWrap generator) and common types are refactored to a super interface: 
> Super Interface: https://github.com/forge/javaee-descriptors/blob/master/api/src/main/java/org/jboss/shrinkwrap/descriptor/api/webapp/WebAppCommonDescriptor.java
> Sub Interfaces: 
> https://github.com/forge/javaee-descriptors/blob/master/api/src/main/java/org/jboss/shrinkwrap/descriptor/api/webapp25/WebAppDescriptor.java
> https://github.com/forge/javaee-descriptors/blob/master/api/src/main/java/org/jboss/shrinkwrap/descriptor/api/webapp30/WebAppDescriptor.java
> https://github.com/forge/javaee-descriptors/blob/master/api/src/main/java/org/jboss/shrinkwrap/descriptor/api/webapp31/WebAppDescriptor.java
> The generated code doesn't need to change either. The existence of the super interface is what matters most.

--
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