Business-to-business exchange provider FreeMarkets on Thursday said it is purchasing Adexa, a maker of collaborative e-commerce software, for approximately $340 million. Under the terms of the agreement, FreeMarkets will issue a total of 17.25 million shares and options in exchange for all of the outstanding stock of Adexa. The stock swap has been approved by the executive boards of both companies, but is still subject to stockholder and government approval, FreeMarkets said in a statement. Word of the deal comes on the same day that FreeMarkets announced the election of software industry veteran Ray Lane to its board of directors. Lane is a general partner of Kleiner Perkins Caufield & Byers, a venture capital firm, and the former president and chief operating officer of software heavyweight Oracle. He recently joined the board of directors of business-to-business software maker Asera.