[
https://issues.apache.org/jira/browse/FELIX-6549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Konrad Windszus updated FELIX-6549:
-----------------------------------
Summary: Service descriptor XMLs contain empty lines with JRE 11 (was:
Service descriptor XMLs contain empty lines with maven-bundle-plugin 5.1.7)
> Service descriptor XMLs contain empty lines with JRE 11
> -------------------------------------------------------
>
> Key: FELIX-6549
> URL: https://issues.apache.org/jira/browse/FELIX-6549
> Project: Felix
> Issue Type: Bug
> Components: SCR Tooling
> Affects Versions: scr bnd plugin 1.9.6
> Reporter: Konrad Windszus
> Priority: Major
>
> When the SCR Bnd Plugin is used with a recent Bnd version (6.3.1) used in
> maven-bundle-plugin 5.1.7 the service descriptor XMLs contain a lot of empty
> lines:
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
> name="org.apache.jackrabbit.oak.composite.CrossMountReferenceValidatorProvider"
> configuration-policy="require" activate="activate">
>
> <property name="type" value="crossMountRefValidator"/>
>
> <property name="failOnDetection" type="Boolean" value="true"/>
>
> <service servicefactory="false">
>
> <provide
> interface="org.apache.jackrabbit.oak.spi.commit.ValidatorProvider"/>
>
> <provide
> interface="org.apache.jackrabbit.oak.spi.commit.EditorProvider"/>
>
> </service>
>
> <reference name="mountInfoProvider"
> interface="org.apache.jackrabbit.oak.spi.mount.MountInfoProvider"
> cardinality="1..1" policy="static" bind="bindMountInfoProvider"
> unbind="unbindMountInfoProvider"/>
>
> <implementation
> class="org.apache.jackrabbit.oak.composite.CrossMountReferenceValidatorProvider"/>
>
> </scr:component>
> {code}
> With Bnd 5.1.1 (used in maven-bundle-plugin 5.1.1) the XML looked like this
> with the same version of the Bnd SCR plugin
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
> name="org.apache.jackrabbit.oak.composite.CrossMountReferenceValidatorProvider"
> configuration-policy="require" activate="activate">
> <property name="type" value="crossMountRefValidator"/>
> <property name="failOnDetection" type="Boolean" value="true"/>
> <service servicefactory="false">
> <provide
> interface="org.apache.jackrabbit.oak.spi.commit.ValidatorProvider"/>
> <provide
> interface="org.apache.jackrabbit.oak.spi.commit.EditorProvider"/>
> </service>
> <reference name="mountInfoProvider"
> interface="org.apache.jackrabbit.oak.spi.mount.MountInfoProvider"
> cardinality="1..1" policy="static" bind="bindMountInfoProvider"
> unbind="unbindMountInfoProvider"/>
> <implementation
> class="org.apache.jackrabbit.oak.composite.CrossMountReferenceValidatorProvider"/>
> </scr:component>
> {code}
> It seems that a different SAX {{Transformer}} is returned at
> https://github.com/apache/felix-dev/blob/28b4c77883b8dbdea06e723dc4e5a3eba7393f34/tools/org.apache.felix.scr.generator/src/main/java/org/apache/felix/scrplugin/xml/IOUtils.java#L70
> which already emits the newlines due to the "INDENT" flag. Maybe Bnd embeds
> one, because I reproduced with the same JRE 11.0.15.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)