Archive

Posts Tagged ‘Eclipse’

JAutodoc

January 5, 2011 1 comment

Things on my project have quieted down a bit, so I’m trying to get done some of the nice touches that I don’t usually have time to do. Because my module is brand new, it’s completely doable to make the inline documentation really spiffy. I want to do all the stuff to make the Javadoc look just right.

One of those things is to do package javadoc. You used to do that with a package.html file, but as of Java 5 they want you to create a package-info.java file instead. You can read all about it at http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html

Because I use Eclipse, I figured there’d be some buried menu command to generate this stuff, but surprisingly there wasn’t. I did, however, find an Eclipse plugin called JAutodoc to do this for me.

Great! Except the plugin installation failed. The installation exception message mentioned a missing module, org.eclipse.team.cvs.ssh. Eclipse 3.6 Helios comes with the org.eclipse.team.cvs.ssh2 plugin, but for some reason they did not include org.eclipse.team.cvs.ssh.

I couldn’t find a site to download just that (54k) plugin jar file, but I did discover that Eclipse 3.5 Galileo did include it. So I moved that jar from my Galileo Eclipse installation to the Helios installation, retried the JAutodoc install, and everything works.

So if you want to be fussy about your Javadocs in Eclipse, check out JAutodoc, and if you have trouble installing it, this could be your solution!

Advertisements
Categories: code Tags: , ,

eclipse.ini

November 3, 2010 Leave a comment

Eclipse is great, but it takes a while to get started on my work laptop. I decided to search around to see what I could do to speed it up.

The first tip I found was to make sure you were running Eclipse under the most recent JDK. By default Eclipse uses the first JVM it finds in your path. The server components on this project require Java 5, not 6, so many developers have to configure their systems to allow Maven to use Java 5. They can still install Java 6 and use it with Eclipse with the following argument:

-vm "C:\Program Files\Java\jdk1.6.0_22\bin\javaw.exe"

You can either put that in the shortcut you use to start Eclipse, or you can put it in the Eclipse.ini file.

The second tip is to disable unnecessary plug-ins on startup. In Eclipse 3.6 (Helios) this is configurable in Preferences -> General -> Startup and Shutdown. I don’t think a lot of people use Mylyn, so that’s a feature to disable if you don’t.

The third tip is to customize the eclipse.ini file. I found this great post on StackOverflow that explains the best options for entries in eclipse.ini for any recent version of Eclipse you are using.

For an in-depth look at all the Eclipse runtime options, check out the Eclipse documentation.

Categories: code Tags:

Maven & Eclipse

October 29, 2010 Leave a comment

Our project here uses Maven 2 to manage the dependencies and builds. I really like developing code in Eclipse, and I wanted to set up my Eclipse workspace easily from the existing Maven configuration.

The Maven Eclipse plugin makes that easy. Just run the following command:

mvn eclipse:eclipse

and the plugin generates the Eclipse project files, ready to be imported into your Eclipse workspace.

Well, that’s great and all, but when I tried it I saw this error:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Request to merge when 'filtering' is not identical. Original=source src/test: output=target/test-classes, include=[**/*.java], exclude=[], test=true, filtering=false, merging with=resource src/test: output=target/test-classes, include=[*.properties|*.xml], exclude=[**/*.java], test=true, filtering=true
[INFO] ------------------------------------------------------------------------

A Google search led me to this answer:
http://stackoverflow.com/questions/1397903/setting-project-for-eclipse-using-maven

Basically the problem is that something changed in the latest version of the Maven Eclipse plugin that prevents this from working with our Maven configuration.

The solution is to use the 2.6 version of the plugin instead.

mvn org.apache.maven.plugins:maven-eclipse-plugin:2.6:eclipse

Categories: code Tags: ,