Add support for building on JDK15 80/95380/6
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 28 Feb 2021 10:17:38 +0000 (11:17 +0100)
committerStephen Kitt <skitt@redhat.com>
Fri, 19 Mar 2021 14:12:26 +0000 (14:12 +0000)
Current version of SpotBugs does not work on JDK15, hence disable
it when we detect JDK15 build environment.

Also, maven-bundle-plugin fails in bndlib, as reported in
https://github.com/bndtools/bnd/issues/3903.

Change-Id: Ie38e7b81d3eff030b0f7f135666dc3cc91c4d8a7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
karaf/karaf-branding/pom.xml
odlparent/pom.xml
single-feature-parent/pom.xml

index 9fa86edc64b99bf759922ea24de1aa54eb7a3a7a..4487ed2ab26cc599f258c38c754fb6f6a2099ebe 100644 (file)
             <Spring-Context>*;public-context:=false</Spring-Context>
           </instructions>
         </configuration>
+        <dependencies>
+            <dependency>
+                <groupId>biz.aQute.bnd</groupId>
+                <artifactId>biz.aQute.bndlib</artifactId>
+                <version>5.1.0</version>
+            </dependency>
+        </dependencies>
       </plugin>
     </plugins>
   </build>
index 114a06d25fe197ec29b78fc194a305a88e75c8d2..7314ab6379df9a2c837f568b4cef4316bed747a8 100644 (file)
           </executions>
         </plugin>
 
+        <plugin>
+          <groupId>com.github.ekryd.echo-maven-plugin</groupId>
+          <artifactId>echo-maven-plugin</artifactId>
+          <version>1.3.0</version>
+        </plugin>
+
         <plugin>
           <groupId>org.apache.felix</groupId>
           <artifactId>maven-bundle-plugin</artifactId>
               <_removeheaders>Import-Service,Export-Service</_removeheaders>
             </instructions>
           </configuration>
+          <dependencies>
+            <dependency>
+              <groupId>biz.aQute.bnd</groupId>
+              <artifactId>biz.aQute.bndlib</artifactId>
+              <version>5.1.0</version>
+            </dependency>
+          </dependencies>
         </plugin>
 
         <plugin>
     </plugins>
   </build>
 
+  <profiles>
+    <profile>
+      <id>disable-spotbugs</id>
+      <activation>
+        <!-- Current spotbugs does not support JDK15+ -->
+        <jdk>[15,)</jdk>
+      </activation>
+
+      <properties>
+        <odlparent.spotbugs.skip>true</odlparent.spotbugs.skip>
+      </properties>
+
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.github.ekryd.echo-maven-plugin</groupId>
+            <artifactId>echo-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>UNTESTED-JDK</id>
+                <goals>
+                  <goal>echo</goal>
+                </goals>
+                <phase>test</phase>
+                <configuration>
+                  <message>Running on JDK newer than 11, which is not supported. Skipping SpotBugs execution.</message>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
   <reporting>
     <plugins>
       <plugin>
index 2efcddea45b5cf4a9c38612c9c2e3d501d612d7c..696bb8af6f857ea9c5f724c1b05578309358efbf 100644 (file)
                     <plugin>
                         <groupId>com.github.ekryd.echo-maven-plugin</groupId>
                         <artifactId>echo-maven-plugin</artifactId>
-                        <version>1.3.0</version>
                         <executions>
                             <execution>
                                 <id>UNTESTED-JDK</id>