Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use this as git submodule on Maven | 将 git submodule 作为Maven依赖引用 #3

Open
sky5454 opened this issue Apr 5, 2020 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@sky5454
Copy link
Owner

sky5454 commented Apr 5, 2020

  1. 将本仓库添加到 git submodule,然后用maven编译本项目 (如果提示发现没有源码目录,则需要把src目录标记为源码目录)
  2. 在主项目的 pom.xml 里添加本 maven 模块,一般格式为:
        <!--        git sub module -->
        <dependency>
            <groupId>org.yu</groupId>
            <artifactId>myorm</artifactId>
            <version>1.0</version>
            <scope>compile</scope>
        </dependency>
@sky5454
Copy link
Owner Author

sky5454 commented Apr 5, 2020

如果没有编译本项目,引用时会提示找不到依赖(IDEA爆出红线)

@sky5454 sky5454 added the documentation Improvements or additions to documentation label Apr 8, 2020
@sky5454
Copy link
Owner Author

sky5454 commented Apr 12, 2020

提示在公共仓库中找不到本模块,请使用 maven 的 package 把本模块打包,然后使用 maven 的 install` 把本模块安装到本地仓库目录

@sky5454 sky5454 changed the title git submodule 作为Maven依赖引用 use this as git submodule on Maven | 将 git submodule 作为Maven依赖引用 Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant