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 <ms...@schor.com> on 2020/05/19 13:54:24 UTC

question on parent pom japicmp

I see that the setting for the postAnalysisScript for japicmp was taken out of
the uima-wide parent pom, and required to be in individual project parent poms.

What was the reason for this change?

-Marshall


Re: question on parent pom japicmp

Posted by Marshall Schor <ms...@schor.com>.
I thought that the common parent pom was for defaulting values, and these could
always be overridden by specific projects.

If many of the projects have a common value, wouldn't it make sense to abstract
that to a singularly maintainable place?

Doing that doesn't prevent other projects from having their own settings.

Am I missing something?

-Marshall

On 5/19/2020 9:56 AM, Richard Eckart de Castilho wrote:
> On 19. May 2020, at 15:54, Marshall Schor <ms...@schor.com> wrote:
>> I see that the setting for the postAnalysisScript for japicmp was taken out of
>> the uima-wide parent pom, and required to be in individual project parent poms.
>>
>> What was the reason for this change?
> The location of the script may differ from one project to the other. AFAIR the
> location in the UIMAJ SDK is different from the location in uimaFIT.
>
> -- Richard

Re: question on parent pom japicmp

Posted by Marshall Schor <ms...@schor.com>.
well, sorry, best intentions ... I haven't gotten around to doing this; may not
be able to get to it soon...

-Marshall

On 5/22/2020 10:40 AM, Marshall Schor wrote:
> ok, I'll do this... -M
>
> On 5/22/2020 11:08 AM, Richard Eckart de Castilho wrote:
>> On 20. May 2020, at 16:28, Marshall Schor <ms...@schor.com> wrote:
>>> If you have time, please redo this with this idea; if you don't have time, I
>>> could probably get something done soonish...  :-)
>> I don't know yet when I get to it. If you get to it first, please go ahead :)
>>
>> -- Richard

Re: question on parent pom japicmp

Posted by Marshall Schor <ms...@schor.com>.
ok, I'll do this... -M

On 5/22/2020 11:08 AM, Richard Eckart de Castilho wrote:
> On 20. May 2020, at 16:28, Marshall Schor <ms...@schor.com> wrote:
>> If you have time, please redo this with this idea; if you don't have time, I
>> could probably get something done soonish...  :-)
> I don't know yet when I get to it. If you get to it first, please go ahead :)
>
> -- Richard

Re: question on parent pom japicmp

Posted by Richard Eckart de Castilho <re...@apache.org>.
On 20. May 2020, at 16:28, Marshall Schor <ms...@schor.com> wrote:
> 
> If you have time, please redo this with this idea; if you don't have time, I
> could probably get something done soonish...  :-)

I don't know yet when I get to it. If you get to it first, please go ahead :)

-- Richard

Re: question on parent pom japicmp

Posted by Marshall Schor <ms...@schor.com>.
Great idea!

I agree that configuring the location of the little groovy script needs fixing,
to work with multiple project layouts, and also think your idea of moving this
to a spot where other build artifacts exist, is a great idea!

That way, we can refer to it via a maven artifact reference. 

If you have time, please redo this with this idea; if you don't have time, I
could probably get something done soonish...  :-)

Cheers. -Marshall

On 5/20/2020 9:58 AM, Richard Eckart de Castilho wrote:
> Ok, so let's discuss this.
>
> The idea is that instead of each project having to define the configuration for the JAPICMP plugin, we pull the configuration out into the parent pom.
>
> However, the situation is that there is a post-analysis script which is located in different places depending on our sub-projects, e.g.:
>
> * UIMA SDK: ${project.basedir}/../uimaj-parent/src/main/groovy/api-report.groovy
> * uimaFIT : ${project.basedir}/../uimafit-parent/src/main/groovy/api-report.groovy
>
> So we see here, that the script is in the module of the project-specific parent POM.
>
> That is why I introduced a property `japicmp.postAnalysisScript` that could be set by sub-projects in order to tell the JAPICMP configuration in the UIMA parent POM where to find the script.
>
>> Another reason to avoid this change is that projects that used to intentionally
>> inherit this value will now be "broken" and need fixing when they upgrade to
>> this new version of the uima-wide pom.
> Looking at the Parent POM 13, subprojects currently inherit a fully configured JAPICMP plugin
> configuration with the script-location hard-coded to the UIMA SDK location:
>
>           <plugin>              
>             <groupId>com.github.siom79.japicmp</groupId>
>             <artifactId>japicmp-maven-plugin</artifactId>
>             <version>0.9.4</version>
>             <configuration>
>               <oldVersion>
>                 <dependency>
>                   <groupId>${project.groupId}</groupId>
>                   <artifactId>${project.artifactId}</artifactId>
>                   <version>${api_check_oldVersion}</version>
>                 </dependency>
>               </oldVersion>
>               <parameter>
>                 <onlyModified>true</onlyModified>
>                 <!-- filter out classes with impl in their package or class name -->
>                 <postAnalysisScript>${project.basedir}/../uimaj-parent/src/main/groovy/api-report.groovy</postAnalysisScript>                  
>               </parameter>
>             </configuration>
>             <executions>
>               <execution>
>                 <phase>verify</phase>
>                 <goals>
>                   <goal>cmp</goal>
>                 </goals>
>               </execution>
>             </executions>
>           </plugin>
>
> That currently breaks the build for all other projects using the `enforce-compatibility` profile (like uimaFIT).
>
>> I thought that the common parent pom was for defaulting values, and these could
>> always be overridden by specific projects.
> Right. If a sub-project would provide its own configuration for the JAPICMP plugin or set the `japicmp.postAnalysisScript` property.
>
>> If many of the projects have a common value, wouldn't it make sense to abstract
>> that to a singularly maintainable place?
>  
> Sure. I believe I hadn't thought as far at the time I worked on this change. The best place might be the artifact which holds our other cross-project build resources.
>
> So if we moved the post-processing script to the build resources artifact, then we could probably hardcode the location in the UIMA parent POM and wouldn't need that `japicmp.postAnalysisScript` property at all.
>
> WDYT?
>
> Cheers,
>
> -- Richard
>

Re: question on parent pom japicmp

Posted by Richard Eckart de Castilho <re...@apache.org>.
Ok, so let's discuss this.

The idea is that instead of each project having to define the configuration for the JAPICMP plugin, we pull the configuration out into the parent pom.

However, the situation is that there is a post-analysis script which is located in different places depending on our sub-projects, e.g.:

* UIMA SDK: ${project.basedir}/../uimaj-parent/src/main/groovy/api-report.groovy
* uimaFIT : ${project.basedir}/../uimafit-parent/src/main/groovy/api-report.groovy

So we see here, that the script is in the module of the project-specific parent POM.

That is why I introduced a property `japicmp.postAnalysisScript` that could be set by sub-projects in order to tell the JAPICMP configuration in the UIMA parent POM where to find the script.

> Another reason to avoid this change is that projects that used to intentionally
> inherit this value will now be "broken" and need fixing when they upgrade to
> this new version of the uima-wide pom.

Looking at the Parent POM 13, subprojects currently inherit a fully configured JAPICMP plugin
configuration with the script-location hard-coded to the UIMA SDK location:

          <plugin>              
            <groupId>com.github.siom79.japicmp</groupId>
            <artifactId>japicmp-maven-plugin</artifactId>
            <version>0.9.4</version>
            <configuration>
              <oldVersion>
                <dependency>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>${project.artifactId}</artifactId>
                  <version>${api_check_oldVersion}</version>
                </dependency>
              </oldVersion>
              <parameter>
                <onlyModified>true</onlyModified>
                <!-- filter out classes with impl in their package or class name -->
                <postAnalysisScript>${project.basedir}/../uimaj-parent/src/main/groovy/api-report.groovy</postAnalysisScript>                  
              </parameter>
            </configuration>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>cmp</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

That currently breaks the build for all other projects using the `enforce-compatibility` profile (like uimaFIT).

> I thought that the common parent pom was for defaulting values, and these could
> always be overridden by specific projects.

Right. If a sub-project would provide its own configuration for the JAPICMP plugin or set the `japicmp.postAnalysisScript` property.

> If many of the projects have a common value, wouldn't it make sense to abstract
> that to a singularly maintainable place?
 
Sure. I believe I hadn't thought as far at the time I worked on this change. The best place might be the artifact which holds our other cross-project build resources.

So if we moved the post-processing script to the build resources artifact, then we could probably hardcode the location in the UIMA parent POM and wouldn't need that `japicmp.postAnalysisScript` property at all.

WDYT?

Cheers,

-- Richard


Re: question on parent pom japicmp

Posted by Marshall Schor <ms...@schor.com>.
Another reason to avoid this change is that projects that used to intentionally
inherit this value will now be "broken" and need fixing when they upgrade to
this new version of the uima-wide pom.

It would be nice to avoid breaking things, IMHO, when not otherwise required.

Is it OK with you to put this back? 

-Marshall

On 5/19/2020 9:56 AM, Richard Eckart de Castilho wrote:
> On 19. May 2020, at 15:54, Marshall Schor <ms...@schor.com> wrote:
>> I see that the setting for the postAnalysisScript for japicmp was taken out of
>> the uima-wide parent pom, and required to be in individual project parent poms.
>>
>> What was the reason for this change?
> The location of the script may differ from one project to the other. AFAIR the
> location in the UIMAJ SDK is different from the location in uimaFIT.
>
> -- Richard

Re: question on parent pom japicmp

Posted by Richard Eckart de Castilho <re...@apache.org>.
On 19. May 2020, at 15:54, Marshall Schor <ms...@schor.com> wrote:
> 
> I see that the setting for the postAnalysisScript for japicmp was taken out of
> the uima-wide parent pom, and required to be in individual project parent poms.
> 
> What was the reason for this change?

The location of the script may differ from one project to the other. AFAIR the
location in the UIMAJ SDK is different from the location in uimaFIT.

-- Richard