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
>> 
> 

Reply via email to