[ 
https://issues.apache.org/jira/browse/S4-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13591776#comment-13591776
 ] 

Matthieu Morel commented on S4-66:
----------------------------------

Thanks for pointing this out Aimee. 

Actually we should get rid of the getAppClassName method in the gradle build, 
since its implementation is too weak (see the TODO). I forgot to remove the 
method apparently!

If we want to check the existence of the app class, a better option would be to 
simply do use the class name passed as a required parameter, and try to resolve 
it with a Class.forName() in the gradle script. If that fails, fail the build. 
I'm not exactly sure how to achieve this in gradle however, maybe you have an 
idea?
                
> S4R packaging: improve app class resolution
> -------------------------------------------
>
>                 Key: S4-66
>                 URL: https://issues.apache.org/jira/browse/S4-66
>             Project: Apache S4
>          Issue Type: Improvement
>    Affects Versions: 0.5.0
>            Reporter: Matthieu Morel
>            Assignee: Matthieu Morel
>             Fix For: 0.6
>
>         Attachments: 
> 0001-check-whether-defined-app-class-exists-and-extends-A.patch
>
>
> Currently, when creating an S4R package, the app name added to the manifest 
> is extracted from the source code through a very brittle process ( see line 
> 152 
> https://git-wip-us.apache.org/repos/asf?p=incubator-s4.git;a=blob;f=subprojects/s4-tools/src/main/resources/templates/build.gradle;h=a1e50e330c4de47928af38a57da17b050c0c62b5;hb=049a6b00b285039f36c2276079bfc2d037ca856b#l152
>  )
> We should either use a proper Java class to extract that name, or require the 
> name of the app class to be passed as a parameter

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

Reply via email to