[jboss-jira] [JBoss JIRA] (DROOLS-2729) KieScanner tries to read test dependencies

Ales Dolecek (Jira) issues at jboss.org
Tue Oct 9 07:33:00 EDT 2018


    [ https://issues.jboss.org/browse/DROOLS-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13645116#comment-13645116 ] 

Ales Dolecek commented on DROOLS-2729:
--------------------------------------

Any chance to progres with this?

BTW: If you fixed this issue you would not have to hack jdk dependency in DROOLS-2773. In the comments you wrote you do not know how it got in the dependency list in first place. Well - it is because the incorrect way you lookup dependencies as described in this issue.

> KieScanner tries to read test dependencies
> ------------------------------------------
>
>                 Key: DROOLS-2729
>                 URL: https://issues.jboss.org/browse/DROOLS-2729
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine
>    Affects Versions: 7.8.0.Final
>            Reporter: Ales Dolecek
>            Assignee: Mario Fusco
>            Priority: Major
>
> Method KieRepositoryScannerImpl#indexArtifacts first reads ALL dependencies and then tries to exclude those with scope test/provided/system. This is wrong since the nested dependencies might have different scope. Conseder this case:
> A -> depends on B (with scope test)
> B -> depends on C (with scope compile)
> Asking for allDependencies will yield following descriptors:
> A (compile scope)
> B (test scope)
> C (compile scope)
> B gets discarded, but C remains and scanner will try to resolve it and add to class loader.
> Instead of fitering the results of ArtifactResolver#getAllDependencies() (without parameters) you should use overloaded version of this method that accepts dependency filter.
> I do not create rules via GUI, but have them in separate Maven project. This projects contains tests cases that check if the rules are OK. The tests create the knowlege base from filesystem and require drools-decisiontables in order to execute. 



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list