Quoting a comment to this question:
By a theorem of Serre, if $R$ is a commutative artinian ring, every projective module [over $R$] is free. (The theorem states that for any commutative noetherian ring $R$ and projective module $P$ [over $R$], if $\operatorname{rank}(P) > \dim(R)$, then there exists a projective [$R$-module] $Q$ with $\operatorname{rank}(Q)=\dim(R)$ such that $P\cong R^k \oplus Q$ where $k=\operatorname{rank}(P)−\dim(R)$.)
When $R$ is a PID, this is in Lang's Algebra (Section III.7), and when $R$ is local this is a famous theorem of Kaplansky. But in spite of a reasonable effort, I can't seem to find any other reference to this theorem of Serre. Does anyone know of one? Is there any other way to show that every projective module over an artinian ring is free?
Let $R$ be any commutative ring whose projective modules are all free, and let $e\notin \{0,1\}$ be an idempotent of $R$.
Then $eR$ and $(1-e)R$ are both projective, hence free of some rank 1 or more, and $eR\oplus(1-e)R=R$, so that we have $R^n\cong R$ as $R$ module for some natural number $n\geq 2$. This is absurd since commutative rings have IBN.
This shows that $R$ cannot have any nontrivial idempotents.
Since an Artinian ring without nontrivial idempotents is local, you can see now the dramatic failure of Artinian rings to have the "projective implies free" property, except in the "good" local case.