As you can see, it uses library for JDBC driver jar, which is specified with path to file. Obviously, this won't work if I try to deploy just EAR to Bluemix Liberty. That's why I am deploying whole server directory to make least number of changes. Yet even in this case I don't know how to properly configure JDBC driver library for data source so server picks it up. Please help.
In this example, I would put the mysql jar file in the server config directory wlp/usr/servers/defaultServer/mysql-connector-java-5.1.34-bin.jar
You can now cf push directly from the defaultServer dir
However, the liberty buildpack can automatically generate the server.xml datasource config for databases that you bind from the Bluemix catalog. For example, if I create and bind a SQLDB or ClearDB service to my Liberty application and name the service it "TradeDataSource", the buildpack will generate the config and add the right driver jar to the classpath automatically.