Buddhism and Jainism
Buddhism and Jainism are two  Indian religions that developed in Magadha (Bihar) and continue to thrive in the modern age. Gautama Buddha and Mahavira are generally accepted as contemporaries. Jainism and Buddhism share many features, terminology and ethical principles, but emphasize them differently. Both are śramaṇa ascetic traditions that believe it is possible to attain liberation from the cycle of rebirths and deaths (samsara) through spiritual and ethical disciplines. They differ in some core doctrines such as those on asceticism, Middle Way versus Anekantavada, and self versus not-self (jiva, atta, anatta). History
Jainism is an ancient religion whose own historiography centres on its 24 guides or Tirthankaras. Of the 24, the last two tirthankaras – are generally accepted as historical persons, with the 23rd Tirthankara pre-dating the Buddha and the Mahavira by probably some 250 years. Buddhists believe Gautama Buddha, the historical buddha, rediscovered the long forgotten dharma around the 5th century BCE, and began to teach it again. In Buddhism there were previous buddhas, too, 24 in total as described in the Buddhavamsa, the 14th book of the Khuddaka Nikāya. Buddhists also believe that Gautama Buddha had many previous rebirths as described in the Jataka Tales. Buddhist scriptures record that during Prince Siddhartha's ascetic life (before attaining enlightenment) he undertook many fasts, penances and austerities, the descriptions of which are elsewhere found only in the Jain tradition. In the Majjhima Nikaya, the Buddha shares his experience:

The Jain text of Kalpasutra confirms Mahavira's asceticism, whose life is a source of guidance on many of the ascetic practices in Jainism. Such asceticism has been a hallmark of mendicant life in Jainism. The Buddha tried it, but abandoned what he called the "extreme ascetic methods", teaching the Middle Way instead. Jainism in Buddhist Texts

Pāli Canon
The Pāli Canon does not record that Mahavira and Gautama Buddha ever met, though instances of Mahavira's disciples questioning Gautama Buddha are to be found in various sutras. For instance, in the Majjhima Nikāya (MN 56), Upāli —one of Gautama Buddha's foremost disciples— is said to have been a disciple of the Mahavira who became a disciple of the Buddha after losing a debate with him. The Buddhists have always maintained that by the time the Buddha and Mahavira were alive, Jainism was already an entrenched faith and culture in the region. According to the Pāli Canon, Gautama was aware of Mahavira's existence as well as the communities of Jain monastics

Buddhist texts refer to the Mahavira as Nigaṇṭha Jñātaputta. Nigaṇṭha means "without knot, tie, or string" and Jñātaputta (son of Natas), referred to his clan of origin Jñāta or Naya (Prakrit). The five vows (non-violence, truth, non-attachment, non-thieving, celibacy/chastity) propounded by the 23rd Jain Tirthankara, Pārśva (877–777 BCE), may have been the template for the Five Precepts of Buddhism. Additionally, the Buddhist Aṅguttaranikāya scripture quotes the independent philosopher Purana Kassapa, a sixth-century BCE founder of a now-extinct order, as listing the "Nirgranthas" as one of the six major classifications of humanity. Buddhist writings reflect that Jains had followers by the time the Buddha lived. Suggesting close correlations between the teachings of the Jains and the Buddha, the Majjhima Nikaya relates dialogues between the Buddha and several members of the "Nirgrantha community". Indian Buddhist tradition categorized all non-Buddhist schools of thought as pāsaṇḍa "heresy" (pasanda means to throw a noose or pasha—stemming from the doctrine that schools labelled as Pasanda foster views perceived as wrong because they are seen as having a tendency towards binding and ensnaring rather than freeing the mind). The difference between the schools of thought are outlined. Divyavadana

The ancient text Divyavadana (Ashokavadana is one of its sections)  mention that in one instance, a non-Buddhist in Pundravardhana drew a picture showing the Buddha bowing at the feet of Mahavira. On complaint from a Buddhist devotee, Ashoka, the Maurya Emperor, issued an order to arrest him, and subsequently, another order to kill all the Ājīvikas in Pundravardhana. Around 18,000 Ājīvikas were executed as a result of this order. Sometime later, another ascetic in Pataliputra drew a similar picture. Ashoka burnt him and his entire family alive in their house. He also announced an award of one dinara (silver coin) to anyone who brought him the head of a Jain. According to Ashokavadana, as a result of this order, his own brother, Vitashoka,  was mistaken for a heretic and killed by a cowherd. Their ministers advised that "this is an example of the suffering that is being inflicted even on those who are free from desire"  and that he "should guarantee the security of all beings". After this, Ashoka stopped giving orders for executions. According to K. T. S. Sarao and Benimadhab Barua, stories of persecutions of rival sects by Ashoka appear to be a clear fabrication arising out of sectarian propaganda. Buddhist Texts in Jain Libraries

According to Padmanabh Jaini, Vasudhara Dharani, a Buddhist work was among the Jainas of Gujarat in 1960s, and a manuscript was copied in 1638 CE. The Dharani was recited by non-Jain Brahmin priests in private Jain homes. Shared terminology

The shared terms include Sangha, Shramana (monk), Shravaka (Householder in Jainism, Buddha's disciple in Buddhism), Jina (Tirthankara in Jainism, Buddha in Buddhism), Chaitya, Stupa, Pudgala (Matter in Jainism, soul in Buddhism) etc. Early Jainism used stupas, although the practice mostly (but not completely) was abandoned later. Similarities 

In Jainism, the way of liberation is the ford (tirtha), and Tirthankaras "those making the ford" (from samsara to moksha) are supreme teachers. The same concept is found in Buddhism, which says that through enlightenment (bodhi) an individual crosses the river of samsara to attain liberation. Both religions deny the existence of a creator god. Buddhism and Jainism evince a shared belief in the existence of geographical regions beyond the parameters of Bharatavarsha, access to which could not be gained by ordinary human beings. Karakandu, a Pratyekabuddha in both Jainism and Buddhism, is a rare personality that is shared between Jainism and Buddhism. The Jain text Isibhasiyam mentions Vajjiyaputra, Mahakashyap and Sariputra among the rishis. The Jain community (or Jain sangha) consists of monastics, munis (male ascetics) and aryikas (female ascetics) and householders, śhrāvaks (laymen) and śrāvakīs (laywomen). Buddhism has a similar organization: the community consists of renunciate bhikkhus and bhikkhunis and male and female laypersons, or śrāvakas and śrāvikas, who take limited vows. Jain and Buddhist iconography can be similar. In north India, the sitting Jain and Buddhist images are in padmasana, whereas in South India both Jain and Buddhist images are in ardha-padmasana (also termed virasana in Sri Lanka). However the Jain images are always samadhi mudra, whereas the Buddha images can also be in bhumi-sparsha, dharam-chakra-pravartana and other mudras. The standing Jain images are always in khadgasana or kayotsarga asana. Differences

Jainism has refined the non-violence ('Ahimsa) doctrine to an extraordinary degree where it is an integral part of the Jain culture. Jain vegetarianism, for example, is driven by the principle of not harming any animals and both lay and mendicants are predominantly vegetarian. In Buddhism, Mahayana monks in China, Japan (see Shojin-ryori), Korea and Vietnam are vegetarian; however, vegetarianism is not required for lay Buddhists. In Theravada monastic tradition, a monk should eat whatever is placed in his bowl when receiving food. Although both Buddhists and Jain had orders of nuns, Buddhist Pali texts record the Buddha saying that a woman has the ability to obtain nirvana in the dharma and Vinaya. According to Digambara Jains, women are capable of spiritual progress but must be reborn as a man in order to attain final spiritual liberation, this being due to the fact that Jain nuns cannot be nude and so still have some attachments. The religious texts of the Śvētāmbaras mention that liberation is attainable by both men and women. Jains believe in the existence of an eternal Jiva (soul), whereas Buddhism denies the concept of self (jiva) or soul (atman), proposing the concept of no-self (anatta) instead. The Anekantavada doctrine is another key difference between Jainism and Buddhism. The Buddha taught the Middle Way, rejecting extremes of the answer "it is" or "it is not" to metaphysical questions. The Mahavira, in contrast, accepted both "it is" and "it is not", with "perhaps" qualification and with reconciliation. Jainism discourages monks and nuns from staying in one place for long, except for 4 months in the rainy season (chaturmas). Thus, most Jain monks and nuns keep wandering, staying in a place for only a few days. Some Theravada Buddhist monks also observe vassa rules, but often they stay in one monastery. 