You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2013/07/01 21:34:20 UTC

[jira] [Updated] (UIMA-2958) jcasgen Maven plugin: add option to exclude generating for imported types

     [ https://issues.apache.org/jira/browse/UIMA-2958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor updated UIMA-2958:
---------------------------------

    Description: 
Add an option, perhaps something like <skipGenerationForImportedTypes>, which if true (not the default) would only generate those types which were defined directly (that is, not via an import) in the set of type system descriptors specified as input for this plugin.

Rationale from UIMA-1176

{quote}
Our project reuses a common type system that we got from a different source. The common type system descriptor is imported into our main type system descriptor. The common type system has its own JCas types, in a jar file.
When we generate JCas types for our main type system descriptor, it currently generates all of the classes for all of the imported type systems as well. We don't want this behavior, so we have to manually go through and delete those classes.
I think JCasGen should only generate types for the type system descriptor that you run it on, not on imported type system descriptors.
{quote}

One way to solve it as described in UIMA-2471

{quote}
Jg.main0 takes an array of string arguments. To make JCasGen limit the cover classes it generates to just those whose type definitions are contained in some directory (at any sub directory level), you pass 2 additional arguments in this array:
1) "-limitToDirectory" and then following that
2) the path to some directory. Currently this is typically set to a containing Eclipse project directory, for example, when JCasGen is called from the Component Descriptor Editor
{quote}

  was:
Rationale from UIMA-1176

{quote}
Our project reuses a common type system that we got from a different source. The common type system descriptor is imported into our main type system descriptor. The common type system has its own JCas types, in a jar file.
When we generate JCas types for our main type system descriptor, it currently generates all of the classes for all of the imported type systems as well. We don't want this behavior, so we have to manually go through and delete those classes.
I think JCasGen should only generate types for the type system descriptor that you run it on, not on imported type system descriptors.
{quote}

One way to solve it as described in UIMA-2471

{quote}
Jg.main0 takes an array of string arguments. To make JCasGen limit the cover classes it generates to just those whose type definitions are contained in some directory (at any sub directory level), you pass 2 additional arguments in this array:
1) "-limitToDirectory" and then following that
2) the path to some directory. Currently this is typically set to a containing Eclipse project directory, for example, when JCasGen is called from the Component Descriptor Editor
{quote}

        Summary: jcasgen Maven plugin: add option to exclude generating for imported types  (was: Do not follow references outside a project)
    
> jcasgen Maven plugin: add option to exclude generating for imported types
> -------------------------------------------------------------------------
>
>                 Key: UIMA-2958
>                 URL: https://issues.apache.org/jira/browse/UIMA-2958
>             Project: UIMA
>          Issue Type: Improvement
>          Components: jcasgen-maven-plugin
>            Reporter: Richard Eckart de Castilho
>             Fix For: 2.4.1SDK
>
>
> Add an option, perhaps something like <skipGenerationForImportedTypes>, which if true (not the default) would only generate those types which were defined directly (that is, not via an import) in the set of type system descriptors specified as input for this plugin.
> Rationale from UIMA-1176
> {quote}
> Our project reuses a common type system that we got from a different source. The common type system descriptor is imported into our main type system descriptor. The common type system has its own JCas types, in a jar file.
> When we generate JCas types for our main type system descriptor, it currently generates all of the classes for all of the imported type systems as well. We don't want this behavior, so we have to manually go through and delete those classes.
> I think JCasGen should only generate types for the type system descriptor that you run it on, not on imported type system descriptors.
> {quote}
> One way to solve it as described in UIMA-2471
> {quote}
> Jg.main0 takes an array of string arguments. To make JCasGen limit the cover classes it generates to just those whose type definitions are contained in some directory (at any sub directory level), you pass 2 additional arguments in this array:
> 1) "-limitToDirectory" and then following that
> 2) the path to some directory. Currently this is typically set to a containing Eclipse project directory, for example, when JCasGen is called from the Component Descriptor Editor
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Re: [jira] [Updated] (UIMA-2958) jcasgen Maven plugin: add option to exclude generating for imported types

Posted by Marshall Schor <ms...@schor.com>.
On 7/1/2013 5:02 PM, Marshall Schor wrote:
> On 7/1/2013 3:45 PM, Richard Eckart de Castilho wrote:
>> I believe it would in principple be much simpler just to skip the imported type systems and rely on the pattern mechanism. We don't really have to maintain backwards compatibility here, because this is going to be the first release.
>>
>> How about skipping imported systems and later - if necessary - add an option to include imported types?
>>
>> A complicating factor is the limited API of jcasgen itself though.
> That's OK with me - that will simplify the jcasgen maven plugin.  I think the
> best way to implement this is to add an internal-use-only parameter to the
> JCasgen tool that does the right thing, something like noting which types come
> from the top level imports, and only generating those.
>
> I'll take a look at doing that.
On reflection, I realize I'm confused about the motivation for having multiple
inputs for the maven jcasgen plugin, and I've posted a query about this on that
Jira.

-Marshall

>
> -Marshall
>
>> -- Richard
>>
>> Am 01.07.2013 um 21:34 schrieb "Marshall Schor (JIRA)" <de...@uima.apache.org>:
>>
>>>     [ https://issues.apache.org/jira/browse/UIMA-2958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>>
>>> Marshall Schor updated UIMA-2958:
>>> ---------------------------------
>>>
>>>    Description: 
>>> Add an option, perhaps something like <skipGenerationForImportedTypes>, which if true (not the default) would only generate those types which were defined directly (that is, not via an import) in the set of type system descriptors specified as input for this plugin.
>


Re: [jira] [Updated] (UIMA-2958) jcasgen Maven plugin: add option to exclude generating for imported types

Posted by Marshall Schor <ms...@schor.com>.
On 7/1/2013 3:45 PM, Richard Eckart de Castilho wrote:
> I believe it would in principple be much simpler just to skip the imported type systems and rely on the pattern mechanism. We don't really have to maintain backwards compatibility here, because this is going to be the first release.
>
> How about skipping imported systems and later - if necessary - add an option to include imported types?
>
> A complicating factor is the limited API of jcasgen itself though.
That's OK with me - that will simplify the jcasgen maven plugin.  I think the
best way to implement this is to add an internal-use-only parameter to the
JCasgen tool that does the right thing, something like noting which types come
from the top level imports, and only generating those.

I'll take a look at doing that.

-Marshall

>
> -- Richard
>
> Am 01.07.2013 um 21:34 schrieb "Marshall Schor (JIRA)" <de...@uima.apache.org>:
>
>>     [ https://issues.apache.org/jira/browse/UIMA-2958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>
>> Marshall Schor updated UIMA-2958:
>> ---------------------------------
>>
>>    Description: 
>> Add an option, perhaps something like <skipGenerationForImportedTypes>, which if true (not the default) would only generate those types which were defined directly (that is, not via an import) in the set of type system descriptors specified as input for this plugin.
>


Re: [jira] [Updated] (UIMA-2958) jcasgen Maven plugin: add option to exclude generating for imported types

Posted by Richard Eckart de Castilho <ri...@gmail.com>.
I believe it would in principple be much simpler just to skip the imported type systems and rely on the pattern mechanism. We don't really have to maintain backwards compatibility here, because this is going to be the first release.

How about skipping imported systems and later - if necessary - add an option to include imported types?

A complicating factor is the limited API of jcasgen itself though.

-- Richard

Am 01.07.2013 um 21:34 schrieb "Marshall Schor (JIRA)" <de...@uima.apache.org>:

> 
>     [ https://issues.apache.org/jira/browse/UIMA-2958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> Marshall Schor updated UIMA-2958:
> ---------------------------------
> 
>    Description: 
> Add an option, perhaps something like <skipGenerationForImportedTypes>, which if true (not the default) would only generate those types which were defined directly (that is, not via an import) in the set of type system descriptors specified as input for this plugin.