When a plaintiff is found to own a less share than is claimed in his complaint, he shall have partition of such share, but the defendant recovers costs. When found entitled to have partition of the share claimed, he recovers costs of the defendant. In such cases or on default, a judgment that partition be made shall be entered. In all other cases, including default of the defendant or defendants, when judgment for partition is given, the court, after notice to all parties in interest, may, in the discretion of the presiding justice, apportion the costs between the plaintiff and defendant or defendants or allow the plaintiff to recover costs of the proceedings against the defendant or defendants to be taxed the same as in a civil action, and execution may be issued therefor.
14 M.R.S. § 6508