This paper proposes a vehicle trajectory planning method for automated on-ramp merging. Trajectory planning tasks of an on-ramp merging vehicle and a mainline facilitating vehicle are formulated as two related optimal control problems. Rather than specifying the merge point via external computational procedures, the location and time that the onramp vehicle merges into the mainline are determined endogenously by the optimal control problem of the facilitating vehicle. Bounds on vehicle acceleration are explicitly considered. The Pontryagin Maximum Principle is applied to find the solutions of the optimal control problems. In order to accommodate the constantly changing external environment, the proposed optimal control method is subsequently implemented in a recursive planning framework. Because of the nature of the problem, the length of the planning horizon is timevarying, unlike conventional model predictive control applications where the planning horizon is of fixed length. Numerical experiments are conducted to study performances of the proposed methodology under the influence of different leading vehicle trajectories and with different lengths of the planning updating interval. In particular, an experiment involving a real-world leading vehicle trajectory and considering different traffic demand levels are presented. The proposed methodology performs well in these experiments and has demonstrated a good potential in real-time applications.