Closed mac2000 closed 2 years ago
Hi @mac2000
It's a configuration error. please could you share your actual configuration ?
Hm, it was taken from sample
and the only things I have changed were:
comment out parent project
provide concrete version
here is full file
4.0.0 com.github.aoudiamoncef apollo-client-maven-plugin-parent 4.0.4 apollo-client-maven-plugin-tests jar apollo-client-maven-plugin-tests Test for maven plugin https://github.com/aoudiamoncef/apollo-client-maven-plugin true true com.apollographql.apollo apollo-runtime org.jetbrains annotations com.fasterxml.jackson.core jackson-databind test com.graphql-java graphql-java-tools test com.graphql-java graphql-java-servlet test io.undertow undertow-core test io.undertow undertow-servlet test org.assertj assertj-core test org.junit.jupiter junit-jupiter test org.slf4j slf4j-simple test src/test/kotlin com.github.aoudiamoncef apollo-client-maven-plugin 4.0.4 generate true true ${project.basedir}/src/main/graphql/books ${project.basedir}/src/main/graphql/books/schema.json **/*.graphql **/*.gql **/*.json **/*.sdl" **/*.kakah books ${project.build.directory}/generated-sources/graphql-client/books/ true ${project.build.directory}/generated/operationOutput/apollo/books/operationOutput.json ${project.basedir}/src/main/graphql/books/ true true false true java.lang.Long com.apollographql.apollo.compiler.OperationIdGenerator$Sha256 false true ANNOTATED true false true com.lahzouz.apollo.graphql.client false true ${project.build.directory}/generated/metadata/apollo/books/metadata.json false false ${project.basedir}/src/main/graphql/books/schema.json 10 10 10 false false false org.jetbrains.kotlin kotlin-maven-plugin ${java.version} compile process-sources compile test-compile test-compile test-compile org.apache.maven.plugins maven-surefire-plugin false
.m2
repository <!--Auto configuration-->
<books-api></books-api>
There is an error in plugin configuration which makes the binding between XML and Objects configuration impossible.
So, attempt number one - minimal configuration without cleaning up m2 cache - same results
Second attempt was, close idea, delete m2, reopen idea and rerun maven task unfortunately results are also the same
As you can see from screenshot idea did download everything from scratch but error still occurred
What is even worse now I totally confused with empty config we should not have problems with mapping mojos
Try to use JDK 8 and Kotlin 1.4 and rebuild. Test dependencies are old, I'll improve tests with the release of Apollo complier 3.0 soon.
Any update on this issue? I have the same problem after update from 3.3.1
to 4.0.4
. With the former version I didn't have this problem. I use OpenJDK 11.
Just in case I am attaching the full stacktrace:
[ERROR] Failed to execute goal com.github.aoudiamoncef:apollo-client-maven-plugin:4.0.3:generate (default) on project my-connector: Execution default of goal com.github.aoudiamoncef:apollo-client-maven-plugin:4.0.3:generate failed: lateinit property services has not been initialized -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.aoudiamoncef:apollo-client-maven-plugin:4.0.3:generate (default) on project my-connector: Execution default of goal com.github.aoudiamoncef:apollo-client-maven-plugin:4.0.3:generate failed: lateinit property services has not been initialized
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java: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:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal com.github.aoudiamoncef:apollo-client-maven-plugin:4.0.3:generate failed: lateinit property services has not been initialized
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
... 20 more
Caused by: kotlin.UninitializedPropertyAccessException: lateinit property services has not been initialized
at com.github.aoudiamoncef.apollo.plugin.GraphQLClientMojo.execute(GraphQLClientMojo.kt:63)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
... 21 more
Hi @chrisociepa,
When you got this error, it's a configuration issue, please find the new configuration here.
There are breaking changes between 3.x.x and 4.x.x. A new version based on Apollo 3.x.x will be release ASAP with breaking changes, so you could wait if you want to have it.
test https://github.com/aoudiamoncef/spring-boot-apollo-graphql
I have the same problem
Failed to execute goal com.github.aoudiamoncef:apollo-client-maven-plugin:4.0.5:generate (default-cli) on project spring-boot-apollo-client: Execution default-cli of goal com.github.aoudiamoncef:apollo-client-maven-plugin:4.0.5:generate failed: lateinit property services has not been initialized
@aoudiamoncef below plugin config is ok
<plugin>
<groupId>com.github.sparow199</groupId>
<artifactId>apollo-client-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
</configuration>
</execution>
</executions>
</plugin>
did tried to clone repository, open
apollo-client-maven-plugin-tests
in idea, comment some unnecessary parts from pox.xml and define plugin version to4.0.4
as suggested in readmeafter trying to perform
apollo-client:generate
maven task retrievinglateinit property services has not been initialized
full log
initially got the same on selenide project but decided to test everything in your test example
feel free to ask for any additional details will be happy to provide everything needed