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

Test not working in maven archetype #6214

Open
malet-pr opened this issue Jan 8, 2025 · 1 comment
Open

Test not working in maven archetype #6214

malet-pr opened this issue Jan 8, 2025 · 1 comment

Comments

@malet-pr
Copy link

malet-pr commented Jan 8, 2025

Following the getting started guide for drools 8.44.0.FINAL, I created a project using maven archetype:
mvn archetype:generate -DarchetypeGroupId=org.kie -DarchetypeArtifactId=kie-drools-exec-model-ruleunit-archetype -DarchetypeVersion=8.44.0.Final

The first thing I tried was to run the tests, to get a feeling and got this error:

java.lang.UnsupportedOperationException: You're trying to dynamically define a class, please add the module org.drools:drools-wiring-dynamic to your classpath.

which references the line:
RuleUnitInstance instance = RuleUnitProvider.get().createRuleUnitInstance(measurementUnit);

How should I proceed?

@tkobayas
Copy link
Contributor

Firstly, please use zulip (https://kie.zulipchat.com/#narrow/stream/232677-drools) or google group (https://groups.google.com/g/drools-usage/) for trouble-shooting. GH issue is used to track identified bugs.

The rule project requires code generation that is triggered by mvn compile phase. If you directly run RuleTest.java in IDE, you may need to run mvn compile first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants