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

George Gastaldi (JIRA) issues at jboss.org
Mon Feb 24 15:37:48 EST 2014


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

George Gastaldi edited comment on SHRINKDESC-151 at 2/24/14 3:36 PM:
---------------------------------------------------------------------

Hey Ralf,
I've seen your work on it and it's excellent! Good job!
The only thing that I think it needs improvement is the target package for the common APIs. In your branch it is storing everything under {{org.jboss.shrinkwrap.descriptor.api.common}}. I believe it would be better if we could somehow split that into (Eg: the JPA descriptors): 

- org.jboss.shrinkwrap.descriptor.api.persistence.common
- org.jboss.shrinkwrap.descriptor.api.persistence20
- org.jboss.shrinkwrap.descriptor.api.persistence21

Same goes for other modules: 

- org.jboss.shrinkwrap.descriptor.api.<SPEC>.common
- org.jboss.shrinkwrap.descriptor.api.<SPEC><VERSION>


What do you think? Does it make sense? Is it possible now?
                
      was (Author: gastaldi):
    Hey Ralf,
I've seen your work on it and it's excellent! Good job!
The only thing that I think it needs improvement is the target package for the common APIs. In your branch it is storing everything under {{org.jboss.shrinkwrap.descriptor.api.common}}. I believe it would be better if we could somehow split that into (Eg: the JPA descriptors): 

- org.jboss.shrinkwrap.descriptor.api.persistence.common
- org.jboss.shrinkwrap.descriptor.api.persistence20
- org.jboss.shrinkwrap.descriptor.api.persistence21

Same goes for other modules: 

- org.jboss.shrinkwrap.descriptor.api.<SPEC>.common
- org.jboss.shrinkwrap.descriptor.api.<SPEC><VERSION>
What do you think? Does it make sense? Is it possible now?
                  
> 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