moreover if my .java files packages are directly under the .jars then
 <archives>
<zips>
<fileset dir="${src.dir}">
 <include name="com.xyz.xbot*.jar"/>
<include name="com.xyz.xide*.jar"/>
 <include name="org.xyz.cdt*.jar"/>
</fileset>
</zips>
 </archives>

this also works.


but if the packages are under .jars/src  then

 <archives>
<zips>
<fileset dir="${src.dir}">
 <include name="com.xyz.xbot*.jar/src"/>
<include name="com.xyz.xide*.jar/src"/>
 <include name="org.xyz.cdt*.jar/src"/>
</fileset>
</zips>
 </archives>

doesn't work..


whats the mistake i am doing..?


On Thu, Jul 24, 2014 at 1:35 PM, kunal tayal <[email protected]> wrote:

> Hi marc,
>
> I got some eclipse plugins in folders and some in jars. Jacoco  is nicely
> taking the source from the folders but not including the source from jars ..
>
>                                      <dirset dir="${src.dir}/" >
> <include name="com.xyz.xbot*/src"/>
> <include name="com.xyz.xide*/src"/>
>  <include name="org.eclipse.cdt*/src"/>
> <include name="com.xyz.xbot*.jar/src"/>
>  <include name="com.xyz.xide*.jar/src"/>
> <include name="org.eclipse.cdt*.jar/src"/>
>  </dirset>
>
>
> it is perfectly working for <include name="com.xyz.xbot*/src"/>
> <include name="com.xyz.xide*/src"/>
>  <include name="org.eclipse.cdt*/src"/>
>
>
> but not including the source in jar files....
> <include name="com.xyz.xbot*.jar/src"/>
>  <include name="com.xyz.xide*.jar/src"/>
> <include name="org.eclipse.cdt*.jar/src"/>
>
>
> what could be the reason...?
>
>
>
> On Tue, Jul 22, 2014 at 11:27 AM, kunal tayal <[email protected]> wrote:
>
>> Hi marc,
>>
>> yah i somehow resolved the issue same day..
>>
>> *problem was : --"specified source folders must be the direct parent of
>> the folders that define the Java packages"  *
>>
>> thanks
>>
>>
>> On Tue, Jul 22, 2014 at 11:01 AM, Marc R. Hoffmann <
>> [email protected]> wrote:
>>
>>>  We have an FAQ item for this problem:
>>> http://www.eclemma.org/jacoco/trunk/doc/faq.html
>>>
>>> -marc
>>> Why does the coverage report not show highlighted source code?
>>>
>>> Make sure the following prerequisites are fulfilled to get source code
>>> highlighting in JaCoCo coverage reports:
>>>
>>>    - Class files must be compiled with debug information to contain
>>>    line numbers.
>>>    - Source files must be properly supplied at report generation time.
>>>    I.e. specified source folders must be the direct parent of the folders 
>>> that
>>>    define the Java packages.
>>>
>>>
>>>
>>>
>>> On 16.07.14 11:16, kunal tayal wrote:
>>>
>>>  Hi marc,
>>>
>>>  now its not getting the link to source files
>>>
>>>  <classfiles>
>>>  <fileset
>>> dir="C:\Xars_client\run\Xplorer\eclipse\plugins\com.xyz.xbot.importexport.tests_4.5.0.201407111823\com\xyz\xbot\importexport\tests"
>>> >
>>>  </fileset>
>>>  </classfiles>
>>>  <sourcefiles encoding="UTF-8">
>>>  <fileset
>>> dir="C:\Xars_client\run\Xplorer\eclipse\plugins\com.xyz.xbot.importexport.tests_4.5.0.201407111823\com\xyz\xbot\importexport\tests">
>>>  </fileset>
>>>  </sourcefiles>
>>>
>>>
>>>  
>>> "C:\Xars_client\run\Xplorer\eclipse\plugins\com.xyz.xbot.importexport.tests_4.5.0.201407111823\com\xyz\xbot\importexport\tests"
>>> contains both java and class files. but in report m not linked to source
>>> files.
>>>
>>>
>>>  Can u tell me whats going on ?
>>>
>>>
>>>  i tried include *.java too...that is also not working ..
>>>
>>>
>>>  On Wed, Jul 16, 2014 at 11:17 AM, kunal tayal <[email protected]> wrote:
>>>
>>>> Hi Marc
>>>>
>>>>
>>>>  found out the issue...
>>>>
>>>>  changed the <classfiles> element from
>>>>
>>>>  <classfiles>
>>>>  <fileset dir="${result.classes.dir}" >
>>>>  </classfiles>
>>>>
>>>>
>>>>  to
>>>>                                <classfiles>
>>>>  <fileset dir="${result.classes.dir}" >
>>>>    <include name="com.xyz.xide*.jar"/>
>>>>   <include name="com.xyz.xide*/**/*.class"/>
>>>>   <include name="com.xyz.xbot*/**/*.class"/>
>>>>  </fileset>
>>>>  </classfiles>
>>>>
>>>>
>>>>  without <include> it was not able to take the  .class and .jar files
>>>> recursively directly from dir ${result.classes.dir}.
>>>>
>>>>
>>>>  Any ways thanks for your time !
>>>>
>>>>  -kunal
>>>>
>>>>
>>>> On Tue, Jul 15, 2014 at 9:07 PM, Marc R. Hoffmann <
>>>> [email protected]> wrote:
>>>>
>>>>> Hm, no useful information here. Can you please run your Ant build with
>>>>> the -debug option to get more output about the problem?
>>>>>
>>>>> Ths,
>>>>> -marc
>>>>> 2rf
>>>>>
>>>>> On 15.07.14 10:46, [email protected] wrote:
>>>>>
>>>>>> plz see the last line of the logs...line 64 is <jacoco:report> tag
>>>>>> mentioned earlier...
>>>>>>
>>>>>> C:\Xars_client\run\Xplorer>ant -f run_test.xml run
>>>>>> -Declipse_home=C:\Xars_client
>>>>>> \run\xplorer\eclipse
>>>>>> -Dtest-classname=com.tensilica.xbot.importexport.tests.Expo
>>>>>> rtProjectsTest
>>>>>> -Dtest-pluginname=com.tensilica.xbot.importexport.tests -Declipse
>>>>>> -rundir= C:\Xars_client\run\xplorer\eclipse
>>>>>> -Dtemp-workspace=C:\workspace_ws -Do
>>>>>> s=win32 -Dlog4j_output=c:\xars_client\run\logs
>>>>>> -Dxbotdir=C:\Xars_client\run\xplo
>>>>>> rer\eclipse\plugins -DwaitForEarlyStartup=true -Dws=win32
>>>>>> -DpluginCustomization=
>>>>>> S:\winWS\er_r.ini
>>>>>> -Dproject_dir="D:\Work\PerforceDepot\eagle_nest_ktayal\p4root\
>>>>>> other\xideregress\projects" -Dlocalroot=C:\Xars_client\xen_dev\
>>>>>> Buildfile: C:\Xars_client\run\Xplorer\run_test.xml
>>>>>>
>>>>>> suite:
>>>>>>
>>>>>> init:
>>>>>>
>>>>>> swtbot-test:
>>>>>>
>>>>>> java-test:
>>>>>>       [echo] ======================================
>>>>>>       [echo] Running swtbot junit tests in
>>>>>> com.tensilica.xbot.importexport.tests.
>>>>>> ExportProjectsTest
>>>>>>       [echo] Command line args are     -application
>>>>>> org.eclipse.swtbot.eclipse.ju
>>>>>> nit4.headless.swtbottestapplication    -product
>>>>>> com.tensilica.xide.xplorer_ce
>>>>>>   -testApplication org.eclipse.ui.ide.workbench    -data
>>>>>> C:\workspace_ws    forma
>>>>>>
>>>>>> tter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,C:\Xar
>>>>>>
>>>>>> s_client\run\xplorer\eclipse/com.tensilica.xbot.importexport.tests.ExportProject
>>>>>> sTest.xml
>>>>>> formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResul
>>>>>> tFormatter    -testPluginName com.tensilica.xbot.importexport.tests
>>>>>>  -classNam
>>>>>> e com.tensilica.xbot.importexport.tests.ExportProjectsTest    -os
>>>>>> win32    -ws w
>>>>>> in32    -arch x86    -consoleLog    -debug    -showLocation
>>>>>> -pluginCustomization
>>>>>>   S:/winWS/er_r.ini --discover ${extraXXargs}
>>>>>>       [echo] JVM args are
>>>>>> -Dxbot.pluginsdir=C:\Xars_client\run\xplorer\eclipse\pl
>>>>>> ugins  -Dtools_dir=${toolsdir}    -Dtools=${tools}
>>>>>>  -Dproject_dir=D:\Work\Perfor
>>>>>> ceDepot\eagle_nest_ktayal\p4root\other\xideregress\projects
>>>>>>  -Dtie_dir=${tiedir}
>>>>>>      -Dtest_count=1  -Dtemp_dir=${tempdir}
>>>>>>  -Dlocalroot=C:\Xars_client\xen_dev\
>>>>>>      -Dorg.eclipse.ui.testsWaitForEarlyStartup=true
>>>>>>  -Dlog4j_output=c:\xars_cli
>>>>>> ent\run\logs
>>>>>>       [echo] JUnit Result File:
>>>>>> C:\Xars_client\run\xplorer\eclipse/results/com.te
>>>>>> nsilica.xbot.importexport.tests.ExportProjectsTest.xml.
>>>>>>       [echo] Console output File:
>>>>>> C:\Xars_client\run\xplorer\eclipse/results/com.
>>>>>> tensilica.xbot.importexport.tests.ExportProjectsTest.txt.
>>>>>>       [echo] ======================================
>>>>>> [jacoco:coverage] Enhancing java with coverage
>>>>>>       [echo] ======================================
>>>>>>       [echo] If you see errors above please see the file
>>>>>> C:\Xars_client\run\xplor
>>>>>>
>>>>>> er\eclipse/results/com.tensilica.xbot.importexport.tests.ExportProjectsTest.txt
>>>>>> for more information.
>>>>>>       [echo] Errors are generally caused by missing or incorrect
>>>>>> dependencies.
>>>>>>       [echo] ======================================
>>>>>>
>>>>>> collect-results:
>>>>>>       [move] Warning: C:\Xars_client\run\xplorer\eclipse\screenshots
>>>>>> does not exi
>>>>>> st.
>>>>>>       [xslt] Transforming into
>>>>>> C:\Xars_client\run\xplorer\eclipse\results
>>>>>>       [xslt] Processing
>>>>>> C:\Xars_client\run\xplorer\eclipse\results\com.tensilica.
>>>>>> xbot.importexport.tests.ExportProjectsTest.xml to
>>>>>> C:\Xars_client\run\xplorer\ecl
>>>>>>
>>>>>> ipse\results\com.tensilica.xbot.importexport.tests.ExportProjectsTest.html
>>>>>>       [xslt] Loading stylesheet
>>>>>> C:\Xars_client\run\xplorer\eclipse\plugins\org.ec
>>>>>>
>>>>>> lipse.swtbot.eclipse.junit4.headless_2.0.5.20111003_1754-3676ac8-dev-e36\JUNIT.X
>>>>>> SL
>>>>>>
>>>>>> report:
>>>>>> [jacoco:report] Loading execution data file
>>>>>> C:\Xars_client\run\jacoco_results\ja
>>>>>> coco.exec
>>>>>>
>>>>>> BUILD FAILED
>>>>>> C:\Xars_client\run\Xplorer\run_test.xml:64: Error while creating
>>>>>> report
>>>>>>
>>>>>> Total time: 1 minute 27 seconds
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tuesday, 15 July 2014 13:31:20 UTC+5:30, Marc R. Hoffmann  wrote:
>>>>>>
>>>>>>> What is the full error message please?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Best regards,
>>>>>>>
>>>>>>> -marc
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 15.07.14 09:47, [email protected] wrote:
>>>>>>>
>>>>>>>  Hi guys ,
>>>>>>>> I am new to java and this plugin :)
>>>>>>>>    I am having the complete build/compiled java code with me for
>>>>>>>> swtbot tests. Now i want to see what all code/features has been covered
>>>>>>>> from these tests. So tried to use the ant tasks of jacoco mentioned at
>>>>>>>> http://www.eclemma.org/jacoco/trunk/doc/ant.html
>>>>>>>> and referenced
>>>>>>>> http://www.eclemma.org/jacoco/trunk/doc/examples/build/build.xml
>>>>>>>> too.
>>>>>>>> when i am giving the report target as
>>>>>>>> <target name="report" depends="suite">
>>>>>>>>                 <!-- Step 3: Create coverage report -->
>>>>>>>>                 <jacoco:report>
>>>>>>>>                         <!-- This task needs the collected
>>>>>>>> execution data and ... -->
>>>>>>>>                         <executiondata>
>>>>>>>>                                 <file file="${result.exec.file}" />
>>>>>>>>                         </executiondata>
>>>>>>>>                         <!-- the class files and optional source
>>>>>>>> files ... -->
>>>>>>>>                         <structure name="JaCoCo report">
>>>>>>>>                                 <classfiles>
>>>>>>>>                                         <fileset
>>>>>>>> dir="${result.classes.dir}" />
>>>>>>>>                                 </classfiles>
>>>>>>>>
>>>>>>>>                         </structure>
>>>>>>>>                         <!-- to produce reports in different
>>>>>>>> formats. -->
>>>>>>>>                         <html destdir="${result.report.dir}" />
>>>>>>>>                         <csv
>>>>>>>> destfile="${result.report.dir}/report.csv" />
>>>>>>>>                         <xml
>>>>>>>> destfile="${result.report.dir}/report.xml" />
>>>>>>>>                 </jacoco:report>
>>>>>>>>         </target>
>>>>>>>> and coverage as
>>>>>>>> <jacoco:coverage destfile="${result.exec.file}">
>>>>>>>>                 <java fork="true" dir="." timeout="${timeout}"
>>>>>>>> jvm="${jvm}" logError="true" classname="org.eclipse.core.launcher.Main"
>>>>>>>> output="${junit-report-output}/${classname}.txt">
>>>>>>>>                         <classpath>
>>>>>>>>                                 <fileset
>>>>>>>> dir="${eclipse-home}/plugins">
>>>>>>>>                                         <include
>>>>>>>> name="org.eclipse.equinox.launcher_*.jar" />
>>>>>>>>                                 </fileset>
>>>>>>>>                         </classpath>
>>>>>>>>                         <arg line="${launcher-arg-line}" />
>>>>>>>>                         <jvmarg line="${jvm-arg-line}" />
>>>>>>>>                         <sysproperty key="PLUGIN_PATH"
>>>>>>>> value="${plugin-path}" />
>>>>>>>>                 </java>
>>>>>>>>                 </jacoco:coverage>
>>>>>>>> where ${result.classes.dir} (i.e. ${eclipse-home}/plugins) points
>>>>>>>> to my already compiled code directory containing many .class and .jar 
>>>>>>>> under
>>>>>>>> different folders.
>>>>>>>> .exec and index.html and .session.html  files are getting generated
>>>>>>>> but result is not correct and command prompt it shows
>>>>>>>> BUILD FAILED : Error while creating report.
>>>>>>>> . It is not listing all the classes and .sessions.html lists many
>>>>>>>> classes but with no links to direct to that class and see the executed
>>>>>>>> methods .
>>>>>>>> And when i run the EclEmma eclipse plugin from eclipse and run and
>>>>>>>> see the result there then that it is working absolutely fine.
>>>>>>>> So i am just wandering what is missing in case of ant tasks ?
>>>>>>>>
>>>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "JaCoCo and EclEmma Users" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/jacoco/AqidzHPR4f8/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "JaCoCo and EclEmma Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "JaCoCo and EclEmma Users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/jacoco/AqidzHPR4f8/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to