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.
Created attachment 76596 [details]
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.
Here is example of such manifest file:
$ cat META-INF/MANIFEST.MF
api-2.4.3.jar file:/private/tmp/mavenproject1/target/test-classes/ fi
fixed in profiler-main
user: Tomas Hurka <firstname.lastname@example.org>
date: Tue Mar 24 14:17:32 2009 +0100
summary: bugfix #157978, use Class-Path attribute from manifest when computing classpath of profiled application
Integrated into 'main-golden', will be available in build *200903260733* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Tomas Hurka <email@example.com>
Log: bugfix #157978, use Class-Path attribute from manifest when computing classpath of profiled application