RV stuff isn't going to be marine grade, so it won't last outside very long with boats near or on the water. As long as you accept this you might be ok if you can accept this and only use the system on land. Otherwise, all your electrical connections will be subject to corrosion. But, to keep the battery charged up when the boat sits in a yard, you will be fine.
Your boat batteries like the RV ones are all DC power. So you need a solar panel, and a solar charge controller that wires up to the panel and the battery.
plug "20A Solar Charge Controller Solar Panel Battery Intelligent Regulator" into amazon and you get something pretty similar to what I've used. Most solar panels come with some kind of fancy electrical connector, so when you buy the panel, look up the connection type listed so you can get the right parts.