This might be Shin Hakkenden (1999).
Based on the long cherished, classic Japanese novel Nanso Satomi Hakkenden by Bakin Kyokutei Takizawa (1767), a modified version of it was made into animation.
Taking place in the future, during this time wars were occuring in heaven, mostly for possession between the eight moons created by the savior Fuse that surrounded God's land. When the war ended, there was only one ruling family - that of the Oowaris, and the remaining son gained control of all the moons of heaven, except for one. Meiten, the moon of the pope, where people refrained from war and were therefore out of its terms.
Eight people. Each from one of the eight moons. Each possessing one of the jewels - the elements that compose Earth. They are those who are destined to become saviors of humanity. All of them have sacrificed for these jewels, and are determined to complete their duty to Queen Fuse who entrusted these to them. When the mad emperor Kai threatens to revive a ghost who wants to prevent the restoration of Earth, these eight must battle using the powers given by their jewels in order to create Earth and defeat those who want to prevent it.
So they all go to Kusanagi, the ship in the center of God's land. They must gather the jewels in the key called Yatsufusa at Kusanagi's center, in order to create Earth.
There are eight main characters, each of whom possesses a jewel. The lead character, Kou Yagami, wields a sword with a jewel in it, and there's a talking dog, named Chuji, with a jewel on its left canine tooth. Jinrai has spiky hair, and Gyo seems pretty handy with munitions, so he could be the military guy you mentioned. There are two girls among the main cast, Noburu and Ruty. And there's a guy with a ponytail called Tomoka, whose jewel is in a large dice; he's also shown throwing playing cards in the last ten seconds of the video clip below.