Skip to content

The android-signing plugin can't be updated #1020

@gounthar

Description

@gounthar

Plugin Modernizer version

1799.ve87ce10f0ed2

What Operating System are you using

Windows 11

Reproduction steps

plugin-modernizer.cmd run --plugins android-signing --recipe UpgradeToLatestJava8CoreVersion
Run Plugin Modernizer
Fetching plugin code locally android-signing...
Fetched repository from https://github.com/jenkinsci/android-signing-plugin.git to branch refs/heads/master
Collecting metadata for plugin android-signing... Please be patient
Build failed
Done
Failed to collect metadata for plugin android-signing. Will retry after a first compile using lowest JDK
Quick build without tests android-signing using with JDK 8 ... Please be patient
Done
Collecting metadata for plugin android-signing... Please be patient
Build failed
Done
Object does not exist in source cache at C:\Users\User\.cache\jenkins-plugin-modernizer-cli\android-signing\sources\target\.\plugin-metadata
{"key":"plugin-metadata","path":"."}
*************
Plugin: android-signing
Error: Build failed
*************

The error I see in the logs is:

2025-05-22T07:20:13.431Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [INFO] ------------------------------------------------------------------------
2025-05-22T07:20:13.432Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.1:javadoc (default) on project android-signing: An error has occurred in JavaDocs report generation:
2025-05-22T07:20:13.432Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [ERROR] Exit code: 1 - Loading source files for package org.jenkinsci.plugins.androidsigning...
2025-05-22T07:20:13.432Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [ERROR] Constructing Javadoc information...
2025-05-22T07:20:13.432Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [ERROR] C:\Users\User\.cache\jenkins-plugin-modernizer-cli\android-signing\sources\src\main\java\org\jenkinsci\plugins\androidsigning\SignedApkMappingStrategy.java:3: error: package com.sun.org.apache.xpath.internal.operations is not visible
2025-05-22T07:20:13.432Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [ERROR] import com.sun.org.apache.xpath.internal.operations.Bool;
2025-05-22T07:20:13.432Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [ERROR]                                         ^
2025-05-22T07:20:13.432Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [ERROR]   (package com.sun.org.apache.xpath.internal.operations is declared in module java.xml, which does not export it)
2025-05-22T07:20:13.433Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [ERROR] 1 error
2025-05-22T07:20:13.433Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [ERROR]
2025-05-22T07:20:13.433Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [ERROR] Command line was: C:\Users\User\.cache\jenkins-plugin-modernizer-cli\.jdks\plugin-modernizer-jdk-17\bin\javadoc.exe @options @packages
2025-05-22T07:20:13.433Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [ERROR]
2025-05-22T07:20:13.433Z [INFO] [Thread=StreamPumper-systemOut] - i.j.t.p.core.impl.MavenInvoker # [ERROR] Refer to the generated Javadoc files in 'C:\Users\User\.cache\jenkins-plugin-modernizer-cli\android-signing\sources\target\site\apidocs' dir.

I've tried tons of different maven options on the command line to get rid of this problem,

Maven Command-Line Options Attempted for JDK 17 Compatibility

1. Initial Combined Approach (Failed)
mvn clean install \
  -DargLine="--add-opens java.xml/com.sun.org.apache.xpath.internal=ALL-UNNAMED" \
  -Djavadoc.opts="--add-opens java.xml/com.sun.org.apache.xpath.internal=ALL-UNNAMED"
2. Javadoc-Specific Fix (Failed)
mvn clean install \
  -Dmaven.javadoc.additionalparam="--add-opens java.xml/com.sun.org.apache.xpath.internal=ALL-UNNAMED"
3. MAVEN_OPTS Approach (Failed)
MAVEN_OPTS="--add-opens java.xml/com.sun.org.apache.xpath.internal=ALL-UNNAMED" \
mvn clean install \
  -DjavadocExecutable="$(which javadoc) --add-opens java.xml/com.sun.org.apache.xpath.internal=ALL-UNNAMED"
4. Skip Javadoc (Partial Success)

mvn clean install -Dmaven.javadoc.skip=true

5. Full JDK 17 Configuration
mvn clean install \
  -Dmaven.compiler.source=17 \
  -Dmaven.compiler.target=17 \
  -Dmaven.compiler.release=17 \
  -Dmaven.javadoc.skip=true \
  -Dmaven.compiler.fork=true \
  -Dmaven.compiler.compilerArgs="--add-opens java.xml/com.sun.org.apache.xpath.internal=ALL-UNNAMED"
6. Minimal Workaround
mvn clean install \
  -Dmaven.compiler.fork=false \
  -Dmaven.javadoc.skip=true \
  -DskipTests

I know the obvious workaround would be to modify the Java file directly, but I was trying to find a workaround in order to be able to apply a basic recipe.

Expected Results

No error, as the plugin compiles successfully with JDK8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions