Maven configuration file modification and import of third-party jar packages

Set environment variables for java and maven

Modify maven configuration file

(D:\app\apache-maven-3.5.0\conf\settings.xml, conf under the maven package corresponding to the environment variable in 1)

Modify the mirror around line 131 and set the Alibaba Cloud warehouse address.

<mirror>  
		<id>alimaven</id>  
		<name>aliyun maven</name>  
		<mirrorOf>central</mirrorOf>
		<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>

Modify the warehouse address around line 32 and set the warehouse address of the jar package.

<localRepository>D://data/jar/gwxf1</localRepository>

Import third-party jar

Place the aspose-words-14.9.0.jar package in the root directory of drive D

Open the cmd window with the administrator and execute the command

mvn install:install-file -Dfile=D:\aspose-words-14.9.0.jar -DgroupId=com.aspose -DartifactId=aspose-words -Dversion=14.9.0 -Dpackaging=jar

Introduce the corresponding jar package into the pom file

<!-- word2pdf -->
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>14.9.0</version>
</dependency>

Guess you like

Origin blog.csdn.net/m0_69057918/article/details/132428465