How to set up a new Eclipse project in net.fnarg package

[sourcecode language=”bash”]
mvn -o archetype:generate -DartifactId=classes-objects -DgroupId=net.fnarg.javatut
[/sourcecode]

I accepted the archetype defaults offered by generate

[sourcecode language=”bash”]
cd classes-objects/
mvn -o eclipse:clean eclipse:eclipse
[/sourcecode]

Eclipse > New > Java Project
Use default location

Eclipse > Preferences > Java > Build Path > Classpath Variables
New > M2_REPO = $WORKSPACE/mvn/repo

Maven creates this structure.

src/main/java
  net/fnarg/javatut
    class-objects/*.java
src/test/java
  net/fnarg/javatut
    class-objects/*.java

This project has no dependencies other than JUnit.
Update the pom.xml JUnit is version 4.6

Eclipse > File > Import > File system

note in Eclipse on Mac using a minus like ‘this-that’ gives an error in the package name.

Telling Eclipse that a resources folder is a source folder

Bring up context menu on the resources folder
Build Path > Use as Source Folder

Although these are config files rather than Java code they need to treated as sources in order for Spring to find them. And Eclipse represent the folder as a nice block rather then nested folders.

Squeaky Drawers

My children don’t have the patience to battle with a chest of drawers. They just pull harder until the drawers break. I solved this by putting shoe polish on the wooden runners. The drawers glide open and shut and now I can get on with the next thing on the DIY list. Hooray for shoe polish!

Getting a bit better at blogging

My written thoughts are scattered all over the place. Here are my user
stories:

As I blogger I want to
– keep ideas/thoughts in the cloud, i.e. distributed
– have a single process/store for Work, Family and Music
– continue to use Vim as the editor
– have the blog running on my own domain at fnarg.net

By blog I mean something that is text and written by me.
This diagram shows the activities that go into making a me blog.

blog activity diagram

*Putting it into practise*

So I found this plugin for Vim called Blogit that doesn’t quite fit all my use-cases but it does look good.
I tried to install Blogit:

http://www.lamolabs.org/blog/2083/managing-wordpress-posts-with-vim/
but the Mac Vim doesn’t come with Python.
Ok so I’ll use the Linux Vim but that has this bug:


Error detected while processing .vim/plugin/blogit.vim:
line 1781:
Traceback (most recent call last):
File "", line 9, in ?
ImportError: cannot import name CalledProcessError
Press ENTER or type command to continue

So I think I should upgrade Vim 7.0 to Vim 7.2

Download the Vim 7.2 source and now I have this other error. And like the poster to Vim support I have a term library ):


# locate libterm
/lib/libtermcap.so.2
/lib/libtermcap.so.2.0.8

So I went back to the use-case and started looking at the XMLRPC part.
This did the trick. She’s a good ‘ol Perl!

And now I’m going to try and use it for the first time. If you can read this
then it probably worked (:

Well it did, but the activity diagram got mangled, hmm ..

I still find WordPress a complete pain to use as an editor, but at least this helped.
http://en.support.wordpress.com/code/posting-source-code/