/** * {@inheritDoc} * * @see org.jboss.shrinkwrap.descriptor.api.DescriptorExporter#to(org.jboss.shrinkwrap.descriptor.api.Descriptor, * java.io.OutputStream) */ @Override public void to(final NodeDescriptor descriptor, final OutputStream output) throws DescriptorExportException, IllegalArgumentException { // Precondition checks if (descriptor == null) { throw new IllegalArgumentException("descriptor must be specified"); } if (output == null) { throw new IllegalArgumentException("stream must be specified"); } // Get the root node final Node root = descriptor.getRootNode(); // Delegate this.to(root, output); }
/** * {@inheritDoc} * * @see org.jboss.shrinkwrap.descriptor.api.DescriptorExporter#to(org.jboss.shrinkwrap.descriptor.api.Descriptor, * java.io.OutputStream) */ @Override public void to(final NodeDescriptor descriptor, final OutputStream output) throws DescriptorExportException, IllegalArgumentException { // Precondition checks if (descriptor == null) { throw new IllegalArgumentException("descriptor must be specified"); } if (output == null) { throw new IllegalArgumentException("stream must be specified"); } // Get the root node final Node root = descriptor.getRootNode(); // Delegate this.to(root, output); }
ServletFacet servlet = this.project.getFacet(ServletFacet.class); WebAppCommonDescriptor servletConfig = (WebAppCommonDescriptor) servlet.getConfig(); Node root = ((NodeDescriptor) servletConfig).getRootNode(); removeConflictingErrorPages(root);