Created attachment 1067235 [details] kjar Description of problem: During the KJAR deployment, the JAXBContext will be created for classes which are annotated with @Remotable. It would be nice if customer could test the attempt of JAXBContext creation even before attempting the real deployment within business-central. For this, it is necessary that the unit tests are added to the code base so customer could use those in their environments. Specifically, the attached KJAR deployment will fail with Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions com.capitalone.api.deposits.applications.model.v3.ApplicantRoleConstraint is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at com.capitalone.api.deposits.applications.model.v3.ApplicantRoleConstraint com.capitalone.api.deposits.applications.model.v3.DateOfBirth is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at com.capitalone.api.deposits.applications.model.v3.DateOfBirth It should be possible to test before actual deployment attempt, that this KJAR deployment will fail or succeed.
Anton, could you please elaborate more on this? how would you like to see that? We have tests in code base to cover this [1] though not sure what you'd like to have here... [1] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-services/jbpm-kie-services/src/test/java/org/jbpm/kie/services/test/KModuleWithDependenciesDeploymentServiceTest.java
Thanks for this Maciej, it looks promising. I'll run this with customer and see if it suits his needs.
I guess the customer is not looking for test coverage, but for a way to 'validate' if their project would deploy without actually deploying this. With managed repos, you don't only have 'Build & Deploy' but where you can also simply build the project without deploying. This probably still wouldn't trigger creation of the jaxb context though. I believe it might be useful to add a 'Validate' option to the Build menu where we would do as many validations as possible (same what would happen if you actually do build & deploy) but the end result will always be that the kjar is not really added to the repo and the kjar is not deployed (just tested).