  Current-phase relation in a Josephson junction formed by putting two s-wave
superconductors on the same edge of a two dimensional topological insulator is
investigated. We consider the case that the junction length is finite and
magnetic impurity exists. The similarity and difference with conventional
Josephson junction is discussed. The current is calculated in the semiconductor
picture. Both the $2\pi$- and $4\pi$-period current-phase relations
($I_{2\pi}(\phi), I_{4\pi}(\phi)$) are studied. There is a sharp jump at
$\phi=\pi$ and $\phi=2\pi$ for $I_{2\pi}$ and $I_{4\pi}$ respectively in the
clean junction. For $I_{2\pi}$, the sharp jump is robust against impurity
strength and distribution. However for $I_{4\pi}$, the impurity makes the jump
at $\phi=2\pi$ smooth. The critical (maximum) current of $I_{2\pi}$ is given
and we find it will be increased by asymmetrical distribution of impurity.
