Posted by rnaufal on 22nd August 2011
Some months ago I was noting the behavior of the Maven Eclipse plugin during the eclipse:eclipse goal.
I realized that its default behavior is to build the dependencies based on the Eclipse projects instead of the installed packages on the repository. During development time, it’s the behavior we need, but if you want to build the Eclipse files using the packages on the repository, you have to use the following command:
mvn eclipse:eclipse -Declipse.useProjectReferences=false
By default, the useProjectReferences flag is set to true, in other words, the plugin will create and reference the projects in Eclipse. Without it you’ll have to use mvn install to make changes available for dependent projects. Very interesting to note.
Update *: After creating the project dependencies, you have to execute mvn install to make it available for mvn eclipse:eclipse on dependent projects for the first time.
Tags: classpath, eclipse, goal, maven, plugin, project
Posted in Uncategorized | No Comments »
Posted by rnaufal on 9th May 2010
My friend Bruno sent me an interesting tip on how to create a Log4J template at Eclipse. Just follow these steps:
- Go to Window > Preferences > Java > Editor > Templates
- Click New
- Write the string logger at the field Name (this name will be used to call the template)
- At the field Pattern, write the following:
private static final Logger LOGGER = Logger.getLogger(${enclosing_type}.class);
- Click OK
The variable ${enclosing_type} refers to the enclosing type name. When you are ready, write down logger on the field class declaration to have a logger added to the class.
Tags: eclipse, java, log4j, logger, templates
Posted in Uncategorized | No Comments »
Posted by rnaufal on 13th November 2009
I’ve just updated to the new Ubuntu Karmic 9.10 and I’ve found some weird problems running Eclipse. Some buttons didn’t work when they were clicked, but the keyboard shortcuts worked well. It looks like in Eclipse 3.6 the bug will be solved. It looks like it’s a hack between Eclipse SWT and GTK. More information here, here and here.
To fix the problem, just launch Eclipse through this shell script file, assuming Eclipse is installed at /home/rnaufal/eclipse/eclipse:
#!/bin/sh
export GDK_NATIVE_WINDOWS=1
/home/rnaufal/eclipse/eclipse
Tags: buttons, eclipse, gtk, Karmic, koala, swt, Ubuntu9.10
Posted in Uncategorized | 6 Comments »