简体   繁体   English

可能的仪器模块项目是 Activejdbc 和 Maven 吗?

[英]Is possible instrument module project witch Activejdbc and Maven?

i have a parent project A(war) that implement, with dependency, project B(jar), similar我有一个父项目 A(war) 实现,依赖,项目 B(jar),类似

<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.在项目 B 中有项目 A 召回的所有“模型”。

When i instrument my A project, with command当我用命令检测我的 A 项目时

mvn process-classes 

I haven't compilation errors but when call my RestController, from A project by postman for example, the issue is:我没有编译错误,但是当从邮递员的一个项目中调用我的 RestController 时,问题是:

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?我确定问题出在项目 A 的检测中,但我做错了什么?

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?我要做的另一个步骤是反编译 A 项目的 WAR 文件,实际上,在“lib”文件夹中,有 B 项目的 jar,但我感兴趣的模型,没有从超类到关于仪器的子类的方法.. ..有人知道什么是正确的方法吗?

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.这意味着您需要检测项目 B。此外,您不需要显式调用process-classes因为无论如何mvn clean install都会执行此操作。

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至于打包,看起来你会受益于建立一个多模块项目,其中 B 是一个模块,A 是另一个依赖于 B 的模块。 一般来说,你需要了解更多关于 Maven: https:// book.sonatype.com/mvnex-book/reference/multimodule.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM