javamavenactivejdbcjavalite

Is possible instrument module project witch Activejdbc and Maven?


i have a parent project A(war) that implement, with dependency, project B(jar), similar

<dependency>
<groupId>big-parent</groupId>
<artifactId>big-BL</artifactId>
<version>1.0</version>
</dependency>

In project B there are all the 'models' that are recalled by project A.

When i instrument my A project, with command

mvn process-classes 

I haven't compilation errors but when call my RestController, from A project by postman for example, the issue is:

org.javalite.activejdbc.InitException: failed to determine Model class name, are you sure models have been instrumented?

i'm sure that the problem is in instrumentation of Project A but what am i doing wrong?

Another step about i do is decompile WAR file of A Project and actually, in 'lib' folder, there is jar of B project BUT, the model of my interest, there isn't methods from super class to a subclass about instrumentation.... someone know what is the right method?


Solution

  • You need to instrument the project that has models. It means you need to instrument the project B. Additionally, you do not need to call process-classes explicitly because mvn clean install will do this anyway.

    As far as packaging, looks like you will benefit from setting up a multi-module project, where B is one module and A is another, that has a dependency on B. Generally, you need to learn more about Maven: https://books.sonatype.com/mvnex-book/reference/multimodule.html