Koray,
you've kind of answered your own question here, as you show there is an error when you deploy which is to do with " Flow " class not being available in Glassfish libraries. java.lang.NoSuchFieldError: FLOW at com.sun.faces.flow.FlowDiscoveryCDIExtension.(FlowDiscoveryCDIExtension.java:90).
Your not doing anything wrong there is just a version mismatch between your web app and glassfish. You show that by increasing the api version of your jsf from 2.1.19 to 2.2.0 , your deployment breaks. I don't have glassfish but if you look in its libraries you'll find that the com.sun.faces.flow.Flow is not present in the Glassfish version of this jsf-api library.
Do you need to us 2.2.0 of this library , if so you can try adding a provided scope (<scope>provided</scope>
) to the dependencies and see if glassfish will just use its own. I'm not sure this will work it depends on the class loaders of Glassfish.