Now that is a tedious process and I thought that is something that could be automated. I spent a bit of time on the weekend putting together a script just for that. The script will go through all JAR files in a directory specified on the command line and will generate a list of unique <package-name> elements that can be used in weblogic.xml.
The script can be found on GitHub: ikromin/j2ee/weblogic_xml_cpgen/gencp.sh.
Here's a sample output of this script:
The actual usable output of this script is saved to a temporary file. The name of the file is displayed as the last message from the script before it exits.
Below is what a sample output file will look like: