Hi folks,

About FORGE-2072.

The problem is:
We have this method: ErrorPageType getOrCreateErrorPage();
I’ll propose create a ErrorPageType getOrCreateErrorPage(String erroCode);

The getOrCreteErroPage only check if web.xml has an error-page. This case, if I want do that:

String errorLocation = getAccessStrategy().getWebPaths(web.getWebResource(ERROR_XHTML)).get(1);
servletConfig.getOrCreateErrorPage().errorCode("404").location(errorLocation);
servletConfig.getOrCreateErrorPage().errorCode("500").location(errorLocation);

The shrinkwrap only put an error-page. This case, only 404. :)

I fixed the FORGE-2072 with 2 methods because we need specify the WebAppDescriptor for servelet-api version, but this case erro-page is a common feature for two version of the api. No make sense sense to have two interface to this method.

Look this: https://github.com/danielsoro/core/blob/FORGE-2072/javaee/faces/src/main/java/org/jboss/forge/addon/scaffold/faces/FacesScaffoldProvider.java#L1044-L1062

I think better to have:
WebAppDescriptorCommons

WebAppDescriptor30 extends WebAppDescriptorCommons

WebAppDescritptor31 extends WebAppDescriptorCommons

I don’t think a valid idea create a descriptor in forge if we have the shrinkwrap for that.
IMHO.

If it is a good suggestion, please.. open an issue in shrinkwrap. :)

--
Daniel Cunha (soro)