This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
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] Sample project
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 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/ .m2/repository/org/apache/maven/surefire/surefire-api/2.4.3/surefire- api-2.4.3.jar file:/private/tmp/mavenproject1/target/test-classes/ fi le:/private/tmp/mavenproject1/target/classes/ file:/Users/thurka/.m2/ repository/junit/junit/3.8.1/junit-3.8.1.jar Main-Class: org.apache.maven.surefire.booter.SurefireBooter $
fixed in profiler-main changeset: 123084:b760e293b4c9 user: Tomas Hurka <thurka@netbeans.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) Changeset: http://hg.netbeans.org/main-golden/rev/b760e293b4c9 User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #157978, use Class-Path attribute from manifest when computing classpath of profiled application
marking verified