我正在尝试和学习更好地理解 Maven 的用法。我有一个关于在多个模块中使用包名称的正确方法的问题。
我将用一个例子来解释我的问题。
我们有以下项目。
project
project-api Interfaces (implemented by the modules)
project-core Logic
project-persistence Data (models, repository etc)
project-utils Utilities (hashing, calculating etc)
project-gui Graphical User Interface
project-cli Command Line Interface
project-dist Distribution (generate the JAR's together)
Run Code Online (Sandbox Code Playgroud)
有以下课程。
project-api
Repository Interface
project-core
AbstractRepository Abstract class (implements Repository)
Core Class
project-persistence
SampleRepository Class (extends AbstractRepository)
Sample Class (model)
project-utils
Calculator Class
project-gui
Demo Class (main)
Run Code Online (Sandbox Code Playgroud)
现在当我们有了这些东西时,我们将创建以下 Demo 类。
public class Demo() {
public static void main(String[] args) {
Core core …Run Code Online (Sandbox Code Playgroud) 好吧,我正在四处寻找,但是我找不到任何答案。
是否可以建立一个链接(在markdown中)以重定向到fork弹出窗口?