[jboss-jira] [JBoss JIRA] (DROOLS-357) Multiple static initialization makes debugging Maven issues impossible
Lukáš Petrovický (JIRA)
issues at jboss.org
Mon Jan 4 06:58:19 EST 2016
[ https://issues.jboss.org/browse/DROOLS-357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukáš Petrovický updated DROOLS-357:
------------------------------------
Labels: reported-by-qe (was: )
> Multiple static initialization makes debugging Maven issues impossible
> ----------------------------------------------------------------------
>
> Key: DROOLS-357
> URL: https://issues.jboss.org/browse/DROOLS-357
> Project: Drools
> Issue Type: Enhancement
> Affects Versions: 6.0.0.Final
> Reporter: Lukáš Petrovický
> Assignee: Mario Fusco
> Labels: reported-by-qe
> Fix For: 6.0.1.Final
>
>
> When running kie-ci tests against productized binaries, most of the tests in that module fail with this particular exception (or similar):
> java.lang.NoClassDefFoundError: Could not initialize class org.kie.scanner.MavenRepository
> at org.kie.scanner.KieModuleMavenTest.testKieModulePojoDependencies(KieModuleMavenTest.java:119)
> Turns out, this exception is (through multiple levels of static initialization) actually caused here:
> https://github.com/droolsjbpm/drools/blob/master/kie-ci/src/main/java/org/kie/scanner/embedder/MavenProjectLoader.java#L10
> Maven resolution fails, because it cannot find some dependencies in the project being loaded. As a result, the class is never initialized, fast forward two other classes, and you get the above exception. I kindly ask that this behavior be changed in such a way that the original exception bubbles up through the stack - otherwise, the user has no chance to figure out what's going on.
> The issue is a bit tricky to reproduce, as it's directly related to artifacts not being resolvable - but it should, if my understanding of the error is correct, be enough to have a parser error in the POM that's being loaded.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list