Movatterモバイル変換


[0]ホーム

URL:


Table of Contents

Configuring Geany for Maven Projects

Maven is a great lightweight IDE for small Java projects based on Maven. Once you make a few configurations it will help you do 80% of what a big IDE can do, but with only 20% of the cost.

To get the most out ofGeany, you want to:

Call tips and auto-completion

First you want to have autocompletion and call tips for most classes on the JDK. You do this by downloading and installing a suitable tags file. You can find them in theTag Files page.

Additionally, to create tags for project's files you can use theGProject plugin. Once enabled you will get a new tab labeledGProject inGeany's Project configuration window. Set the project file extension here (*.java) and tick the tag generation box. With this you gain auto-completion for your project's own code, even when not open.

Calling Maven

Finally you want to be able to call Maven fromGeany, and then capture error messages, so you can quickly go to the offending lines. You do this by configuring the project's build commands.

Go toGeany's Project configuration Window (Project >Properties), and then to theBuild tab. Here you can set theIndependent Commands section with the following values:

1. _Compile mvn compile %p
2. _Other targets mvn %p
3. _Test mvn test %p
4. _Package mvn package %p
Error Regular Expression\[ERROR\] ([^:\[]+):?\[([0-9]+)

With this setup you can invoke a Maven and compile your project withShift+F9, and run your unit tests withShift+F8. With the shortcutCtrl+Shift+F9 a pop-up window will allow you to specify other targets, such asclean ordeploy. Any error will appear in red in theCompiler window, and double-clicking on that line will bring the editor to the reported position.

Note that it is assumed that your POM file is located in the project's root directory. If it is not the case, modify the working directory column to suit. You can get more help on customizing the build options inGeany from the pageUser Guide to configuring the Build Menu.

,

Trace:Configuring Geany for Maven Projects

Navigation

Custom Configurations

Color Schemes

HowTos

Newsletter

Plugins

Snippets

Tags

About / Help

Print/export
Tools

[8]ページ先頭

©2009-2025 Movatter.jp