Inspired partially by the question regarding whether an army made entirely of spearmen would be effective, and partially by the battle of Agincourt, I am wondering whether an army made up entirely or mostly of bowmen could be effective.
My setting for this question is as follows. Nation has very little access to mass amounts of metal for armor or large bladed weapons, but all kinds of wood, string, feathers for fletching, etc. Also, this country for insert reason, there are many realistic possibilities can't have a large standing army. Therefore, it defends itself by requiring all male citizens between the ages of 15-45 to maintain a bow and arrows, practicing weekly both as an individual for accuracy, and with a squad (known as a "flight") for discipline and speed in a mass firing, "blot out the sun" situation. Because of the fact that they have relied on the bow for such a long time, they have essentially perfected the art of bow and arrow-making, and have long-ranged, extremely powerful bows as well as access to any type of armor-piercing arrowhead you'd like, such as a bodkin.
Would an army, in any ancient up through late medieval period, made entirely of highly skilled, well-equipped, yet unarmored and unsupported bowmen have a chance against a well organized enemy army?
Additional, potentially pertinent information. They have seasoned commanders, who understand how to use terrain and formations to their advantage. Any battle they fight will be defensive, and their borders are well-protected by either walls or swamps. Enemy forces will likely be smaller most/all of the time. Arrow supply isn't an issue, since they rely entirely on the bow, they have arrow reserves that are essentially infinite. Additionally, since every male citizen is required by law to be available for active service at 15, and starts training even younger, the learning curve for mastering the longbow isn't an issue either. However, again, if the enemy makes it to their line, their melee ability is pretty much zero.
Bonus points if you can advise on what type of bow they should use, whether a standard longbow or something more like a composite bow would be better, as well as what type or types of arrows.