Avoid pulling old versions 42/79242/4
authorStephen Kitt <skitt@redhat.com>
Fri, 4 Jan 2019 16:54:10 +0000 (17:54 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 7 Jan 2019 12:33:46 +0000 (13:33 +0100)
This uses karaf-plugin’s ability to resolve patched features to
upgrade the versions of javax.mail, commons-beanutils, commons-codec
and aries.util pulled in by Karaf and Pax.

We need to change the order of steps in karaf4-parent so that the
Karaf assembly is processed first, then the resources overwritten with
our versions, before karaf-plugin resolves the dependencies.

JIRA: ODLPARENT-189
Change-Id: Id78d7301bd402bc6872fe8a696af9ddc734cbe8d
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
karaf/karaf4-parent/pom.xml
karaf/opendaylight-karaf-resources/pom.xml

index 37d7f7498b6d9b5144db22e10ec04082e0bc03e8..449f1e9102619b067a1694c0a3fa4f1a61b9c9fc 100644 (file)
                     <skip>true</skip>
                 </configuration>
             </plugin>
-            <plugin>
-                <groupId>org.opendaylight.odlparent</groupId>
-                <artifactId>karaf-plugin</artifactId>
-                <version>4.0.8-SNAPSHOT</version>
-                <executions>
-                    <execution>
-                        <id>populate-local-repo</id>
-                        <phase>prepare-package</phase>
-                        <goals>
-                            <goal>populate-local-repo</goal>
-                        </goals>
-                        <configuration>
-                            <localRepo>${project.build.directory}/assembly/system</localRepo>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.opendaylight.odlparent</groupId>
+                <artifactId>karaf-plugin</artifactId>
+                <version>4.0.8-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <id>populate-local-repo</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>populate-local-repo</goal>
+                        </goals>
+                        <configuration>
+                            <localRepo>${project.build.directory}/assembly/system</localRepo>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
             <plugin>
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
index e63983c533770f85d293b435a4622f5ce57d8897..b61148aa440af35642aa5006a329ada39d64b248 100644 (file)
                 <patch patchfile="${project.basedir}/src/main/patches/karaf-quiesce-${karaf.version}.patch"
                        originalfile="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
                        failonerror="true"/>
+                <replace file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
+                         token="commons-codec/commons-codec/1.10" value="commons-codec/commons-codec/1.11" failOnNoReplacements="true"/>
                 <copy file="${project.build.directory}/assembly/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"
                       tofile="${project.build.directory}/classes/system/org/apache/karaf/features/standard/${karaf.version}/standard-${karaf.version}-features.xml"/>
+                <replace file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.2.5/pax-web-features-7.2.5-features.xml"
+                         token="commons-beanutils/commons-beanutils/1.8.3" value="commons-beanutils/commons-beanutils/1.9.3" failOnNoReplacements="true"/>
+                <replace file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.2.5/pax-web-features-7.2.5-features.xml"
+                         token="commons-codec/commons-codec/1.8" value="commons-codec/commons-codec/1.11" failOnNoReplacements="true"/>
+                <replace file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.2.5/pax-web-features-7.2.5-features.xml"
+                         token="javax.mail/mail/1.4.4" value="javax.mail/mail/1.4.7" failOnNoReplacements="true"/>
+                <replace file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.2.5/pax-web-features-7.2.5-features.xml"
+                         token="org.apache.aries/org.apache.aries.util/1.1.0" value="org.apache.aries/org.apache.aries.util/1.1.3" failOnNoReplacements="true"/>
+                <copy file="${project.build.directory}/assembly/system/org/ops4j/pax/web/pax-web-features/7.2.5/pax-web-features-7.2.5-features.xml"
+                      tofile="${project.build.directory}/classes/system/org/ops4j/pax/web/pax-web-features/7.2.5/pax-web-features-7.2.5-features.xml"/>
                 <!-- Add startup bundles to startup.properties — order is significant, bundles are wired in declaration order -->
                 <echo file="${project.build.directory}/assembly/etc/startup.properties" append="true">
 # The following are added by opendaylight-karaf-resources