I've been breaking my head for a while and couldn't figure this one out. Tried alternative methods but couldn't make it. I believe it's a bug in osmosis-areafilter.
There is no issue tracker in the GitHub repository and the provided link for reporting bugs requires username/password (https://trac.openstreetmap.org/query?status=!closed&component=osmosis).
To the issue:
within my Java project, I tried to run the command:
Osmosis.run(new String[] {"--xml-read", "data/map.osm", "--bounding-polygon", "data/bounds.poly", "--xml-write", "data/map_cut.osm"});
It crashed and the error message included: "polygon.txt not found", which is the default call of the --bounding-polygon function.
Renaming my bounds.poly to polygon.txt and putting it in the main project folder was a successful but hopefully temporary workaround.
I was expecting someone here could test it to confirm whether it's a bug and then raise the issue in OSM's closed tracker. If I'm wrong and it's not a bug, then I'd be happy to know what is wrong and be able to fix it.