Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 157978 - Profiling tests in maven projects results in no data
Profiling tests in maven projects results in no data
Product: profiler
Classification: Unclassified
Component: Base
All All
: P2 (vote)
: 6.x
Assigned To: Tomas Hurka
Depends on:
Blocks: 120674
  Show dependency treegraph
Reported: 2009-02-05 10:22 UTC by J Bachorik
Modified: 2009-06-25 10:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT

Sample project (14.51 KB, application/x-compressed)
2009-02-05 10:22 UTC, J Bachorik

Note You need to log in before you can comment on or make changes to this bug.
Description J Bachorik 2009-02-05 10:22:17 UTC
When trying to profile tests in a maven based projects the profiler starts successfully but collects no data.

Steps to reproduce:
1. Open the attached project
2. Select com.mycompany.mavenproject3.App java file
3. Invoke Profile/Profile Other/Profile Test for "App'java" action
4. Choose CPU profiling, default settings and start the tests

The tests will finish in a short time, the profiler will get notified about the application being closed but there would
be no data collected.
Comment 1 J Bachorik 2009-02-05 10:22:49 UTC
Created attachment 76596 [details]
Sample project
Comment 2 Tomas Hurka 2009-03-24 13:18:45 UTC
Tests in maven are started by artificially generated jar, which contains just manifest and no classfiles. The manifest has Class-Path and Main-Class attributes, 
which defines what should be executed. Profiler ignores Class-Path attribute in manifest and therefore is unable see the class executed by such jar.
Comment 3 Tomas Hurka 2009-03-24 13:20:11 UTC
Here is example of such manifest file:
Manifest-Version: 1.0
Class-Path: file:/Users/thurka/.m2/repository/org/apache/maven/surefir
 e/surefire-booter/2.4.3/surefire-booter-2.4.3.jar file:/Users/thurka/
 api-2.4.3.jar file:/private/tmp/mavenproject1/target/test-classes/ fi
 le:/private/tmp/mavenproject1/target/classes/ file:/Users/thurka/.m2/
Main-Class: org.apache.maven.surefire.booter.SurefireBooter


Comment 4 Tomas Hurka 2009-03-24 14:19:26 UTC
fixed in profiler-main

changeset:   123084:b760e293b4c9
user:        Tomas Hurka <>
date:        Tue Mar 24 14:17:32 2009 +0100
summary:     bugfix #157978, use Class-Path attribute from manifest when computing classpath of profiled application

Comment 5 Quality Engineering 2009-03-26 14:30:17 UTC
Integrated into 'main-golden', will be available in build *200903260733* on (upload may still be in progress)
User: Tomas Hurka <>
Log: bugfix #157978, use Class-Path attribute from manifest when computing classpath of profiled application
Comment 6 matusdekanek 2009-06-03 15:03:07 UTC
marking verified

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo