Trouble building LDAP plugin


This might not be the best place for this question but seemed like where the experience base would be. :slight_smile:

I’m helping the team that runs our Jenkins instance move to LDAP authentication and we ran into a situation where it would fail some users due to the LDAP management stack being used uses pwdLockout to mean something different than the plugin assumes. It was decided that the more practical solution was to manage a copy of the plugin that handles that check differently. Easy enough, just changing a string constant.

However, using the instructions, it seems to fail to build? I expect this is because there is some expectation I don’t have that it has for running the tests:

[ERROR]  Time elapsed: 99.408 s  <<< FAILURE!
java.lang.AssertionError: hnelson should not be able to login because there is a broken server in between
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.base/java.lang.reflect.Method.invoke(
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(
	at org.junit.internal.runners.statements.RunBefores.evaluate(
	at org.junit.rules.ExternalResource$1.evaluate(
	at org.jvnet.hudson.test.JenkinsRule$1.evaluate(
	at org.junit.internal.runners.statements.FailOnTimeout$
	at org.junit.internal.runners.statements.FailOnTimeout$
	at java.base/
	at java.base/

Any pointers?

Apache Maven 3.8.5 (Red Hat 3.8.5-3)
Maven home: /usr/share/maven
Java version: 17.0.7, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-17-openjdk-
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.3.8-100.fc37.x86_64", arch: "amd64", family: "unix"

Which instructions did you follow? Starting with a fresh clone of the repository using

  • maven 3.9.3 (the same version which we use to build plugins on at the moment)
  • openjdk version “20.0.1” 2023-04-18
  • MacOS 13.4.1 (c)

building with the arguments mvn clean verify package, I get a successful result.

That’s fair. I used the instructions in the plugin readme.

How to install


	mvn clean package

to create the plugin `.hpi` file.

mvn clean verify gave me the same failure.

I will see about updating versions to match your build environment and see if maybe it’s handling an error differently in these slightly staler versions that Fedora provides.

Thank you for the response.


$ ../apache-maven-3.9.3/bin/mvn -v
Apache Maven 3.9.3 (21122926829f1ead511c958d89bd2f672198ae9f)
Maven home: /home/dbolack/Checkouts/apache-maven-3.9.3
Java version: 20.0.1, vendor: Oracle Corporation, runtime: /home/dbolack/Checkouts/jdk-20.0.1
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.3.8-100.fc37.x86_64", arch: "amd64", family: "unix"

No change. Makes me wonder if I need more of something in my environment.

I stepped back off of HEAD and used the target listed on the last release and no change there.

The test failure is likely specific to your local environment, though I suspect that the plugin maintainers will be interested to hear what you learn when you determine what it is about your environment that causes the test to fail.

Tests pass on my Red Hat Enterprise Linux 8 machine with Maven 3.8.5 (downloaded from Apache) and Eclipse Temurin Java 11.0.19. Tests pass on with Maven 3.9.3 and Eclipse Temurin Java 11.0.19.

The failing test may indicate that something in your configuration is causing a login in the automated test to succeed when the test expected it to fail. The test intentionally inserts an unresponsive server into the LDAP configuration and then asserts that the login should fail. In your environment, the login succeeds unexpectedly.