Getting following issue while jenkins build
14:31:52 java.lang.TypeNotPresentException: Type org.jenkinsci.maven.plugins.hpi.ValidateMojo not present
14:31:52 at org.eclipse.sisu.space.URLClassSpace.loadClass (URLClassSpace.java:147)
14:31:52 at org.eclipse.sisu.space.NamedClass.load (NamedClass.java:46)
14:31:52 at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
14:31:52 at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
14:31:52 at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
14:31:52 at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
14:31:52 at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
14:31:52 at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
14:31:52 at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
14:31:52 at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
14:31:52 at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
14:31:52 at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
14:31:52 at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
14:31:52 at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
14:31:52 at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
14:31:52 at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
14:31:52 at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
14:31:52 at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
14:31:52 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
14:31:52 at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
14:31:52 at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
14:31:52 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
14:31:52 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
14:31:52 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
14:31:52 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
14:31:52 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
14:31:52 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
14:31:52 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
14:31:52 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
14:31:52 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
14:31:52 at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
14:31:52 at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
14:31:52 at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
14:31:52 at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
14:31:52 at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
14:31:52 at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
14:31:52 at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
14:31:52 at java.lang.reflect.Method.invoke (Method.java:498)
14:31:52 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
14:31:52 at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
14:31:52 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
14:31:52 at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
14:31:52 Caused by: java.lang.UnsupportedClassVersionError: org/jenkinsci/maven/plugins/hpi/ValidateMojo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
14:31:52 at java.lang.ClassLoader.defineClass1 (Native Method)
14:31:52 at java.lang.ClassLoader.defineClass (ClassLoader.java:756)
14:31:52 at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:142)
14:31:52 at java.net.URLClassLoader.defineClass (URLClassLoader.java:473)
14:31:52 at java.net.URLClassLoader.access$100 (URLClassLoader.java:74)
14:31:52 at java.net.URLClassLoader$1.run (URLClassLoader.java:369)
14:31:52 at java.net.URLClassLoader$1.run (URLClassLoader.java:363)
14:31:52 at java.security.AccessController.doPrivileged (Native Method)
14:31:52 at java.net.URLClassLoader.findClass (URLClassLoader.java:362)
14:31:52 at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf (ClassRealm.java:425)
14:31:52 at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (SelfFirstStrategy.java:42)
14:31:52 at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass (ClassRealm.java:271)
14:31:52 at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:247)
14:31:52 at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:239)
14:31:52 at org.eclipse.sisu.space.URLClassSpace.loadClass (URLClassSpace.java:139)
14:31:52 at org.eclipse.sisu.space.NamedClass.load (NamedClass.java:46)
14:31:52 at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
14:31:52 at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
14:31:52 at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
14:31:52 at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
14:31:52 at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
14:31:52 at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
14:31:52 at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
14:31:52 at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
14:31:52 at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
14:31:52 at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
14:31:52 at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
14:31:52 at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
14:31:52 at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
14:31:52 at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
14:31:52 at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
14:31:52 at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
14:31:52 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
14:31:52 at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
14:31:52 at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
14:31:52 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
14:31:52 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
14:31:52 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
14:31:52 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
14:31:52 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
14:31:52 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
14:31:52 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
14:31:52 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
14:31:52 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
14:31:52 at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
14:31:52 at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
14:31:52 at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
14:31:52 at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
14:31:52 at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
14:31:52 at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
14:31:52 at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
14:31:52 at java.lang.reflect.Method.invoke (Method.java:498)
14:31:52 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
14:31:52 at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
14:31:52 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
14:31:52 at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Need help to solve above issue as this is not happening on local system
It seems issue with java version need to set to 11