Closed Munishkumar92 closed 6 months ago
I just did some changes to the pom removing all the unnecessary stuff and that builds without any problem locally You have no tests so I removed almost all the test dependencies
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.80</version>
<relativePath />
</parent>
<groupId>io.jenkins.plugins</groupId>
<artifactId>leapwork</artifactId>
<version>${revision}${changelist}</version>
<packaging>hpi</packaging>
<properties>
<revision>4.0.10</revision>
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/leapwork-plugin</gitHubRepo>
<!-- Baseline Jenkins version you use to build the plugin. Users must have
this version or newer to run. -->
<jenkins.version>2.440.1</jenkins.version>
<gitHubRepo>jenkinsci/leapwork-plugin</gitHubRepo>
</properties>
<name>Leapwork</name>
<url>https://github.com/${gitHubRepo}</url>
<dependencyManagement>
<dependencies>
<dependency>
<!-- Pick up common dependencies for the selected LTS line: https://github.com/jenkinsci/bom#usage -->
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.440.x</artifactId>
<version>2815.vf5d6f093b_23e</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.ning</groupId>
<artifactId>async-http-client</artifactId>
<version>1.9.40</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>gson-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>3.0.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.32</version>
<scope>test</scope>
</dependency>
</dependencies>
<licenses>
<license>
<name>MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
</license>
</licenses>
<!-- If you want this to appear on the plugin site page: -->
<developers>
<developer>
<name>Leapwork DevOps</name>
<email>prioritysupport@leapwork.com</email>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/${gitHubRepo}</connection>
<developerConnection>scm:git:git@github.com:${gitHubRepo}.git</developerConnection>
<url>https://github.com/${gitHubRepo}</url>
<tag>leapwork-4.0.5</tag>
</scm>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
</project>
I suggest you try out the pom that I posted. It works fine locally and will work fine on ci.jenkins.io
your build fails on ci.jenkins.io because it is built with java8. But you need this to run with java11. You should first adjust the Jenkinsfile in a separate PR and merge it and then this PR should start working fine
buildPlugin(
useContainerAgent: true,
configurations: [
[platform: 'linux', jdk: 11]
])
you will need to do the change to the Jenkinsfile in a separate PR and merge it first. ci.jenkins.io is always taking the Jenkinsfile from the main branch to avoid that someone can just open a PR with a Jenkinsfile that tries to do harmful things. Once this is merged, revert to the pom.xml that I provided and this PR will build successfully.
Will raise separate PR for the same
Testing done