How can I build the dependent projects when a child project is getting build by maven. As an example, I have 2 projects call A,B. Project B is depending on project A. I want to build the project A when I am building project B with maven. How should I do it?
相关问题
- Include pom.xml in Jar with gradle
- What order does maven find its dependencies?
- proguard causing EnumMap NPE on dynamically declar
- Maven: How to read the Parent POM version
- enableHiveSupport throws error in java spark code
相关文章
- IDEA2020 安装maven 插件后,springboot程序 SpringBootApplic
- pom文件中的插件定义
- pom.xml中的project为何报红
- Hibernate Tutorial - Where to put Mapping File?
- Handling ffmpeg library interface change when upgr
- Build errors of missing packages in Visual Studio
- Cannot use org.jvnet.jax-ws-commons.jaxws-maven-pl
- New Maven install: mvn -version java.lang.ClassNot
Take a look at these options that can be passed to mvn:
I believe in your case you have to use -amd
Edit: In case you need to do it through a pom. You just need to create another module say C, that just lists the sub modules A and B. And when you build C, the maven reactor will automatically build both.
In the ModuleA and B you need to add this:
And your directory structure will look like this:
Have a look at this for a simple example: http://books.sonatype.com/mvnex-book/reference/multimodule.html