Skip kogito compile when running tests

5 views
Skip to first unread message

Dominic Dong

unread,
Apr 14, 2026, 6:55:08 AM (14 days ago) Apr 14
to Kogito development mailing list
Hi,

Noticed that every time we try to run the tests it tries to recompile the classes and models even if there aren't any changes to the bpmn / dmn diagrams. Is there anyway for us to split the steps up so that we can skip the regeneration of classes and models when we just want to run the tests? Thanks in advance.

Dominic

Alex Porcelli

unread,
Apr 14, 2026, 5:27:05 PM (13 days ago) Apr 14
to kogito-de...@googlegroups.com
Probably not, because the models are essentially code. If you are testing the project, it's expected to have all code related to it... included the code-gen of the models.

Maybe to avoid this problem, you can create different modules and isolate the models in one module and other parts of the code in a different module. Would still code-gen during the build, but you'd have more flexibility in managing it.

--
You received this message because you are subscribed to the Google Groups "Kogito development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kogito-developm...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/kogito-development/5be1f942-bfa1-4304-bb90-094edd327840n%40googlegroups.com.

Dominic Dong

unread,
Apr 14, 2026, 10:30:30 PM (13 days ago) Apr 14
to Kogito development mailing list
ok thanks for the advice, will try it out

Gabriele Cardosi

unread,
Apr 15, 2026, 4:04:01 AM (13 days ago) Apr 15
to kogito-de...@googlegroups.com
Hi Dominic,
there could be a couple of other options:
1. Define a profile that does not contain the models in the build resources, e.g.

  <profiles>
    <profile>
      <id>no_model</id>
      <build>
        <resources>
          <resource>
            <directory>
              {folder_without_models}
            </directory>
          </resource>
        </resources>
      </build>
    </profile>
  </profiles>
The rationale is that if models are not found during discovery, the model-specific codegeneration won't execute.

2. For Spring Boot applications, perhaps it's possible to create a profile to disable the kogito-maven-plugin


Please note:
I did not try any of them; it's just something that crossed my mind. 

M2C
Bye
Gabriele



--

GABRIELE CARDOSI

SENIOR SOFTWARE ENGINEERS, MW

Red Hat Ltd

gcar...@redhat.com    M: +39-3461717132    

Reply all
Reply to author
Forward
0 new messages