Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-81155

Clean these files that untracked by git when use jacoco to generate report

    Details

    • Type: Story
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Master
    • Fix Version/s: None
    • Labels:
      None

      Description

      Jacoco will fail to create report when different class with same name.
      The root cause is sometimes the souce code be moved from one directory to another one, when new class file be build during ant all, but the old class files did not be cleaned.

      BUILD FAILED
      /home/lily/repo/portal-ce/build-common.xml:1974: The following error occurred while executing this line:
      /home/lily/repo/portal-ce/build-common.xml:875: Error while creating report
      	at org.jacoco.ant.ReportTask.execute(ReportTask.java:501)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:402)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
      	at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:217)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:155)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.Target.execute(Target.java:435)
      	at org.apache.tools.ant.Target.performTasks(Target.java:456)
      	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
      	at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
      	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      	at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
      	at org.apache.tools.ant.Main.runBuild(Main.java:857)
      	at org.apache.tools.ant.Main.startAnt(Main.java:236)
      	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:287)
      	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:113)
      Caused by: java.io.IOException: Error while analyzing modules/apps/forms-and-workflow/dynamic-data-mapping/dynamic-data-mapping-form-evaluator/classes/com/liferay/dynamic/data/mapping/form/evaluator/DDMFormEvaluationResult.class.
      	at org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:155)
      	at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:130)
      	at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:147)
      	at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:185)
      	at org.jacoco.ant.ReportTask.createBundle(ReportTask.java:570)
      	at org.jacoco.ant.ReportTask.createReport(ReportTask.java:542)
      	at org.jacoco.ant.ReportTask.execute(ReportTask.java:495)
      	... 44 more
      Caused by: java.lang.IllegalStateException: Can't add different class with same name: com/liferay/dynamic/data/mapping/form/evaluator/DDMFormEvaluationResult
      	at org.jacoco.core.analysis.CoverageBuilder.visitCoverage(CoverageBuilder.java:107)
      	at org.jacoco.core.analysis.Analyzer$1.visitEnd(Analyzer.java:96)
      	at org.objectweb.asm.ClassVisitor.visitEnd(ClassVisitor.java:317)
      	at org.jacoco.core.internal.flow.ClassProbesAdapter.visitEnd(ClassProbesAdapter.java:98)
      	at org.objectweb.asm.ClassReader.accept(ClassReader.java:697)
      	at org.objectweb.asm.ClassReader.accept(ClassReader.java:506)
      	at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:111)
      	at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:127)
      	... 49 more
      

        Attachments

          Activity

            People

            • Assignee:
              dante.wang Dante Wang
              Reporter:
              lily.chi Lily Chi
              Recent user:
              Tina Tian
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Packages

                Version Package