We consider trapped bosons with contact interactions as well as Coulomb repulsion or gravitational attraction in one spatial dimension. The exact ground state energy and wave function are identified in closed form together with a rich phase diagram, unveiled by Monte Carlo methods, with crossovers between different regimes. A trapped McGuire quantum soliton describes the attractive case. Weak repulsion results in an incompressible Laughlin-like fluid with flat density, well reproduced by a Gross-Pitaevskii equation with long-range interactions. Higher repulsion induces Friedel oscillation and the eventual formation of a Wigner crystal.