He didn't attack. He was defending his work against attacks by those who said it was contrary to scripture. In defending his work, he said that if scripture appears to be in conflict with what we clearly see, then we must be reading it wrong. That, no doubt, offended the Church, but the telescope existed, and the evidence of the solar system existed, and Galileo was was doing the Church a favor by offering them a way out of an embarrassing situation. Eventually, the Church adopted Galileo's position. But it took them over three centuries.
Right or not, he was not a theologian, and that is what got him in trouble--with Protestants and Catholics alike.
I didn't know he was in trouble with Protestants.
Again, Copernicus came up with the heliocentric model, and received accolades from the Church...
As CarolinaGuitarman points out, Copernicus withheld publication of that work until after his death. Intentionally. He understood the times in which he lived.
1) He did attack--he made enemies in doing so. That is a historical fact. He had enemies, largely due to his ticking off scientists and theologians alike by telling them all, definitively, without doubt, they were wrong (though he could NOT *prove* it definitively, without doubt). It makes sense to us because we are 400 years removed from the issue. He was flouting nearly 1500 years of accepted scientific and religious dogma, in a very condescending way (his "defense" of geocentrism is a joke--Simplicius, the "defender" is made a fool in the work).
2) There are Protestants today who insis the world is 6,000 years old. You really think that 500 years ago they would have appreciated what was said by a Catholic who was trying to destroy their biblical understanding of the Universe? Martin Luther denounced the ideas personally.
3) It was no secret what Copernicus thought. He never taught it as fact. His reputation is important as it shows that the Church wasn't an enemy of progress as is often argued--he was welcomed as an astronomer. His hesitation in publication can also be attributed to the fact that it was a MAJOR theory with NO concrete proof...
This guy provides a pretty balanced view of the matter:
http://www.christianitytoday.com/ct/2003/105/21.0.html