You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Konrad Windszus <ko...@netcentric.biz> on 2017/03/29 06:44:59 UTC

Parent 30 breaks maven-scr-plugin

It seems that parent 30 breaks the usage of the maven-scr-plugin. With 29 it works. When looking at the history of the parent pom.xml (https://github.com/apache/sling/commits/trunk/parent/pom.xml) I don't really see the reason for that.
If I understand correctly reverting to parent 29 makes everything work as before. Although I do agree that we should migrate all modules in the future towards OSGi annotations and get rid of the maven-scr-plugin, having a broken maven-scr-plugin integration in parent 30 feels like a regression to me. Does anyone have a clue what the issue is with parent 30 here?
Thanks,
Konrad

Re: Parent 30 breaks maven-scr-plugin

Posted by Carsten Ziegeler <cz...@apache.org>.
Konrad Windszus wrote
> It seems that parent 30 breaks the usage of the maven-scr-plugin. With 29 it works. When looking at the history of the parent pom.xml (https://github.com/apache/sling/commits/trunk/parent/pom.xml) I don't really see the reason for that.
> If I understand correctly reverting to parent 29 makes everything work as before. Although I do agree that we should migrate all modules in the future towards OSGi annotations and get rid of the maven-scr-plugin, having a broken maven-scr-plugin integration in parent 30 feels like a regression to me. Does anyone have a clue what the issue is with parent 30 here?


I don't know the exact reason, but while this could be considered a
regression, I don't think we should regard it as one.
The solution is simple: don't blindly update to parent pom 30. There is
no need atm to do so. It's good to have a parent pom which shows latest
best practice and doesn't use the obsolete stuff anymore.

If you move to the R6 annotations, move to version 30. In the last weeks
I've already converted several projects, others have done similar. So
it's only a matter of time until we have migrated all projects.

Regards

 Carsten

-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: Parent 30 breaks maven-scr-plugin

Posted by Konrad Windszus <ko...@gmx.de>.
I found the culprit: It is https://github.com/apache/sling/commit/9b0c5e785554029de2cdf5ddc2549efe5b13e9a5
So the extra execution of maven-bundle-plugin:manifest is basically overwriting the service descriptors which are written with maven-scr-plugin with empty files. Those empty files end up in the bundle and lead to these issue. I created https://issues.apache.org/jira/browse/SLING-6746 for that.
Konrad 

> On 29 Mar 2017, at 10:55, Konrad Windszus <ko...@gmx.de> wrote:
> 
>> 
>> On 29 Mar 2017, at 10:45, Carsten Ziegeler <cz...@apache.org> wrote:
>> 
>> Konrad Windszus wrote
>>> 
>>>> On 29 Mar 2017, at 10:29, Oliver Lietz <ap...@oliverlietz.de> wrote:
>>>> 
>>>> On Wednesday 29 March 2017 08:44:59 Konrad Windszus wrote:
>>>>> It seems that parent 30 breaks the usage of the maven-scr-plugin. With 29 it
>>>>> works. When looking at the history of the parent pom.xml
>>>>> (https://github.com/apache/sling/commits/trunk/parent/pom.xml) I don't
>>>>> really see the reason for that. If I understand correctly reverting to
>>>>> parent 29 makes everything work as before. Although I do agree that we
>>>>> should migrate all modules in the future towards OSGi annotations and get
>>>>> rid of the maven-scr-plugin, having a broken maven-scr-plugin integration
>>>>> in parent 30 feels like a regression to me. Does anyone have a clue what
>>>>> the issue is with parent 30 here?
>>>> 
>>>> I guess it's one of SLING-6246, SLING-6532 or SLING-6533.
>>> 
>>> The latter two should lead to failures at compile time already (if e.g. the SCR annotations can no longer be resolved).
>>> If it is SLING-6246 that sounds like a major regression in the maven-scr-plugin itself then, which is probably worth investigating.
>> 
>> The problem is that many poms have the scr annotations as an explicit
>> dependency. So when updating to parent 30 you still have that dependency
>> and don't get compilation problems
>> 
> Right, but that shouldn't cause the regression either. So most probably the updated version of the maven-scr-plugin is just not working correctly.
>> 
>> Carsten
>> 
>> -- 
>> Carsten Ziegeler
>> Adobe Research Switzerland
>> cziegeler@apache.org


Re: Parent 30 breaks maven-scr-plugin

Posted by Konrad Windszus <ko...@gmx.de>.
> On 29 Mar 2017, at 10:45, Carsten Ziegeler <cz...@apache.org> wrote:
> 
> Konrad Windszus wrote
>> 
>>> On 29 Mar 2017, at 10:29, Oliver Lietz <ap...@oliverlietz.de> wrote:
>>> 
>>> On Wednesday 29 March 2017 08:44:59 Konrad Windszus wrote:
>>>> It seems that parent 30 breaks the usage of the maven-scr-plugin. With 29 it
>>>> works. When looking at the history of the parent pom.xml
>>>> (https://github.com/apache/sling/commits/trunk/parent/pom.xml) I don't
>>>> really see the reason for that. If I understand correctly reverting to
>>>> parent 29 makes everything work as before. Although I do agree that we
>>>> should migrate all modules in the future towards OSGi annotations and get
>>>> rid of the maven-scr-plugin, having a broken maven-scr-plugin integration
>>>> in parent 30 feels like a regression to me. Does anyone have a clue what
>>>> the issue is with parent 30 here?
>>> 
>>> I guess it's one of SLING-6246, SLING-6532 or SLING-6533.
>> 
>> The latter two should lead to failures at compile time already (if e.g. the SCR annotations can no longer be resolved).
>> If it is SLING-6246 that sounds like a major regression in the maven-scr-plugin itself then, which is probably worth investigating.
> 
> The problem is that many poms have the scr annotations as an explicit
> dependency. So when updating to parent 30 you still have that dependency
> and don't get compilation problems
> 
Right, but that shouldn't cause the regression either. So most probably the updated version of the maven-scr-plugin is just not working correctly.
> 
> Carsten
> 
> -- 
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org


Re: Parent 30 breaks maven-scr-plugin

Posted by Carsten Ziegeler <cz...@apache.org>.
Konrad Windszus wrote
> 
>> On 29 Mar 2017, at 10:29, Oliver Lietz <ap...@oliverlietz.de> wrote:
>>
>> On Wednesday 29 March 2017 08:44:59 Konrad Windszus wrote:
>>> It seems that parent 30 breaks the usage of the maven-scr-plugin. With 29 it
>>> works. When looking at the history of the parent pom.xml
>>> (https://github.com/apache/sling/commits/trunk/parent/pom.xml) I don't
>>> really see the reason for that. If I understand correctly reverting to
>>> parent 29 makes everything work as before. Although I do agree that we
>>> should migrate all modules in the future towards OSGi annotations and get
>>> rid of the maven-scr-plugin, having a broken maven-scr-plugin integration
>>> in parent 30 feels like a regression to me. Does anyone have a clue what
>>> the issue is with parent 30 here?
>>
>> I guess it's one of SLING-6246, SLING-6532 or SLING-6533.
> 
> The latter two should lead to failures at compile time already (if e.g. the SCR annotations can no longer be resolved).
> If it is SLING-6246 that sounds like a major regression in the maven-scr-plugin itself then, which is probably worth investigating.

The problem is that many poms have the scr annotations as an explicit
dependency. So when updating to parent 30 you still have that dependency
and don't get compilation problems


 Carsten

-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: Parent 30 breaks maven-scr-plugin

Posted by Konrad Windszus <ko...@gmx.de>.
> On 29 Mar 2017, at 10:29, Oliver Lietz <ap...@oliverlietz.de> wrote:
> 
> On Wednesday 29 March 2017 08:44:59 Konrad Windszus wrote:
>> It seems that parent 30 breaks the usage of the maven-scr-plugin. With 29 it
>> works. When looking at the history of the parent pom.xml
>> (https://github.com/apache/sling/commits/trunk/parent/pom.xml) I don't
>> really see the reason for that. If I understand correctly reverting to
>> parent 29 makes everything work as before. Although I do agree that we
>> should migrate all modules in the future towards OSGi annotations and get
>> rid of the maven-scr-plugin, having a broken maven-scr-plugin integration
>> in parent 30 feels like a regression to me. Does anyone have a clue what
>> the issue is with parent 30 here?
> 
> I guess it's one of SLING-6246, SLING-6532 or SLING-6533.

The latter two should lead to failures at compile time already (if e.g. the SCR annotations can no longer be resolved).
If it is SLING-6246 that sounds like a major regression in the maven-scr-plugin itself then, which is probably worth investigating.
> 
> 
> O.
> 
>> Thanks,
>> Konrad
> 


Re: Parent 30 breaks maven-scr-plugin

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Wednesday 29 March 2017 08:44:59 Konrad Windszus wrote:
> It seems that parent 30 breaks the usage of the maven-scr-plugin. With 29 it
> works. When looking at the history of the parent pom.xml
> (https://github.com/apache/sling/commits/trunk/parent/pom.xml) I don't
> really see the reason for that. If I understand correctly reverting to
> parent 29 makes everything work as before. Although I do agree that we
> should migrate all modules in the future towards OSGi annotations and get
> rid of the maven-scr-plugin, having a broken maven-scr-plugin integration
> in parent 30 feels like a regression to me. Does anyone have a clue what
> the issue is with parent 30 here?

I guess it's one of SLING-6246, SLING-6532 or SLING-6533.

O.

> Thanks,
> Konrad