Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile Component annotation project #51

Closed
cmoulliard opened this issue Nov 28, 2018 · 2 comments
Closed

Can't compile Component annotation project #51

cmoulliard opened this issue Nov 28, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@cmoulliard
Copy link
Collaborator

Description

If we change a field of the ComponentSpec class

package io.ap4k.component.model;

import io.ap4k.deps.jackson.annotation.JsonInclude;
import io.ap4k.deps.jackson.annotation.JsonPropertyOrder;
import io.ap4k.deps.kubernetes.api.model.Doneable;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

import javax.annotation.Generated;

/**
 *
 *
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
    "name",
      "type",
      "packagingMode",
      "deploymentMode",
      "runtime",
      "version",
      "exposeService",
      "cpu",
      "strorage",
      "image",
      "env",
      "feature",
      "link"
      })
      @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, builderPackage = "io.ap4k.deps.kubernetes.api.builder", inline = @Inline(type = Doneable.class, prefix = "Doneable", value = "done"))
      public class ComponentSpec {

        private String name;
        private String packagingMode;
        private String type;
        private DeploymentType deployment; // deploymentMode -> deployment

And next we re-compile -> mvn clean compile, then we get such errors

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.619 s
[INFO] Finished at: 2018-11-28T10:29:50+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project component-annotations: Compilation failure: Compilation failure: 
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/decorator/AddServiceInstanceToComponent.java:[19,30] error: cannot find symbol
[ERROR]  package io.ap4k.component.model
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/decorator/AddServiceInstanceToComponent.java:[27,61] error: cannot find symbol
[ERROR]  class ComponentSpecBuilder
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/decorator/AddServiceInstanceToComponent.java:[36,20] error: cannot find symbol
[ERROR]  class AddServiceInstanceToComponent
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/decorator/AddServiceInstanceToComponent.java:[49,29] error: cannot find symbol
[ERROR]  class AddServiceInstanceToComponent
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/decorator/AddRuntimeToComponent.java:[19,30] error: cannot find symbol
[ERROR]  package io.ap4k.component.model
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/decorator/AddRuntimeToComponent.java:[24,53] error: cannot find symbol
[ERROR]  class ComponentSpecBuilder
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/decorator/AddRuntimeToComponent.java:[33,20] error: cannot find symbol
[ERROR]  class AddRuntimeToComponent
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/processor/CompositeAnnotationProcessor.java:[23,30] error: package io.ap4k.component.adapt does not exist
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/processor/CompositeAnnotationProcessor.java:[25,31] error: package io.ap4k.component.config does not exist
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/processor/CompositeAnnotationProcessor.java:[26,31] error: package io.ap4k.component.config does not exist
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/processor/CompositeAnnotationProcessor.java:[39,78] error: cannot find symbol
[ERROR]  class CompositeConfig
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/processor/CompositeAnnotationProcessor.java:[57,31] error: cannot find symbol
[ERROR]  class CompositeAnnotationProcessor
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/decorator/AddEnvToComponent.java:[19,30] error: cannot find symbol
[ERROR]  package io.ap4k.component.model
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/decorator/AddEnvToComponent.java:[25,49] error: cannot find symbol
[ERROR]  class ComponentSpecBuilder
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/decorator/AddEnvToComponent.java:[34,20] error: cannot find symbol
[ERROR]  class AddEnvToComponent
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/ComponentHandler.java:[21,31] error: package io.ap4k.component.config does not exist
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/ComponentHandler.java:[22,31] error: package io.ap4k.component.config does not exist
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/ComponentHandler.java:[26,30] error: cannot find symbol
[ERROR]  package io.ap4k.component.model
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/ComponentHandler.java:[33,49] error: cannot find symbol
[ERROR]  class CompositeConfig
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/ComponentHandler.java:[49,21] error: cannot find symbol
[ERROR]  class ComponentHandler
[ERROR] /Users/dabou/Code/snowdrop/ap4k/ap4k-annotations/annotations/component-annotations/src/main/java/io/ap4k/component/ComponentHandler.java:[75,36] error: cannot find symbol
[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.
@cmoulliard cmoulliard added the bug Something isn't working label Nov 28, 2018
@iocanel
Copy link
Member

iocanel commented Nov 28, 2018

For most of the processor modules we define annotations and from those annoations we code generate config. The error you get means that for some reason the config wans't generated, This usually is due to a syntax error.

@cmoulliard
Copy link
Collaborator Author

cmoulliard commented Nov 28, 2018

There was a typo error for the getter/setter
The method name was defined as setdeployment() instead of setDeployment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants