Whoa! Did we just go through a 12-year time warp?
This is exactly what JavaBeans was intended to do, back in 1996-7.
It was intended to solve a technical challenge of pluggable, re-usable code, which would of course engender a vibrant and lucrative third-party marketplace of drop-in components. People would make,sell, buy, and consume these re-usable pieces of code.
Then, that fantasy was replicated when server-side Java grew in popularity. The idea behind numerous companies was that they'd act as brokers and commercial exchanges for re-usable pieces of code. The names of these companies escape me now. There were many.
Most of them faded, and some of them evolved their business model away from acting as an commercial exchange, and towards selling software directly. In particular, they moved toward selling the thing they had hoped to run their business on (their "ERP"), as a piece of software that enterprises could use internally - a component repository supporting re-use within an enterprise.
Darn! The names of the big companies that made this transition escape me now.
An interesting question is, why did App Store succeed (wildly!) while the vision for JavaBeans stores, or stores for enterprise Javva components, never caught on.
I have my theories but... not least among the reasons is the phenomenon of "open source" - where you can get pretty darn good re-usable components for free. Before you go tilting at this windmill, I suggest you study some industry history!