You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If custom resource definitions contain the character sequence which ends a javadoc comment, the generated java files are not compiling.
java-generator-maven-plugin with version 6.4.1 was used, same problem also for version 6.3.1
build fails with the following output (paths anonymized):
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< org.example:javadoc-escape >---------------------
[INFO] Building javadoc-escape 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ javadoc-escape ---
[INFO] Deleting /exampleprojectpath/javadoc-escape/target
[INFO]
[INFO] --- java-generator-maven-plugin:6.4.1:generate (crd-generator) @ javadoc-escape ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ javadoc-escape ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ javadoc-escape ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to /exampleprojectpath/javadoc-escape/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /exampleprojectpath/javadoc-escape/target/generated-sources/java/com/example/v1/DummySpec.java:[10,43] ';' expected
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.962 s
[INFO] Finished at: 2023-02-01T09:03:39+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project javadoc-escape: Compilation failure
[ERROR] /exampleprojectpath/javadoc-escape/target/generated-sources/java/com/example/v1/DummySpec.java:[10,43] ';' expected
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
generated DummySpec.java looks as follows:
package com.example.v1;
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
@com.fasterxml.jackson.annotation.JsonPropertyOrder({"someField"})
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
@javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner")
public class DummySpec implements io.fabric8.kubernetes.api.model.KubernetesResource {
/**
* some text containing */ javadoc end
*/
@com.fasterxml.jackson.annotation.JsonProperty("someField")
@com.fasterxml.jackson.annotation.JsonPropertyDescription("some text containing */ javadoc end")
@com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP)
private String someField;
public String getSomeField() {
return someField;
}
public void setSomeField(String someField) {
this.someField = someField;
}
}
Expected behavior
A successful maven build is expected which generated classes Dummy and DummySpec and compiled them.
This could be achived for example by replacing the / in descriptions with / during code generation.
The expected generated DummySpec.java would then look like:
package com.example.v1;
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
@com.fasterxml.jackson.annotation.JsonPropertyOrder({"someField"})
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
@javax.annotation.processing.Generated("io.fabric8.java.generator.CRGeneratorRunner")
public class DummySpec implements io.fabric8.kubernetes.api.model.KubernetesResource {
/**
* some text containing */ javadoc end
*/
@com.fasterxml.jackson.annotation.JsonProperty("someField")
@com.fasterxml.jackson.annotation.JsonPropertyDescription("some text containing */ javadoc end")
@com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SKIP)
private String someField;
public String getSomeField() {
return someField;
}
public void setSomeField(String someField) {
this.someField = someField;
}
}
Runtime
other (please specify in additional context)
Kubernetes API Server version
other (please specify in additional context)
Environment
Linux
Fabric8 Kubernetes Client Logs
No response
Additional context
no kubernetes runtime or API server needed for reproducing this bug
The text was updated successfully, but these errors were encountered:
Describe the bug
If custom resource definitions contain the character sequence which ends a javadoc comment, the generated java files are not compiling.
java-generator-maven-plugin with version 6.4.1 was used, same problem also for version 6.3.1
Fabric8 Kubernetes Client version
6.4.1
Steps to reproduce
mvn clean compile
Current behavior:
DummySpec.java
looks as follows:Expected behavior
A successful maven build is expected which generated classes
Dummy
andDummySpec
and compiled them.This could be achived for example by replacing the
/
in descriptions with/
during code generation.The expected generated
DummySpec.java
would then look like:Runtime
other (please specify in additional context)
Kubernetes API Server version
other (please specify in additional context)
Environment
Linux
Fabric8 Kubernetes Client Logs
No response
Additional context
no kubernetes runtime or API server needed for reproducing this bug
The text was updated successfully, but these errors were encountered: