Israel has carried out a nearly two-month-long Gaza offensive in an effort to stop cross-border rocket fire and to press for the release of a captured Israeli soldier .