Create a new module in ideal (subproject, while depending on the parent module)

step one:

Here select parent project dependencies and name the subproject

The automatically generated name is used by default and does not need to be changed

Step 2:

Add the dependencies of the new subproject to the saaf parent module

Select the module of the newly created subproject

In the saaf parent module as follows:

In the newly created submodule, add the basic modules that need to be depended on

Select the base module to depend on

Step 3:

Add the following code to the pom.xml file of the newly created submodule

<parent>

       <artifactId>saaf-parent</artifactId>

       <groupId>com.sie.saaf</groupId>

       <version>1.0-SNAPSHOT</version>

       <relativePath>../SaafProjectMaster/pom.xml</relativePath>

</parent>

<modelVersion>4.0.0</modelVersion>

 

<groupId>com.sie.saaf</groupId>

<artifactId>SrmDemoModule</artifactId>

<version>1.0-SNAPSHOT</version>

<packaging>jar</packaging>

<name>SrmDemoModule</name>

<url>http://maven.apache.org</url>

<properties>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

</properties>

-----------------------------------------------------------------------------------------------------------

Add the dependencies of the basic submodule to be relied on in the newly created submodule, the example is as follows

<dependencies>

<dependency>

<groupId>com.sie.saaf</groupId>

<artifactId>saafCommonModel</artifactId>

<version>1.0-SNAPSHOT</version>

<exclusions>

<exclusion>

<groupId>*</groupId>

<artifactId>*</artifactId>

</exclusion>

</exclusions>

</dependency>

 

<dependency>

<groupId>com.sie.saaf</groupId>

<artifactId>SrmEntitiesModel</artifactId>

<version>1.0-SNAPSHOT</version>

</dependency>

 

<dependency>

<groupId>com.sie.saaf</groupId>

<artifactId>saafBaseModel</artifactId>

<version>1.0-SNAPSHOT</version>

</dependency>

 

<dependency>

<groupId>com.sie.saaf</groupId>

<artifactId>SrmIntfModel</artifactId>

<version>1.0-SNAPSHOT</version>

</dependency>

 

<dependency>

<groupId>com.sie.saaf</groupId>

<artifactId>SaafMessageModel</artifactId>

<version>1.0-SNAPSHOT</version>

<exclusions>

<exclusion>

<groupId>*</groupId>

<artifactId>*</artifactId>

</exclusion>

</exclusions>

</dependency>

</dependencies>

Add the dependency of the new submodule to the pom.xml file of saafUI, as shown below

<dependency>

       <groupId>com.sie.saaf</groupId>

       <artifactId>SrmDemoModule</artifactId>

       <version>1.0-SNAPSHOT</version>

</dependency>

At this point, you need to repeat the next step 2 to check whether the dependencies added in the saaf parent module and the newly created subproject exist, and sometimes disappear.

Step 4:

open maven settings

In the maven settings, introduce the pom.xml file of the newly created submodule

In maven, re-clean and install and load and refresh the maven jar package

Check maven dependencies

At this point, start the project. If the project is successfully started and logged in, it means that the newly created submodule is basically no problem.

Write the background code in the newly created subproject to detect whether the subproject really depends on the success.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325260119&siteId=291194637