Archive

Author Archive

Checkout maven project trunks from SVN

No Gravatar

Just a short bash script on how to check out only trunks of Maven projects (single and multi-module).

Note: This works only for default svn layout with default maven layout.

output=`svn ls -R | grep trunk/pom.xml`

for line in $output
do
  len=`expr ${#line} - 8`
  p=${line:0:$len}
  echo $p
  res=`svn up --parents $p`
done

Usage: check out the “root” of form the SVN with -N, like this:

svn co -N https://my.com/svn/myRoot

Go to the new directory (cd myRoot) and execute the script.

Share

openconnect: SSL wrote too few bytes!

No Gravatar

At the time of writing this openconnect in Ubuntu 12.10 have a bug, that disconnects the client from the VPN.

There is an issue for it: https://bugs.launchpad.net/ubuntu/+source/openconnect/+bug/1072328

And a solution from Michael R. Crusoe.

Just do:

sudo apt-add-repository ppa:misterc/ppa

sudo apt-get update

sudo apt-get upgrade

That’s it.

Share
Categories: linux, open source, oss, ubuntu Tags: , , ,

Openconnect replacement for Cisco AnyConnect on Linux (Ubuntu)

No Gravatar

Your company decided to use Cisco AnyConnect. You are on Linux, and you are provided with Cisco AnyConnect Linux client, and you are happy: At last, they had Linux in mind… But your happiness lasts only for a half an hour, when you realize, that the client just does not work. Or you might be lucky and the client work as expected, but in that case you wouldn’t be here… ;-)

But fear not, there is a better solution for your problem. And it is called Openconnect. What you will need:

  • Windows machine with configured AnyConnect — needed just to create an initial configuration; not needed for operation
  • any flavor of Linux, – but I’m using Ubuntu, so the there will be some Ubuntu specific parts, but you’ll know how to translate those to your flavor of Linux
  • about 1h
To set up just follow these steps… Read more…
Share

Using SCM from within your Mojo

No Gravatar

There is a guide on the topic from Maven. But that guide is missing an example on how to use it from within Mojo.

So let me show you a short example on a topic… Read more…

Share

How to find out if the given Maven project is a root of a multi-module execution?

No Gravatar

[Update:] Looks like the originator is Brian Fox from Sonatype with this article.

A short example on how to find out if the given maven execution is the root of execution, — or in other words: how to know if you are inside of a multi-module project module or in the parent?

Just extend your Maven Mojo from this abstract mojo and call isThisTheExecutionRoot()

import java.io.File;

import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;

public abstract class AbstractMojo extends AbstractMojo {

	/** Maven Session.
	 *
	 * @parameter default-value="${session}"
	 * @required
	 * @readonly
	 */
	protected MavenSession mavenSession;

	/** Base working directory.
	 *
	 * @parameter default-value="${project.basedir}"
	 * @required
	 * @readonly
	 */
	protected File basedir;

	/**
	 * Returns true if the current project is located at the Execution Root
	 * Directory (where mvn was launched)
	 *
	 * @return true if execution root
	 */
	protected final boolean isThisTheExecutionRoot() {
		final boolean result = mavenSession.getExecutionRootDirectory()
				.equalsIgnoreCase(basedir.toString());
		return result;
	}
}

This code probably originates from Maven Changes Report Plugin: http://maven.apache.org/plugins/maven-changes-plugin/xref/index.html, but as I failed to find it within 10 minutes, I thought it might worth sharing.

Share

Hunspell4Eclipse 0.8.6

No Gravatar

Thanks to new members on the H4E team a new release could be downloaded from update site or Eclipse Marketplace.

The project is hosted under Google Code: http://code.google.com/p/hunspell4eclipse/

Eclipse Marketplace: http://marketplace.eclipse.org/content/hunspell4eclipse-0

Ohloh: https://www.ohloh.net/p/hunspell4eclipse

It is known to work with almost any variation of Eclipse – OS – HW out there.

Have fun with it.

Share

Open for new opportunities [CLOSED]

No Gravatar

[update: apr. 11. ] I have a new contract. Case closed.

Form today I’m open for new opportunities. I’m seeking for new adventures and possibilities.

It’s time to switch… I’m seeking for a new job in area of Budapest, Hungary. As you could see from my CV, I’m primary a software architect in a field of Java, with more than 20yr of experience in software development. Anyone interested could drop me a mail to a given email address from the CV.

For those interested I have a brand new CV.

Share
Categories: news Tags:

Provide log4j configuration fast and dirty

No Gravatar
If you are developing with Java, I’m sure you ran into a console output that looks like this:
log4j:WARN No appenders could be found for logger (org.apache.openejb.resource.activemq.ActiveMQResourceAdapter).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (org.apache.openejb.resource.activemq.ActiveMQResourceAdapter).log4j:WARN Please initialize the log4j system properly.
The message is clean: provide a log4j configuration. But, hey, I just want to debug/test/… it… Or I just want to change the debug level, but I cannot modify the app, or cannot find the (right) configuration…
I just need a fast solution for this.
So here it is:
  1. Create a folder and place a log4j.properteies file in it.
  2. Edit your log4j.properteies for your needs.
  3. Add the given folder to your apps classpath (as a first entry)

That’s it.

Read more…

Share

Debuging OpenEJB’s TomEE with Eclipse WTP

No Gravatar

This is just a short description on how to use OpenEJB with Tomcat to debug it within Eclipse.

The point is to be able to debug EJB applications from within Eclipse with a lightweight Tomcat container using OpenEJB.

Read more…

Share

Hunspell4Eclipse 0.8.2 (beta) out

No Gravatar

Changes:

  • threshold feature
  • update site back to normal
  • limited Java support – reports misspelled words (underline), but no proposals
  • latest JNA

Link to project page: http://code.google.com/p/hunspell4eclipse/

Share