You can run specific examples by invoking the exec:java goal. You must provide the exec.mainClass property (the name of the example class) and the exec.args property (the command-line arguments required by that specific example).
For example, to run the ObjectStorageGetBucketExample class, which requires three arguments—the compartment OCID, the bucket name, and the object name—use the following command:
mvn -am -pl bmc-other-examples/bmc-jersey3-examples exec:java \
-Dexec.mainClass=ObjectStorageGetBucketExample \
-Dexec.args="compartment_ocid bucket_name object_name"
To perform a clean build and run the example in a single step, use:
mvn clean compile -am -pl bmc-other-examples/bmc-jersey3-examples exec:java \
-Dexec.mainClass=ObjectStorageGetBucketExample \
-Dexec.args="compartment_ocid bucket_name object_name"
Note: Replace compartment_ocid, bucket_name, and object_name with your actual OCI resource values.