Java DSL for object-oriented type-safe CSS styling

I am looking for something like this Java-CSS-Library, to implement server-generated CSS stylesheets backed by a type-safe object-oriented model of CSS classes and rule sets.

This is part of my ongoing quest for the perfect “pure Java” web development framework that would allow me to

  • Focus on my strongest area of expertise: Elegant Java code
  • Use refactorings and other advanced Java tooling in Eclipse or IntelliJ Community Edition
  • Ignore the HTML/HTTP vs JVM objects impedance mismatch as much as possible

Sharing IntelliJ project configuration (.idea, *.iml) in version control

Me and my team do exactly what Christof Schablins describes in this blog post and what the Jetbrains folks recommend here: We use IntelliJ IDEA and share *.iml files (modules) and most files in .idea directory (project config) in the Version Control System (in our case CVS), including shared ant configs, shared run configs for Tomcat 6 and JUnit tests, shared project specific code inspection profile, shared data source definitions, etc.

Overall it works great. But we noticed a few things:

  • Needed an IntelliJ Path variable TOMCAT_HOME because devs have Tomcat installed in different places
  • Dialog “Do you want to add workspace.xml to CVS” keeps popping up (despite an entry in .cvsignore file within the .idea directory)
  • If devs have different sets of IntelliJ plugins enabled, each plugin adds its default code inspection rules to the shared profile (even if the project does not use them, e.g. Ruby stuff in a pure Java project). So developers have to be cautious not to check in those changes (or accept the bloat they cause)

So my question is: Have you come across these or similar issues and did you solve them?