Open zx-cyber opened 4 years ago
jdk不匹配,我用的是1.7
Unable to load the mojo 'migrate' in the plugin 'org.flywaydb:flyway-maven-plugin:5.2.4' due to an API incompatibility: org.codehaus.plexus.component.repository. exception.ComponentLookupException: org/flywaydb/maven/MigrateMojo : Unsupported major.minor version 52.0
错误提示比较明显,是版本不兼容,建议切换一下版本
那安装哪个版本就行呢?
[WARNING] Error injecting: org.flywaydb.maven.MigrateMojo java.lang.TypeNotPresentException: Type org.flywaydb.maven.MigrateMojo not present at org.eclipse.sisu.space.URLClassSpace.loadClass (URLClassSpace.java:147) at org.eclipse.sisu.space.NamedClass.load (NamedClass.java:46) at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48) at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85) at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter .java:57) at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.jav a:112) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.jav a:127) at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66) at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61) at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java: 47) at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050) at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162) at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81) at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51) at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263) at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
a:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356) Caused by: java.lang.UnsupportedClassVersionError: org/flywaydb/maven/MigrateMojo : Unsupported major.minor version 52.0
.java:57) at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.jav a:112) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.jav a:127) at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66) at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61) at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java: 47) at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050) at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162) at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81) at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51) at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263) at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
a:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.553 s [INFO] Finished at: 2020-02-14T20:16:11+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:5.2.4:migrate (default-cli) on project community: Execut ion default-cli of goal org.flywaydb:flyway-maven-plugin:5.2.4:migrate failed: Unable to load the mojo 'migrate' in the plugin 'org.flywaydb:flyway-maven-plugin:5.2.4' due to an API incompatibility: org.codehaus.plexus.component.repository. exception.ComponentLookupException: org/flywaydb/maven/MigrateMojo : Unsupported major.minor version 52.0 [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.flywaydb:flyway-maven-plugin:5.2.4 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/E:/program/apache-maven-3.6.0-bin/Repository/org/flywaydb/flyway-maven-plugin/5.2.4/flyway-maven -plugin-5.2.4.jar [ERROR] urls[1] = file:/E:/program/apache-maven-3.6.0-bin/Repository/mysql/mysql-connector-java/5.1.45/mysql-connector-j ava-5.1.45.jar [ERROR] urls[2] = file:/E:/program/apache-maven-3.6.0-bin/Repository/com/h2database/h2/1.4.199/h2-1.4.199.jar [ERROR] urls[3] = file:/E:/program/apache-maven-3.6.0-bin/Repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-injec t-bean-1.4.2.jar [ERROR] urls[4] = file:/E:/program/apache-maven-3.6.0-bin/Repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7 -noaop.jar [ERROR] urls[5] = file:/E:/program/apache-maven-3.6.0-bin/Repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7 .jar [ERROR] urls[6] = file:/E:/program/apache-maven-3.6.0-bin/Repository/org/codehaus/plexus/plexus-interpolation/1.14/plexu s-interpolation-1.14.jar [ERROR] urls[7] = file:/E:/program/apache-maven-3.6.0-bin/Repository/org/codehaus/plexus/plexus-component-annotations/1. 5.5/plexus-component-annotations-1.5.5.jar [ERROR] urls[8] = file:/E:/program/apache-maven-3.6.0-bin/Repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexu s-sec-dispatcher-1.4.jar [ERROR] urls[9] = file:/E:/program/apache-maven-3.6.0-bin/Repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher -1.4.jar [ERROR] urls[10] = file:/E:/program/apache-maven-3.6.0-bin/Repository/org/codehaus/plexus/plexus-utils/1.5.15/plexus-uti ls-1.5.15.jar [ERROR] urls[11] = file:/E:/program/apache-maven-3.6.0-bin/Repository/org/flywaydb/flyway-core/5.2.4/flyway-core-5.2.4.j ar [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] [ERROR] [ERROR] -----------------------------------------------------