I have been battling groundhogs for a long, long time.
I found if you put anything in the hole like cat poo or ammonia or bleach - they just move over a few feet an dig a new hole. You have to get rid of the ground hog, then fill in the hole, then put something down to keep them from digging. We used two layers of the heavy plastic lattice bolted to the bottom of one of my buildings, let it go out 3 feet from the building and that has worked pretty well for several years.
For groundhogs, the only things I have ever caught them in a live trap with are canned corn and sliced apples. I've heard cabbage works too, but never tried it. I think it helps to leave a little bit of the bait food around the hole each morning for a couple days before you set the trap.
Only set the trap early in the morning and take it up at dusk. Otherwise, you'll get skunks, o'possums, raccoons and other night critters...
I've also caught one by positioning the trap over a hole I knew they were in and putting cement blocks all around it to keep it from moving (and on top!!). Then I started running the hose into the other hole and flooded him out into the trap.
I am in the country, and I have a small pole barn. It used to have a dirt floor, and I parked in it like a garage. Went out one day to go to work, and the truck was sitting on it's front axel. The groundhogs had undermined the floor so much, it gave way. Had to call a neighbor to pull the truck out. It was a mess to get that dirt all packed in. Then had it cemented with rebar and mesh, but the groundhogs still get under there. It is so bad again, that I no longer park in there because I am afraid of ruining the cement because the dirt is all undermined again. I have a guy who loves to hunt, and he has a blind set up, permanently, just so he can see 2 sides of my little barn - and still they get in there and make more and bigger holes. They have just about ruined a new dam I had made on my pond in 2005. I paid for 2 blinds down behind that dam for groundhog hunters. I lived here for several years without seeing any. Then, we started seeing and hearing coyotes. I think the groundhogs have now moved in close to the houses and buildings because it is safer away from the coyotes.
I have 3 garden cats that are 10 years old. Once I don't have them, I will probably use the method most farmers do around here. I am not sure what exactly it is, but I know they do it in the winter when the groundhogs are denned up and hibernating. They fill in all holes but one and put some sort of canister down the hole, then fill that one in.
My Ex used to bow hunt them for people in a nearby town. They had an old farmhouse and barn that the city grew around. They had a terrible time with groundhogs in the barn. They were so bad, it was an issue with the foundation of the building. He'd sit in the upstairs of their old barn in a lawn chair near what used to be the window/door they put the hay up into and wait for them to come out during the day. That actually works pretty well - direct shot down to the ground, so very safe, and no sound, quick kill if a skilled hunter.