Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Removed GSON jar dependency and added plugin dependency #1655

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<argLine>-Djava.awt.headless=true -Xmx1024m -Djenkins.test.timeout=1000 --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED</argLine>

<prism-api.version>1.29.0-8</prism-api.version>
<jenkins.version>2.414.1</jenkins.version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gson-api need minimum 2.401.3. Not 2.414.1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had done tried both the comments.

In this case, I get the error:

[ERROR] Failed to execute goal org.jenkins-ci.tools:maven-hpi-plugin:3.50:validate-hpi (default-validate-hpi) on project warnings-ng: Dependency io.jenkins:configuration-as-code:jar:1714.v09593e830cfa requires Jenkins 2.414.1 or higher.


</properties>

Expand Down Expand Up @@ -181,9 +182,9 @@
<artifactId>apache-httpcomponents-client-4-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<groupId>io.jenkins.plugins</groupId>
<artifactId>gson-api</artifactId>
<version>2.10.1-15.v0d99f670e0a_7</version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't include version if part of bom

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remove the version I get the following error:

[ERROR]   The project io.jenkins.plugins:warnings-ng:10.7.0-SNAPSHOT (C:\Users\tiwar\open-source\warnings-ng-plugin\plugin\pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for io.jenkins.plugins:gson-api:jar is missing. @ io.jenkins.plugins:warnings-ng:${revision}${changelist}, 

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So use a bom version that include gson-api. Is part of bom since something like 1 month

</dependency>

<!-- Optional Jenkins Plug-in Dependencies -->
Expand Down Expand Up @@ -505,6 +506,18 @@
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.426.x</artifactId>
<version>2555.v3190a_8a_c60c6</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
Expand Down
Loading