Debugging tests of a Maven project in NetBeans

Posted by Lucio Benfante Wed, 20 Feb 2008 17:30:00 GMT

Occasionally I experienced some problems in debugging test classes using NetBeans with Maven projects. Simply, the debugger started but didn’t attach to the running tests.

Eventually I discovered the reason!

I used to configure the surefire plugin with:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
        <skip>false</skip>
        <useFile>true</useFile>
        <forkMode>once</forkMode> <!-- always, once or never -->
        <!-- <reportFormat>plain</reportFormat> -->
        <argLine>-Xmx512M</argLine>
    </configuration>
</plugin>

The problem is the argLine parameter. It will override the parameters the Mevenide plugin will pass for debugging tests. So, I commented it in my configuration:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
        <skip>false</skip>
        <useFile>true</useFile>
        <forkMode>once</forkMode> <!-- always, once or never -->
        <!-- <reportFormat>plain</reportFormat> -->
        <!--argLine>-Xmx512M</argLine--> <!-- don't use if you want to debug tests in NetBeans -->
    </configuration>
</plugin>

...and now I can debug my tests!

Posted in ,  | Tags , , ,  | 4 comments

JUG Meeting #32

Posted by Lucio Benfante Wed, 24 Jan 2007 15:45:00 GMT

Quando: Sabato 10 Febraio 2007 dalle 09:00 alle 13:00

Dove: aula De – piano terra del DEI, via Gradenigo 6/B (ingresso studenti), Padova

Programma:
09:00 Apertura meeting, caffè, caffè, caffè.
09:15 Introduction to Extreme Programming, a cura di Paolo Foletto (slides, video)

In this first presentation I will introduce the values, the roles and the tecniques. We will learn the terms tipical of xp and agile development.

The second presentation will be held in March and it will be more values and process oriented. The agile manifesto. Unified process versus light processes. Why XP works and why XP is not accepted in Italy?

10:45 caffè, caffè, caffè, caffè, caffè!
11:00 Approccio CoRE: Utilizzo di maven2 e continuum, a cura di Andrea Zoleo (video)

Esempio dell’utilizzo di maven2 e di continuum in un progetto reale.
  1. XP OSS e CoRE
  2. cos’e’ maven2
  3. cos’e’ continuum
  4. L’organizzazione dell’infrastruttura sistemistica.
    • svn
    • groupware
    • mailinglist
    • forum
    • issue tracking
    • ecc…
  5. Il file pom.xml di maven
  6. Vari plugin di maven
  7. core e parancoe ?
12:30 Update on the progress of the Parancoe project a cura del Parancoe Team

parancoe.dev.java.net

13:00 Pizza tutti assieme


(Malgrado titoli e riassunti, gli interventi saranno in italiano)

Posted in  | Tags , , , , ,  | 1 comment | no trackbacks

Maven 2: Spring and JTA dependencies

Posted by Lucio Benfante Sat, 26 Nov 2005 15:06:00 GMT

Few weeks ago I started using Maven 2 for one of my development projects. The project is very simple, but it has dependencies with some external libraries, in particular with Spring:

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring</artifactId>
  <version>1.2.6</version>
  <scope>runtime</scope>
</dependency>
Read more...

Posted in  | Tags , , ,  | 37 comments