Upgrade pax-url-aether version to 2.4.7 for karaf 4.0.3

Upgrade pax-url-aether version to 2.4.7 for karaf 4.0.3

talend-esb/pom.xml

  • add version variable
    <pax-url-aether.version>2.4.7</pax-url-aether.version>
  • add dependency
<!-- workaround for pax-url-aether bundle (TESB-17522) -->
<dependency>
    <groupId>org.ops4j.pax.url</groupId>
    <artifactId>pax-url-aether</artifactId>
    <version>${pax-url-aether.version}</version>
    <type>jar</type>
</dependency>
  • add copy jar in generate-resources phase
<artifactItem>
    <groupId>org.ops4j.pax.url</groupId>
    <artifactId>pax-url-aether</artifactId>
    <version>${pax-url-aether.version}</version>
    <type>jar</type>
    <outputDirectory>target/dependencies</outputDirectory>
    <destFileName>pax-url-aether-${pax-url-aether.version}.jar</destFileName>
</artifactItem>
  • add replace version in generate-resources phase for framework-${karaf.version}-features.xml file
<!-- patch for Karaf org.apache.karaf.features.core bundle -->
<replace file="target/dependencies/framework-${karaf.version}-features.xml">
    <replacefilter
        token="org.apache.karaf.features/org.apache.karaf.features.core/${karaf.version}&lt;"
        value="org.apache.karaf.features/org.apache.karaf.features.core/${karaf.version}/jar/TESB&lt;"/>
    <!-- patch for upgrading pax-url-aether to 2.4.7 (TESB-17522) -->
    <replacefilter
        token="mvn:org.ops4j.pax.url/pax-url-aether/2.4.3"
        value="mvn:org.ops4j.pax.url/pax-url-aether/${pax-url-aether.version}"/>
</replace>
  • add repo dependencies in pom
<repository>
    <id>ops4j.sonatype.releases</id>
    <name>OPS4J releases repository</name>
    <url>https://oss.sonatype.org/content/repositories/ops4j-releases/</url>
    <releases>
        <enabled>true</enabled>
    </releases>
    <snapshots>
        <enabled>false</enabled>
    </snapshots>
</repository>

talend-esb/src/main/descriptors/unix-bin.xml and talend-esb/src/main/descriptors/win-bin.xml

  • exclude startup.properties file <exclude>etc/startup.properties</exclude>
  • copy jar into local repo
<!-- pax-url-aether library patch (TESB-17522) -->
<file>
    <source>${basedir}/target/dependencies/pax-url-aether-${pax-url-aether.version}.jar</source>
    <outputDirectory>/container/system/org/ops4j/pax/url/pax-url-aether/${pax-url-aether.version}/</outputDirectory>
    <fileMode>0644</fileMode>
</file>    

talend-esb/src/main/filtered-resources/etc/org.ops4j.pax.url.mvn.cfg

  • add always param in the cfg file for maven
    org.ops4j.pax.url.mvn.globalUpdatePolicy=always

talend-esb/src/main/filtered-resources/etc/startup.properties

  • add mvn\:org.ops4j.pax.url/pax-url-aether/2.4.7 = 5 in this file

https://github.com/Talend/tesb-rt-se/commit/a72e35789b1d3a33d8b97b641d25f4df8b0ab8ea

标签: none

添加新评论