Hi, Actually this what I have done in the regex. As you can see below, the groovy output has removed the relative path section. However, there is no concatenation with the workspace path: > C:\programme\Jenkins\test-ci\workspace
Can I do some debugging? Which class is appending the complete path? Markus Am 15.12.2012 um 13:22 schrieb Ulli Hafner <ullrich.haf...@gmail.com>: > I see, that can't work. > > Where is the src folder located? > C:\programme\Jenkins\test-ci\workspace\src? > > My plug-in concatenates the workspace path and the found path in the warning, > which results in your case to > C:\programme\Jenkins\test-ci\workspace\..\..\..\src\test.c > A simple solution would be to strip off the relative path section in your > groovy parser so that the concatenation works. > > Ulli > > Am 15.12.2012 um 11:37 schrieb Markus Schneider <markus.schnei...@jemm.de>: > >> Hi Ulli, >> >> >> thanks for your help. Here is some more information: >> >> Jenkins: V1.493 >> Warnings-Plugin: V4.18 >> Static Analysis Utilities: V1.48 >> OS: Windows XP >> >> >> Workspace Path: C:\programme\Jenkins\test-ci\workspace >> Example Warning: "..\..\..\src\test.c", line 199: warning #550-D: variable >> "test" was set but never used >> >> Parsed result in parser configuration page is: >> file name: src\test.c >> line number: 199 >> category: #550-D >> >> Project configuration uses "Scan workspace files" with pattern **/*.log >> >> >> From warnings.xml: >> >> <fileName>src/test.c</fileName> >> <pathName>src</pathName> >> >> >> -> path is not expanded in xml >> >> >> Thanks, >> Markus >> >> >> Am 14.12.2012 um 09:10 schrieb Ulli Hafner <ullrich.haf...@gmail.com>: >> >>> Hmm, I thought that the files should contain at least the exception string. >>> >>> Can you please provide some more information? >>> What is your workspace path? Can you provide an example of a warning from >>> the build console log? What is the corresponding warning result in >>> warnings-[yourparsername].xml in the build folder? Is the path expanded >>> there? >>> >>> Thanks, Ulli >>> >>> Am 13.12.2012 um 20:22 schrieb Markus Schneider <markus.schnei...@jemm.de>: >>> >>>> Hello Ulli, >>>> >>>> Yes the relative path does not work for me. The tmp files are generated, >>>> but are empty. >>>> >>>> Do I need a special configuration? >>>> >>>> Markus >>>> >>>> >>>> Am 13.12.2012 um 16:02 schrieb Ulli Hafner <ullrich.haf...@gmail.com>: >>>> >>>>> Actually, a relative path (starting from the workspace root) should be >>>>> resolved automatically. Does this not work in your case? >>>>> >>>>> Ulli >>>>> >>>>> Am 12.12.2012 um 23:58 schrieb schneim <markus.schnei...@netic.de>: >>>>> >>>>>> Hello, >>>>>> >>>>>> >>>>>> I have created a custom warning parser. This works quite well. However, >>>>>> I have trouble to display the content of the source files. >>>>>> >>>>>> I found out the path in the warning is only relative to the workspace >>>>>> path, e.g. $WORKSPACE/src/file.c >>>>>> >>>>>> But for displaying the source file, the plugin requires the full path. >>>>>> >>>>>> The question is, how to find the workspace path to concatenate it with >>>>>> the file path inside the groovy script. >>>>>> >>>>>> import hudson.plugins.warnings.parser.Warning >>>>>> >>>>>> String workspace = getWorkspacePath() >>>>>> String fileName = matcher.group(1) >>>>>> String fullPath = workspace+fileName >>>>>> String lineNumber = matcher.group(2) >>>>>> String category = matcher.group(3) >>>>>> String message = matcher.group(4) >>>>>> >>>>>> return new Warning(fullPath, Integer.parseInt(lineNumber), "Dynamic >>>>>> Parser", category, message); >>>>>> >>>>>> >>>>>> Any way to find out the value for the workspace or some other solution >>>>>> available? >>>>>> >>>>>> Thanks >> >> -- >> Markus Schneider >> markus.schnei...@jemm.de >