Copy link to clipboard
Copied
Hello
I could get this plugin to work with a Hudson build server and the Violations plugin. My problem is that the pdm.xml contains the paths to the source files as below:
<file name="home/hudson/.hudson/jobs/MyProject/workspace/ContactForm/src/com/arcad/projects/solerati/contactform/events/SamplesEvent.as">
<violation beginline="15" endline="15" begincolumn="14" endcolumn="14" rule="adobe.ac.pmd.rules.event.PublicVariableInCustomEvent" ruleset="Event Rules" package="com.arcad.projects.solerati.contactform.events" class="SamplesEvent.as" externalInfoUrl="" priority="3">No public variables should be inside a custom event. This variable (sample) is public. In order to improve encapsulation in your custom event, it is better not to have public variable in your event. Prefer having read-only attributes, set by the event constructor</violation>
</file>
So they are basically absolute file paths from system root, and not relative to the workspace root. So the Violations plugin can not pick up them and show the source code.
Is there a way to tell the plugin where is my workspace root, and force it to show the paths from there?
Cheers, Balazs
Copy link to clipboard
Copied
I use the exact same configuration (Hudson and Violations plugin (or PMD plugin)), and everything works fine.
Is your Hudson on Linux?
Mine is on Windows Server. That may be the difference.
What would be the expected absolute path?
Thanks
Copy link to clipboard
Copied
Yep, this is a Linux server.
And this is correct, as an absolute path, I mean the path for the file is
/home/hudson/.hudson/jobs/MyProject/workspace/ContactForm/src/com/arcad/pr ojects/solerati/contactform/events/SamplesEvent.as
and I think this must be the problem. In this picture http://opensource.adobe.com/wiki/download/attachments/29852444/hudson.jpg your path to the file begins as trunk/flex-pmd .... It looks like a workspace relative path. But for me the same path start like home/hudson/.hudson..., which starts from the root rather than the workspace.
We can simplify the question, because I'm not sure what's the truth, I don't know the Violations plugin well, the path the plugin includes in the xml file must be a workspace relative path, or an absolute one?
Thanks, Balazs
Copy link to clipboard
Copied
I'm seeing the exact same issue. The file paths in the pmd.xml file are the absoute file path, except missing the first slash.
Copy link to clipboard
Copied
Ok... After investigation, it looks that you guys hit a bug.
It will be fixed today and will be in RC4.
Can I ask to you fill a bug please?
Copy link to clipboard
Copied
http://bugs.adobe.com/jira/browse/FLEXPMD-70
I noticed that Java PMD appears to output absolute paths, so it would make sense for that to be the FlexPMD behavior as well.
Copy link to clipboard
Copied
The issue has been marked as closed.
Weird though that's working fine on windows.
Thanks for reporting this though.
Copy link to clipboard
Copied
tested in RC4, now it is working fine.
\m/
cheers, Balazs
Copy link to clipboard
Copied
Great to hear