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

Ralf Battenfeld (JIRA) issues at jboss.org
Thu Dec 26 12:35:32 EST 2013


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

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

Hi George and Lincoln

A first version providing a WebAppCommonDescriptor is implemented. It took me some days to find a suitable way between configuring and generating the needed changes.
Some details:
- Without changing the pom, the generated descriptors remain as it is now.
- There is new a <common> element per descriptor, which allows to define the common part of a descriptor.
- This includes the name and also all shared element types with the relevant details.
- I produces as a draft a WebAppCommonDescriptor, let me know for which other descriptors you need a common one.

Preview: If you want to have a look, here is my repo: https://github.com/rbattenfeld/descriptors/tree/SHRINKDESC-151

Let me know if this fulfills your requirements.
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