Importing the TongWeb Dependency Package to the Maven Repository
Contact TongTech to obtain the product resource package and import it to the Maven repository in either of the following ways. After the import is successful, you can import the required dependencies to your project.
Importing to the Local Maven Repository
- Decompress the obtained product resource package of the embedded-edition TongWeb.
- Go to the decompressed root directory and run the installMavenJar script to install the JAR package in the lib directory to the local Maven repository.
- Windows:
1installMavenJar.bat
- Linux:
1./installMavenJar.sh
- Windows:
- Check whether the installation is successful.
Go to the repository/com/tongweb/ directory of the local Maven repository. If you find the installed JAR package in the lib directory, the JAR package is successfully deployed in the local repository.
Importing to an Enterprise's Private Repository
- Run the deployMavenJar script to upload all the obtained JAR packages of the embedded-edition TongWeb to the enterprise's private repository.
- Windows:
1deployMavenJar.bat [url] [sid]
- Linux:
1deployMavenJar.sh [url] [sid]
- url: URL of the private repository. Enter the complete URL, for example, http://127.0.0.1:8081/nexus/content/repositories/central/.
- sid: server ID configured in the settings.xml file of Maven. In addition, the key of the private repository must be configured in the settings.xml file of Maven.
- Windows:
- Check whether the installation is successful.
Go to the private repository directory of Maven. If you find the installed JAR packages in the lib directory in the private repository, the JAR packages are successfully deployed in the private repository.
Follow-up Procedure
After importing the TongWeb dependencies to the Maven repository, you can modify or add the <dependency> tag in the pom.xml file to import the required dependencies to your project. For example:
1 2 3 4 5 | <dependency> <groupId>com.tongweb.springboot</groupId> <artifactId>tongweb-spring-boot-starter-1.x</artifactId> <version>7.0.E.{n}_P4</version> </dependency> |
Search for the groupId, artifactId, and version values of the dependency packages you want to import. For details, see the TongWeb Embedded JavaEE Standard Container.pdf. For some dependencies, determine artifactId based on the Spring Boot environment version. If the environment is Spring Boot 1.x, artifactId ends with 1.x. If the environment is Spring Boot 2.x, artifactId ends with 2.x.
Optional packages to import: Import packages that your code project needs. See Table 1 for the artifactId of each dependency package.
Package artifactId |
Description |
|---|---|
tongweb-spring-boot-starter-1.x/2.x |
(Mandatory) Replacing the core dependency package of Tomcat |
tongweb-spring-boot-data-jdbc-starter-1.x/2.x |
(Optional) Integrating JDBC |
tongweb-spring-boot-websocket |
(Optional) Integrating WebSocket |
tongweb-gmssl |
(Optional) Integrating the GmSSL secure communication library (SM algorithms) |
tongweb-jsp |
(Optional) Supporting the Java Server Pages (JSP) specification |
spring-boot-starter-actuator |
(Optional) Monitoring data |
tongweb-spring-boot-maven-plugin |
(Optional) Isolating class loaders, that is, isolating TongWeb from the class loaders used by the user to prevent class loader conflicts |
For details about how to configure and import packages, see the TongWeb Embedded JavaEE Standard Container.pdf.