How to create a WebLogic DataSource using WLST and running it through Apache Maven

In this article, I will show you how to create a WebLogic DataSource.

You will need two files to do this. In my case, I named them:
  • createDatasource.properties
  • createDatasource.py
The properties file contains weblogic domain related information, while the python/wslt file contains the necessary WLST commands the create the datasource.

Finally, to execute the script through Maven run: mvn com.oracle.weblogic:weblogic-maven-plugin:wlst-client -DfileName=createDatasource.py

Alternatively, you can run the script through wlst.sh in your domain home: $ORACLE_HOME/oracle_common/common/bin/wlst.sh createDatasource.py

The full code is committed here.


Comments