Category Archives: eclipse

Why Maven Drives Me Crazy

Step 1. Create a maven project with war packaging

Step 2. Run mvn eclipse:eclipse

Step 3. Open Eclipse. It’s not a dynamic web project.

Step 4. Yell.

Step 5. Look things up on Google.

Step 6. Try some of the things you find on Google.

Step 7. Yell some more.

Step 8. Create a dynamic web project and configure all your libraries by hand.

Step 9. Run web app on server within Eclipse.

Step 10. Go back to Ant and get things done.

I mean seriously, I can’t believe it’s this hard to take a web project and have the eclipse:eclipse task build out an Eclipse project (Eclipse 3.3) that will deploy into a Server instance to make it easier to run/debug.

I’m sure some people have it running but if it’s not relatively simple or documented more clearly or findable on Google within the first page or two then I’m sure I’m not the only one that has thrown up their arms with Maven and use within Eclipse.

On top of all that, just try learning this thing and using it with a Hibernate based project and having to go out and hunt down all the plug-ins you need to make your project do what you want it to do. Any project that makes me do this much hunting around to get it to do relatively simple things that I can do in Ant really quickly is just not going to succeed. The sad thing is that most of the initial impression problems are solvable but no one that is a Maven fan seems to be doing anything about it. Just take the ten or so most popular open source projects, throw a cookbook style doc out there that tells you how to quickly integrate the plug-ins for those projects and do common tasks and you’ll get people that will spend more time trying to use it. As of now, virtually none of the developers I know will use Maven.

(note:¬† I wrote this up about a month ago and just got around to publishing it so maybe it’s been fixed, maybe it hasn’t but I’m tired of trying to make it work for other reasons as well)

What Happened to SpringIDE.org?

When I try going to http://springide.org I get “Hier entsteht eine neue Internetpr√§senz” which translates via Google to “Here a new Internet operational readiness level develops”. I’m not 100% what that’s supposed to mean. Any ideas? I think it means the site is under construction. Maybe they’re changing hosting providers. I’m not sure. Anyways, I don’t see anything on the main Spring site, either, so it’s kind of confusing.

Update: Looks like they’ll be back up in a little while. They’re having hardware issues. The update site is still available. Just check out the site and it will direct you.

What a Crappy Blog Entry

Trying to stay in Tinou’s theme of crappy things I thought I’d talk about his entry, “Spring, what a crappy framework”. The main thing here is that the example points to bad design more than it does why Spring is a crappy framework (it’s not but even if it was). I could easily make that a good design as well and Spring has nothing to do with either approach. I have yet to see how Spring encourages bad design. Rather, it encourages it I believe. Tinou pointed this out as well with respect to encouraging the use of interface driven design. Maybe people are just trying to impose Spring where it’s not supposed to be used within his organization. Pushing a tool where it doesn’t belong is bad no matter how or where it happens. I don’t know, though. Some complain it encourages over complicated configuration. Maybe it’s better to have complicated configurations than it is to have that complication moved into code which tends to be complicated enough as it is.

Now, the configuration. Let’s face it, complex applications are going to have complex configurations. Over time you can simplify them or move towards a configuration through convention approach that Rails has been championed for but it’s always going to start out a little more verbose than it might need to be. In Spring 2.0 it moves forward with the use of XML Schema. Combining that with its support for “components” and you will start to see configurations get less complicated. It will also depend on how you manage your configuration files as well. I know that most people don’t think about this because when I ask people in interviews how they manage complex configurations I get blank stares. Almost every time. I generally tend to break my configurations in to multiple files based on functionality silos. Yes, there are a lot of files but if you know you need to find something about the query factory and/or library then you go to applicationContext.queries.xml and there it is (see, more convention!). Complexity is going to go somewhere and as long as you are consistent and follow your own conventions then its maneagable. I also use Spring BeanDoc to view my Spring configuration and how everything ties together. In addition you can also use the Eclipse Spring IDE (note — the site seems to be down right now) plug-in to help better manage your configuration.

Sometimes you just need to figure out where your problem really lies. It’s not always the tool. Tools can all be misused and most of the time the problem lies between your ears more than in your computer.

Transferring Eclipse Configurations

One of the pains of working with Eclipse RC releases is moving from one to another. I don’t like using downloaded plug-in packs such as WTP, Mylar, Spring IDE, TestNG, Subclipse, etc. because they get updated pretty frequently, especially to keep up with changes in the RC releases. But I also hated having to keep track of all the update site URLs that each of them has. Then, someone says, “Why don’t you just export your sites and then import them when you drop in a new Eclipse RC?” Doh! I have no idea why I missed that button before. Sometimes I just don’t look at the UI I’m using.