Copy link to clipboard
Copied
Hi all!
I would like to know how to generate the html report with the maven plugin.
It's said that "Currently, FlexPMD produces a XML report by default, plus an HTML report when invoked by the Maven site plugin."
I added the section correponding to the FlexPMD in my pom project as following :
<plugin>
<groupId>com.adobe.ac</groupId>
<artifactId>flex-pmd-maven-plugin</artifactId>
<version>1.0.RC4</version>
</plugin>
but when I do a site generation, it just generates me a pmd.xml report with the violations (good!) but the flexpmd.html report generated is empty (there are just the default informations about my project but nothing about pmd).
If someone has allready configured flexpmd on his maven project, I will be happy to have some help please!
Thanks'
Copy link to clipboard
Copied
Hi
I encountered the same problem.
I used mvn site to generate the report and the flexpmd.html is empty even if pmd.xml is not.
pmd.xml seems to not be at the right level (in target instead of target\site as it's the case for the java pmd plugin)
Moreover maybe it could be a good idea to call the xml flexpmd.xml to not have conflict with the java one.
Thanks in advance
Copy link to clipboard
Copied
Hi
We can generate the html report but, as you can see in the following Figure, it displays each violation twice.
Do you have any suggestion to avoid this !!?? Thanks !
Copy link to clipboard
Copied
Ok, we fixed also this problem by putting in comment the line number 90 of FlexPmdHtmlEngine class.
//report.addListener( reportSink );
Also we notice that there is two reports : report and reportSink.
Two html reports are générated : the first in the "target" directory and the second in the "target/site" directory. May be there is a reason for that.. I don't know... !!???
regards,
Copy link to clipboard
Copied
@yocha78
pmd.xml seems to not be at the right level (in target instead of target\site as it's the case for the java pmd plugin)
==> The pmd.xml must be under "target" directory and also under "target\site".. I think it's the right level !!
Moreover maybe it could be a good idea to call the xml flexpmd.xml to not have conflict with the java one.
==> There is no conflict because the pmd for flex will be generated in your flex project !!
regards,
Copy link to clipboard
Copied
Thanks for your answer, in fact in my company we use a common pom parent which defines the entire plugin we used inluding pmd.
It wasn't a problem to have a pmd.xml empty for java when doing mvn site for flex module it's the reason why I was surprised the pmd java and the pmd flex have the same name.
I modifed the flex pom project to disable the java pmd plugin.
How do I get your modification to have the flexpmd.html generated?
Thanks again,
Copy link to clipboard
Copied
Hi
We didn't modify anything to get the HTML report. We just download the source code of "flex-pmd-maven-plugin", modify the version in the pom to "1.0.RC4", and launch "mvn clean install"
This will install the plugin and download all dependencies in your MavenRepository
Then in the pom of our flex project we define the plugin in the <build><plugins> section and also in the <reporting><plugins> section , like this :
<plugin>
<groupId>com.adobe.ac</groupId>
<artifactId>flex-pmd-maven-plugin</artifactId>
<version>1.0.RC4</version>
</plugin>
Then in the top level of our flex projet (the same level of the pom file) launch "mvn clean site"
This will generate the flexpmd.html in the target/site directory.
Hope it will help !
Copy link to clipboard
Copied
I did the same things but It was what I tried before and I still have a pmd.xml inside target but no pmd.xml inside site repository and the flexpmd.html is empty.
I don't know, if the site report work only with a specific maven-site-plugin, I tried with the last one 2.0-beta-7.
Regards
Copy link to clipboard
Copied
You may wanna reopen this bug, then :
http://bugs.adobe.com/jira/browse/FLEXPMD-6
Cheers,
François
Copy link to clipboard
Copied
I noticed that this is fixed in RC5. It is working fine for me.