In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "Rainbond Java Maven multi-module source code how to build", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "how to build Rainbond Java Maven multi-module source code"!
Maven multi-module project construction identification strategy
The Maven multi-module project is divided according to the pom.xml file (hereinafter referred to as pom), and the identification of it by Rainbond is also based on pom. The main purpose is to identify the construction commands and startup commands of the specific module (module). The function of the build command is to specify the module to be built, which is a mvn command similar to "mvn install-pl 'module name'-am". The startup command specifies the Jar package to be executed after the build is completed, which is a command similar to "web: java $JAVA_OPTS-jar * .jar".
Identification strategy:
According to the module tag in modules in the root pom, find the pom under the corresponding module.
If the value of the packing tag in pom is jar (war), the module name and jar (war) package name corresponding to the current pom are resolved. If the value of the packing tag is empty, it will be considered to be jar.
The module name consists of the value of the module tag in the name-level parent pom, separated by "/", similar to: rbd-worker/rbd-thirdparty.
The jar (war) package name defaults to ${artifaceId}-* .jar (war). If the finalName tag is set, the value of the finalName tag is used; if the finalName tag uses the variable ${project.name} or ${project.aritfactId}, the corresponding value of the variable is used; if other variables are used, it is directly replaced with *, that is, * .jar (war).
If the value of the packing tag in pom is pom and the module in the modules tag is more than 1, repeat 1-5.
Because the wildcard * is used in many places, when there is more than one jar (war), the identified jar (war) package may not be able to determine the unique package, or the identified jar (war) package is incorrect, which requires the user to modify it manually.
Source code specification for multi-module project
Because the identification of Maven multi-module project by Rainbond is based on pom, the pom.xml file we are writing should conform to the pom specification. For the specification of pom, please refer to POM Reference
Case
Here, take the Java source code deployment part of the Pig project in the case of SPRING CLOUD microservice deployment in RAINBOND as an example to deploy the Pig project with multiple modules at a time (other dependencies such as Mysql are installed by default).
Module construction
Create a new application and name it spring-cloud
Create from the source code, select the custom source code, and enter the project address
If it is a multi-module project will be identified, choose to enter the multi-module build configuration item
According to the case that Spring Cloud micro-service is deployed in RAINBOND, we can see that the following components need to be deployed and run. Check and build them.
Build completed effect drawing (only the Java part)
View the source information of an application construction
At this point, I believe that everyone on the "Rainbond Java Maven multi-module source code how to build" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.