The Jenkins project recommends that users transition from the Maven job type to use Pipeline jobs or freestyle jobs. The risks of choosing to use that job type are described in the maven plugin documentation.
Having said that, I think that you've made some mistake in your configuration. When I attempted to duplicate the problem as you reported it, I was unable to duplicate the problem as you reported it. I see a failure message, but it is a very different failure message than the message that you reported.
It appears that Apache Maven 4.0.0-alpha-3 does not have the same Java classes that are available in Apache Maven 3.8.6 and earlier. Replace your maven job types with Pipeline jobs or freestyle jobs
Freestyle job works with Apache Maven 4.0.0-alpha-3
I confirmed that a freestyle job is able to use Apache Maven 4.0.0-alpha-3 with the following steps:
- Define a maven tool installer named "maven-4.0.0-alpha-3" and configure it to download the zip file from https://dlcdn.apache.org/maven/maven-4/4.0.0-alpha-3/binaries/apache-maven-4.0.0-alpha-3-bin.zip
- Define a freestyle job that clones https://github.com/jenkins-docs/simple-java-maven-app.git and runs a maven build step using the "maven-4.0.0-alpha-3" tool
- Run the freestyle job and confirm that the build is successful
Maven job fails with no such method error
I confirmed that a maven integration job type fails with the following steps:
- Define a maven tool installer named "maven-4.0.0-alpha-3" and configure it to download the zip file from https://dlcdn.apache.org/maven/maven-4/4.0.0-alpha-3/binaries/apache-maven-4.0.0-alpha-3-bin.zip
- Define a maven integration job that clones https://github.com/jenkins-docs/simple-java-maven-app.git using the "maven-4.0.0-alpha-3" tool and targets "clean verify"
- Run the maven job and confirm that the build fails. The failure message looks like this:
The Jenkins project recommends that users transition from the Maven job type to use Pipeline jobs or freestyle jobs. The risks of choosing to use that job type are described in the maven plugin documentation.
Having said that, I think that you've made some mistake in your configuration. When I attempted to duplicate the problem as you reported it, I was unable to duplicate the problem as you reported it. I see a failure message, but it is a very different failure message than the message that you reported.
It appears that Apache Maven 4.0.0-alpha-3 does not have the same Java classes that are available in Apache Maven 3.8.6 and earlier. Replace your maven job types with Pipeline jobs or freestyle jobs
Freestyle job works with Apache Maven 4.0.0-alpha-3
I confirmed that a freestyle job is able to use Apache Maven 4.0.0-alpha-3 with the following steps:
Maven job fails with no such method error
I confirmed that a maven integration job type fails with the following steps: