There are 3 ways you get XP in Clan Wars.
1) Getting at least 1 star gives Clan XP based on the enemy player’s Clan War position:
Position / XP Gained
1-5 = 5 XP
6-14 = 4 XP
16-25 = 3XP
26-50 = 2 XP
2) Total Stars
Getting 40% of all possible stars gives 10 Clan XP
Getting 60% of all possible stars gives additional 25 Clan XP (35 XP total)
3) Winning war gives 50 clan XP.