The problem occurred when jcasgen-maven-plugin was used with the option of 
limiting to the scope of a project.

The projectDirPath is specified as a file system path, e.g. 
"C:\my\project\directory" or "/my/project/directory".

The type system location obtained form a type system descriptor via 
getSourceUrlString() is a URL, e.g. "file:/C:/my/project/directory" or 
"file:/my/project/directory".

isOutOfScope got the path part of the sourceUrl and compared it to the 
projectDirPath. This worked nicely under Linux, but not on Windows. 

I guess, the question is: why does it work on Windows in Eclipse and does it 
fail there now because of the change I made. Maybe Eclipse provides the 
projectDirPath as a URL string instead of a file system path. 

I'm not sure yet - that's why the issue also isn't marked as "resolved" yet.

-- Richard

On 23.11.2014, at 21:17, Marshall Schor <[email protected]> wrote:

> hmmm,
> 
> Something more complex may be happening, because I run mostly on windows, and
> have been able to run JCasGen from there without issues.
> 
> Is there a specific setup that fails?
> 
> -Marshall
> On 11/23/2014 12:52 PM, Richard Eckart de Castilho (JIRA) wrote:
>>    [ 
>> https://issues.apache.org/jira/browse/UIMA-4119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14222433#comment-14222433
>>  ] 
>> 
>> Richard Eckart de Castilho edited comment on UIMA-4119 at 11/23/14 5:51 PM:
>> ----------------------------------------------------------------------------
>> 
>> On windows, the default path representation and the URI path representation 
>> differ: "/C:/..." vs. "C:\...". For this reason, Jg.isOutOfScope() fails to 
>> detect that types are within scope on Windows and generates nothing.
>> 
>> That doesn't explain why the user reporting this problem initially had 
>> strange imports in the temporary type system descriptor, but it was the 
>> reason why type generation failed when I tried to reproduce this. Let's see 
>> if that also fixes the issue for the user.
>> 
>> 
>> was (Author: rec):
>> On windows, the default path representation and the URI path representation 
>> differ: "/C:/..." vs. "C:\...". For this reason, Jg.isOutOfScope() fails to 
>> detect that types are within scope on Windows and generates nothing.
>> 
>>> jcasgen-maven-plugin generates no files on Windows
>>> --------------------------------------------------
>>> 
>>>                Key: UIMA-4119
>>>                URL: https://issues.apache.org/jira/browse/UIMA-4119
>>>            Project: UIMA
>>>         Issue Type: Bug
>>>         Components: jcasgen-maven-plugin
>>>   Affects Versions: 2.6.0SDK
>>>           Reporter: Richard Eckart de Castilho
>>>           Assignee: Richard Eckart de Castilho
>>>            Fix For: 2.7.0SDK
>>> 
>>> 
>>> jcasgen-maven-plugin generates a temporary type system file importing all 
>>> type system files for which JCas classes should be generated. On Windows, 
>>> this file contains invalid imports, e.g.:
>>> {noformat}<?xml version="1.0" encoding="UTF-8"?>
>>> <typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier";>
>>>    <imports>
>>>        <import 
>>> location="file:/C:/de.tudarmstadt.ukp.dkpro.core-asl/de.tudarmstadt.ukp.dkpro.core.api.lexmorph-asl/src/main/resources/desc/type/Morpheme.xml"/>
>>>        <import 
>>> location="file:/C:/de.tudarmstadt.ukp.dkpro.core-asl/de.tudarmstadt.ukp.dkpro.core.api.lexmorph-asl/src/main/resources/desc/type/POS.xml"/>
>>>    </imports>
>>> </typeSystemDescription>
>>> {noformat}
>>> The paths in this file appear to be absolute paths starting with C:\, but 
>>> actually they are relative to the Eclipse workspace root.

Reply via email to