问题
Can any one explain how to create Parent POM, specific to organization .
Here I am not looking for multimodule project.
The POM what I am going to create will be used by all the projects and each project will have their own parent pom which extends the organization specific POM.
Please provide some steps how to create in Eclipse.
回答1:
Parent POM is called a BOM in Maven, you can put it anywhere so long as you define modules inside it, which will have their own poms. Example
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>myorg</groupId>
<artifactId>Myorg BOM</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Myorg BOM</name>
<modules>
<module>location/of/module1</module>
<module>location/of/module2</module>
<module>location/of/module3</module>
</modules>
...
Then you just create a POM for each individual component in the path provided in module. You can create this inside an eclipse project.
来源:https://stackoverflow.com/questions/39002511/how-to-create-maven-parent-pom-speciific-to-organization