mguymon / model-citizen

Annotation based model factory for Java
Apache License 2.0
94 stars 13 forks source link

Incorrect dependencies. #40

Open fireboy1919 opened 2 years ago

fireboy1919 commented 2 years ago

commons-lang is required for this to run even though this isn't listed as a dependency. If this is not included, the latest build will fail.

Build stacktrace:

java.lang.NoClassDefFoundError: org/apache/commons/lang/reflect/ConstructorUtils
        at com.tobedevoured.modelcitizen.ModelFactory.registerBlueprint(ModelFactory.java:420)
        at com.tobedevoured.modelcitizen.ModelFactory.registerBlueprint(ModelFactory.java:194)
        at com.tobedevoured.modelcitizen.ModelFactory.setRegisterBlueprints(ModelFactory.java:153)
        at com.tobedevoured.modelcitizen.ModelFactory.setRegisterBlueprintsByPackage(ModelFactory.java:140)
        at com.fr.receipt.repo.core.BlueprintUtil.getBlueprint(BlueprintUtil.java:17)
        at com.fr.receipt.repo.core.ReceiptFactoryImplTest.testScrubReceipt(ReceiptFactoryImplTest.java:48)

This is resolved if I add this to my maven file:

        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
            <scope>test</scope>
        </dependency>
mguymon commented 2 years ago

Can you post the build error?

fireboy1919 commented 2 years ago

Updated with more specific information.

mguymon commented 2 years ago

commons-lang is definitely a dependency in the pom - https://search.maven.org/artifact/com.tobedevoured/modelcitizen/0.6.0/jar

Are you using a recent version?