Home

Maven 2 integration for JDEE

jde-mvn is no longer maintained, as I no longer use JDEE. Feel free to pick up the project, if you wish.

For another take on Maven-Emacs-Java, see malabar-mode.

What is this?

You are looking at a JDEE plugin that allows integration with Maven 2.

jde-mvn is released under an MIT-like license; please read it before going further.

Oh, and by the way: I develop and use this under Emacs 23 (a.k.a. CVS Emacs). It may or may not work under earlier versions (although if you're still on Emacs 20 you will most likely be in trouble); if it doesn't work on your Emacs, please raise an issue.

Is there a released version?

Not yet. I'd like to resolve #9 and #19 first.

How do I build it?

First, grab the source:

hg clone http://bitbucket.org/espenhw/jde-mvn/

Then build it:

mvn package

Right, I've built it, now what?

The Maven invocation above will have produced a file jde-mvn-${version}-dist.zip in the target subdirectory. Unzip this in your JDEE plugins directory (to find this directory, examine the value of jde-plugins-directory in your running Emacs.

After that, either restart Emacs or M-x jde-pi-load-plugins. If all went well, you should now have a JDEpi menu with a JDE-mvn entry on it (if you have menus enabled; if not, you should be competent to figure out whether it succeeded without me holding your hand).

So how do I use it?

I tend to have a single prj.el located in the parent directory of my sources. This file looks like this:

(jde-project-file-version "1.0")

(jde-set-variables
 '(jde-build-function (quote (jde-mvn-build)))
 '(jde-compile-option-command-line-args
   (quote ("-Xlint:all" "-Xlint:-serial"))))

(with-pom ()
  (jde-mvn-set-jde-variables :include-dependency-sources))

;; Map C-c C-v C-t to run current test
(define-key jde-mode-map [remap jde-jdb-menu-debug-applet]
  'jde-mvn-build-run-test)

How about manipulating the POM?

You have two options:

  • If you use Nexus as your repository manager, set jde-mvn-nexus-url appropriately and use M-x jde-mvn-nexus-add-dependency (also available from the menu)
  • If you don't (why not?), M-x jde-mvn-pom-add-dependency will completing-read artifact coordinates from your local repository (at the cost of a monstrous startup time)

What can I tweak?

Not very much. M-x customize-group jde-mvn gets you the current list.

How can I help?

Use the thing! And if you do use it, I would appreciate it if you drop me a line; definitely do so if you find a bug or have an idea for an improvement.

Also check out the open issues; if you can contribute in any way, feel free to fork, code and lodge a pull request. That's what open source is all about!

Updated

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.