Advertisement
dwhitzzz

Build Multiple Independent Projects with Maven

Jan 12th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.01 KB | None | 0 0
  1. <project xmlns="http://maven.apache.org/POM/4.0.0"
  2.          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3.          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  4.            https://maven.apache.org/xsd/maven-4.0.0.xsd">
  5.     <modelVersion>4.0.0</modelVersion>
  6.  
  7.     <groupId>org.codehaus.mojo</groupId>
  8.     <artifactId>project-all-build</artifactId>
  9.     <version>2.0</version>
  10.     <packaging>pom</packaging>
  11.  
  12.     <modules>
  13.  
  14.         <!-- folder is a dir inside my project (root) dir -->
  15.         <!-- this pom should be at root level to see all the subfolders -->
  16.         <module>folder/project-dir-root</module>
  17.        
  18.         <!-- dir graph -->
  19.  
  20.         <!--
  21.  
  22.         - projects (root)
  23.         |
  24.         |_______ java
  25.         |       |
  26.         |       |______ hello_world
  27.         |       |______ jpa
  28.         |
  29.         |_______ java-1
  30.         |       |
  31.         |       |_____ arraylist_sample
  32.         |
  33.         |_______ pom.xml
  34.        
  35.         -->
  36.        
  37.         <!-- maven builds the project in the following order -->
  38.        
  39.         <module>java/hello_world</module>
  40.  
  41.         <module>java-1/arraylist_sample</module>
  42.  
  43.         <module>java/jpa</module>
  44.  
  45.  
  46.     </modules>
  47. </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement